Markdown Blog System
This directory contains all blog posts in markdown format. The Next.js application automatically reads and serves these files.
๐ How It Works
- Markdown Files: Each blog post is a
.mdfile in this directory - Frontmatter: Post metadata is defined at the top of each file
- Content: The rest of the file is markdown content
- Auto-Generation: Next.js reads these files at build time and generates pages
โ๏ธ Adding a New Blog Post
Step 1: Create a New File
Create a new .md file in this directory. Use a URL-friendly filename (this becomes the slug):
# Example filenames
my-new-blog-post.md
property-market-update-2025.md
rental-investment-tips.md
Step 2: Add Frontmatter
At the top of your file, add frontmatter with metadata:
---
title: "Your Blog Post Title"
slug: "your-blog-post-slug"
excerpt: "A short description of your post (max 160 characters for SEO)"
publishedAt: "2025-01-20"
category: "Property Tips"
author: "Rack Team"
metaTitle: "SEO Title (optional, max 60 chars)"
metaDescription: "SEO description (optional, max 160 chars)"
---
Available Categories:
Property Tips- General property tips and guidesRental Market- Rental market insightsMarket Analysis- Market analysis and data
Step 3: Write Your Content
After the frontmatter, write your content using markdown:
## Main Heading
Your introduction paragraph goes here.
### Subheading
More content with **bold text** and *italic text*.
- Bullet point 1
- Bullet point 2
- Bullet point 3
## Another Section
1. Numbered list item
2. Another item
3. Final item
> This is a quote or callout. It will be styled differently.
Regular paragraph text with [a link](https://example.com).
Step 4: Save and Deploy
- Save your file
- The Next.js app will automatically pick it up
- Deploy to see your changes live
๐ Markdown Syntax Guide
Headings
## H2 Heading (Main Sections)
### H3 Heading (Subsections)
Text Formatting
**Bold text**
*Italic text*
~~Strikethrough~~
`inline code`
Lists
Bullet list:
- Item 1
- Item 2
- Item 3
Numbered list:
1. First
2. Second
3. Third
Quotes/Callouts
> This is a quote. Use it for important callouts or key takeaways.
Links
[Link text](https://example.com)
Images (if needed)

๐จ Styling Best Practices
- Keep it simple: Focus on content, the styling is handled automatically
- Use headings hierarchically: H2 for main sections, H3 for subsections
- Break up content: Use lists, quotes, and short paragraphs
- Be consistent: Follow the same structure as existing posts
๐ URLs
Your blog posts will be available at:
- Blog listing:
/blog-md - Individual posts:
/blog-md/your-slug
๐ Example Post Structure
---
title: "How to Choose the Right Investment Property"
slug: "choose-right-investment-property"
excerpt: "Learn the key factors to consider when selecting an investment property that delivers strong returns."
publishedAt: "2025-01-20"
category: "Property Tips"
author: "Rack Team"
---
Introduction paragraph that hooks the reader and explains what they'll learn.
## Key Factor 1: Location
Detailed explanation of location importance...
### Proximity to Amenities
More specific details...
## Key Factor 2: Property Type
Content about different property types...
### Apartments vs Houses
Comparison details...
## Key Factor 3: Financial Considerations
Budget and finance information...
- Cash flow projections
- Capital growth potential
- Tax implications
> Key takeaway: Always do your research before investing in property.
## Conclusion
Summary paragraph wrapping up the main points.
๐ง Technical Details
File Location
- Blog posts:
/content/blogs/*.md - Parser:
/src/lib/markdown.ts - Pages:
/src/app/blog-md/
Build Process
- Next.js reads all
.mdfiles from this directory - Parses frontmatter using
gray-matter - Converts markdown to HTML using
remark - Generates static pages at build time
Live Editing
During development (pnpm dev), changes to markdown files will be reflected after saving and refreshing the page.
๐ Existing Posts
The following posts are already available:
- 10 Ways to Win More Property Listings in 2025
- The Ultimate Guide to Rental Appraisals for Property Managers
- How to Build Trust with Vendors: A Guide for Real Estate Agents
- Understanding Property Reports: What Every Agent Should Know
- 5 Marketing Strategies That Actually Work for Real Estate Agents
๐ Deployment
When you commit and push changes:
- New/updated posts are automatically included
- Static pages are regenerated during build
- SEO metadata is updated
- Sitemap is refreshed
๐ก Tips for Great Blog Posts
- Target your audience: Write for real estate agents and property managers
- Be actionable: Provide practical tips, not just theory
- Use data: Back up claims with examples and statistics
- Optimize for SEO: Use keywords naturally in title, excerpt, and content
- Break it up: Use headings, lists, and quotes for readability
- End with value: Always provide a clear takeaway or call-to-action
๐ Troubleshooting
Post not appearing?
- Check the filename has
.mdextension - Verify frontmatter is properly formatted (valid YAML)
- Ensure
publishedAtdate is not in the future - Restart the dev server
Formatting issues?
- Verify markdown syntax is correct
- Check for unmatched quotes in frontmatter
- Ensure there's a blank line between frontmatter and content
SEO not working?
- Add
metaTitleandmetaDescriptionto frontmatter - Keep titles under 60 characters
- Keep descriptions under 160 characters