Need a custom feature? We can help!
Blog Configuration
StartupFast comes with a blog system preconfigured, it uses markdown to create blog posts and JSON to manage authors, this lead to a robust yet fast system to build your blog. It is already SEO optimized so you can focus on writing your posts.
Directories Structure
Under the root of your app you will find the content/blog
folder, his purpose is to manage your blog posts and authors.
content/
blog/
posts/ # Blog posts in .md format
authors.json # Author informations
Creating Blog Posts
- Create a new markdown file in
content/blog/posts/
with the formatyour-post-slug.md
- Add the following frontmatter at the top of your markdown file:
1--- 2title: Your Post Title 3description: A brief description of your post 4date: 2024-01-15 # Use YYYY-MM-DD format 5category: Development # Choose or create a category 6author: John Doe # Must match an author in authors.json 7tags: ["tag1", "tag2"] # Optional array of tags 8image: /images/your-post-image.jpg # Optional featured image 9--- 10 11Your markdown content goes here...
Post Fields Explained
title
: The main title of your blog postdescription
: A brief summary that appears in listings and meta tagsdate
: Publication date in YYYY-MM-DD formatcategory
: The main category for the postauthor
: Must match an author name from authors.jsontags
: Optional array of related topicsimage
: Optional featured image path (relative to public directory)
Managing Authors
Authors are managed in content/blog/authors.json
. The file should contain an object where each key is the lowercase version of the author's name:
1{ 2 "john doe": { 3 "name": "John Doe", 4 "description": "Senior Developer at StartupFast", 5 "avatar": "/images/authors/john-doe.jpg" 6 }, 7 "jane smith": { 8 "name": "Jane Smith", 9 "description": "Product Manager & Technical Writer", 10 "avatar": "/images/authors/jane-smith.jpg" 11 } 12}
Author Fields
name
: The display name of the authordescription
: A brief bio that appears on the author's pageavatar
: Path to the author's profile image (relative to public directory)
Categories
Categories are automatically generated from the category
field in your blog posts. To create a new category, simply use it in a post's frontmatter. The system will:
- Create a category page at
/blog/category/[category-name]
- Add it to the category list on the blog homepage
- Include it in the sitemap if enabled
URLs and Routing
The blog system creates the following routes automatically:
- Blog homepage:
/blog
- Individual posts:
/blog/[slug]
- Category pages:
/blog/category/[category-name]
- Author pages:
/blog/author/[author-name]
Images
- Place your images in the
public/images/
directory - Reference them in your markdown using relative paths:
- Post images:
![Alt text](/images/your-image.jpg)
- Author avatars: Use the full path in authors.json
- Post images:
SEO Optimization
The blog system automatically handles:
- Meta tags for posts, categories, and author pages
- OpenGraph tags for social sharing
- Article schema markup
- Sitemap generation for all blog content
Markdown Features
Your blog posts support:
- Standard markdown syntax
- GitHub Flavored Markdown (GFM)
- Code syntax highlighting
- Tables
- Raw HTML when needed
Example code block with syntax highlighting:
1```javascript 2const example = "This will be highlighted"; 3console.log(example); 4```
Related Posts
The system automatically shows related posts:
- On individual post pages, it shows other posts from the same category
- Posts are sorted by date, with newest first
- Related posts include thumbnails and publication dates
Pagination
The blog includes built-in pagination:
- Main blog page: 6 posts per page
- Category pages: 6 posts per page
- Author pages: 6 posts per page
Best Practices
-
Images
- Optimize images before uploading
- Use descriptive file names
- Include alt text for accessibility
-
Content
- Write clear, descriptive titles
- Include a meaningful description
- Use appropriate categories and tags
- Keep URLs (slugs) short and meaningful
-
Authors
- Use consistent author names across posts
- Provide high-quality author avatars
- Write engaging author bios
-
Categories
- Use broad, clear category names
- Be consistent with category naming
- Don't create too many categories