Using Local Data
Following are the instructions to use local data as content source:
Creating an Article
- Set the environment variable
CONTENT_SOURCEto local. - Duplicate an existing
.mdxfile in the/content/articlesdirectory. - 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/articlesdirectory, create a folder matching the article slug (e.g.,my-first-article). - Place a
cover-image.pngin 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.tsfile in the/contentdirectory. - Update the
authorsarray to add, update, and delete an author.
