Setup Guide
Getting Started
Welcome to the Setient website setup guide. This page will help you configure your environment for development and testing.
The website includes a blog system that uses GitHub as a content repository. You can either connect to your own GitHub repository or use the built-in sample posts for testing.
Environment Variables Setup
To connect to your GitHub repository for blog posts, you need to set up the following environment variables:
# GitHub Blog Configuration GITHUB_TOKEN=your_github_personal_access_token REPO_OWNER=your_github_username REPO_NAME=your_blog_repo_name
Note: For testing purposes, the blog will display sample posts if these environment variables are not set.
- Create a GitHub Personal Access Token with repo scope
- Create a
.env.local
file in your project root - Add the variables above with your values
- Restart your development server
Blog Structure
Your blog posts should be stored in the content/blog
directory of your GitHub repository. Each post should be an MDX file with the following frontmatter structure:
--- title: Your Post Title date: 2023-11-15 excerpt: A brief summary of your post. author: name: Your Name avatar: /path/to/avatar.jpg --- # Your Post Content Write your post content here using Markdown syntax.
The blog system will automatically parse the frontmatter and display your posts on the blog page.
Testing Mode
If you don't set up the GitHub environment variables, the blog will automatically use sample posts for testing. This allows you to develop and test the website without connecting to a GitHub repository.
To switch to testing mode, simply don't set the environment variables or set NODE_ENV=test
.