Sonny's blog ✌️

I love eating GPUs 💻

  • Posts
  • Who am I?
  • yes Français
  • 1 min

My test article

This is my great article about smth, here a piece of code:

import { remarkCodeHike } from '@code-hike/mdx';
import { defineDocumentType, makeSource } from 'contentlayer/source-files';
const Post = defineDocumentType(() => ({
  name: 'Post',
  filePathPattern: `**/*.mdx`,
  contentType: 'mdx',
  computedFields: {
    url: {
      type: 'string',
      resolve: (doc) => `/posts/${doc._raw.flattenedPath}`,
    },
  },
}));

Next steps :

  • yes
  • no
  • aaaaaaaaa

export default makeSource({
  contentDirPath: 'posts',
  documentTypes: [Post],
  mdx: { remarkPlugins: [[remarkCodeHike, { theme: 'light-plus' }]] },
});