mirror of
https://github.com/waynesutton/markdown-site.git
synced 2026-01-12 04:09:14 +00:00
3.0 KiB
3.0 KiB
description
| description |
|---|
| Content management guide |
Content Management Guide
How to manage content in the markdown publishing framework.
Content locations
| Type | Location | Purpose |
|---|---|---|
| Blog posts | content/blog/*.md |
Time-based articles |
| Pages | content/pages/*.md |
Static pages |
| Raw files | public/raw/*.md |
Generated static copies |
| Images | public/images/ |
Static images |
Creating content
New blog post
- Create file:
content/blog/my-post.md - Add required frontmatter:
--- title: "My Post Title" description: "SEO description" date: "2025-01-15" slug: "my-post" published: true tags: ["topic"] --- - Write content in markdown
- Run
npm run sync - View at
localhost:5173/my-post
New page
- Create file:
content/pages/my-page.md - Add required frontmatter:
--- title: "My Page" slug: "my-page" published: true --- - Write content
- Run
npm run sync - View at
localhost:5173/my-page
Special pages
| Slug | Purpose |
|---|---|
home-intro |
Homepage intro content |
footer |
Footer content |
These render in special locations. Set showInNav: false to hide from navigation.
Content workflow
Write markdown --> npm run sync --> Convex DB --> Site
Development
- Edit markdown files
- Run
npm run sync - View changes at
localhost:5173
Production
- Edit markdown files
- Run
npm run sync:prod - View changes on production site
Images
Local images
Place in public/images/ and reference:

External images
Use full URLs:

Image in frontmatter
image: "/images/og-image.png"
showImageAtTop: true
Markdown features
Code blocks
```typescript
const example = "code";
```
Tables
| Header | Header |
|--------|--------|
| Cell | Cell |
Links
[Link text](/internal-path)
[External](https://example.com)
Headings
# H1 (demoted to H2 in posts)
## H2
### H3
Docs section
To add content to the docs sidebar:
docsSection: true
docsSectionGroup: "Group Name"
docsSectionOrder: 1
Unlisted content
To hide from listings but keep accessible:
published: true
unlisted: true
Draft content
To hide completely:
published: false
Import from URL
npm run import https://example.com/article
npm run sync
Export from Dashboard
npm run export:db # Dev
npm run export:db:prod # Prod
Exports dashboard-created content to markdown files.
Best practices
- Unique slugs - Every post/page needs a unique slug
- SEO descriptions - Keep under 160 characters
- Tags - Use consistent tag names
- Images - Optimize before uploading
- Sync after changes - Always run sync