Using Local Data
Following are the instructions to use local data as content source:
Creating an Article
- Set the environment variable
CONTENT_SOURCE
to local. - Duplicate an existing
.mdx
file in the/content/articles
directory. - Rename the file using the article slug (e.g.,
my-first-article.mdx
). - Update the following article data:
- title: The article's title.
- excerpt: A summary of the article.
- author: The article's author.
- category: The article category.
- isFeatured: Set to either true or false.
- readingTime: The article reading time (200-250 WPM).
- status: Set to either Draft or Published.
- updatedAt: The last updated date.
- Replace the existing content with your article content.
- In the
/public/articles
directory, create a folder matching the article slug (e.g.,my-first-article
). - Place a
cover-image.png
in this folder to be used as the article's cover and OG image.
Note: When you update the article slug, make sure to update the corresponding folder name in the /content/articles
directory.
Creating and Updating an Author
- Open the
author.ts
file in the/content
directory. - Update the
authors
array to add, update, and delete an author.