Blog Posts Directory
This directory contains all blog posts as Markdown files.
Adding a New Blog Post
- Create a new
.mdfile in this directory with a URL-friendly slug (e.g.,my-new-post.md) - Add frontmatter at the top of the file with the following fields:
---
title: "Your Post Title"
excerpt: "A short description that appears in blog listings"
date: "2024-12-15" # Format: YYYY-MM-DD
category: "Treatment" # Options: Treatment, Identification, Prevention, Education, Cost
author: "Midwest Bed Bug Services"
image: "/images/blog/your-image.jpg" # Optional
published: true # Set to false to hide from public (draft mode)
---
Your blog post content in Markdown format...
Frontmatter Fields
- title (required): The post title
- excerpt (required): Short description for listings
- date (required): Publication date (YYYY-MM-DD format)
- category (required): One of: Treatment, Identification, Prevention, Education, Cost
- author (optional): Defaults to "Midwest Bed Bug Services"
- image (optional): Path to featured image
- published (optional): Set to
falseto create a draft (won't appear on site)
Markdown Support
You can use standard Markdown syntax:
- Headers (# ## ###)
- Bold and italic text
- Lists (ordered and unordered)
- Links and images
- Code blocks
Automation Options
Option 1: Manual (Current)
Just add a .md file to this directory and commit to GitHub. Vercel will automatically rebuild.
Option 2: GitHub Actions
Set up a GitHub Action that:
- Watches for new
.mdfiles - Validates frontmatter
- Auto-deploys
Option 3: CMS Integration
Connect a headless CMS (Contentful, Sanity, Strapi) that writes markdown files to this directory via API/webhook.
Option 4: Admin Interface
Use tools like:
- Forestry.io
- Netlify CMS
- Decap CMS (formerly Netlify CMS)
These provide a web interface to edit markdown files directly in your repo.
