1. Docs

Directory Structure

All the blog posts must be in src/content/blog/.

The directory structure would look like this:

src/content/blog/
├── authors.json
├── benefits-of-blogging
│   ├── cover.webp
│   └── index.md
├── deep-dive-into-svelte
│   ├── cover.webp
│   └── index.md
└── seo
    ├── cover.webp
    └── index.md

Authors

At the root of the blog directory there must be an authors.json file which would have the list of author objects like below:

[
  {
    "id": "author01",
    "type": "Organization",
    "name": "Author One",
    "url": "https://x.com/thevivekshukla",
    "avatar": ""
  },
  {
    "id": "author02",
    "type": "Person",
    "name": "Author Two",
    "url": "https://x.com/thevivekshukla",
    "avatar": ""
  }
]

id: This is the unique id of an author, this is what will be used in blog post to attribute the author.

type: This could either Organization or Person, this is used in SEO to help search engines in understanding the content and author.

name: This is the name that will be shown on the Blog.

url: A link related to author. People who clicks on the author name would be taken to this url.

avatar: A link to author’s picture, which could be used in post page.

Post

The way to create a new blog post is: blog/<post-dir>/index.md.

If there is any image associated with the post then it must be added to the same <post-dir>. See the below example structure.

src/content/blog/
├── wild-elephants
│   ├── an-elephant.png
│   └── index.md
├── how-to-survive-in-forest
│   ├── waterfall.gif
│   ├── birds.gif
│   ├── lake.gif
│   └── index.md
├── trees
│   └── index.md
└── authors.json

index.md would contain frontmatter and the blog post content.