ProWrite logoHamburger menu
Get ProWrite
Hamburger menu

Using Local Data

Following are the instructions to use local data as content source:

Creating an Article

  1. Set the environment variable CONTENT_SOURCE to local.
  2. Duplicate an existing .mdx file in the /content/articles directory.
  3. Rename the file using the article slug (e.g., my-first-article.mdx).
  4. 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.
  5. Replace the existing content with your article content.
  6. In the /public/articles directory, create a folder matching the article slug (e.g., my-first-article).
  7. 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

  1. Open the author.ts file in the /content directory.
  2. Update the authors array to add, update, and delete an author.