feat: add blog system with static site generator
- Add blog posts in Markdown (_posts/) - Build script converts MD to HTML at container build time - First posts: building with AI lessons, quick start guide - AGENTS.md documents blog writing style (unixsheikh-inspired)
This commit is contained in:
120
www/AGENTS.md
Normal file
120
www/AGENTS.md
Normal file
@@ -0,0 +1,120 @@
|
||||
# DearDiary Website & Blog - Agent Instructions
|
||||
|
||||
## Overview
|
||||
|
||||
The DearDiary website is a static HTML site generated from Markdown blog posts. No frameworks, no build complexity.
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
www/
|
||||
├── _posts/ # Blog posts in Markdown (source)
|
||||
│ └── YYYY-MM-DD-slug.md
|
||||
├── blog/ # Generated HTML (don't edit manually)
|
||||
│ ├── index.html
|
||||
│ └── YYYY-MM-DD-slug/
|
||||
│ └── index.html
|
||||
├── css/
|
||||
│ └── styles.css
|
||||
├── docs/ # Documentation (also static HTML)
|
||||
├── js/
|
||||
│ └── main.js
|
||||
├── index.html # Main website (uses envsubst for templating)
|
||||
├── build-blog.js # Blog generator script
|
||||
└── package.json # npm deps (gray-matter for parsing)
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
```bash
|
||||
cd www
|
||||
npm install
|
||||
node build-blog.js
|
||||
```
|
||||
|
||||
This converts `_posts/*.md` → `blog/*.html`.
|
||||
|
||||
## Blog Post Format
|
||||
|
||||
Frontmatter:
|
||||
```yaml
|
||||
---
|
||||
title: Your Post Title
|
||||
date: 2026-03-27
|
||||
author: Konrad Lother
|
||||
excerpt: One sentence summary for the blog index
|
||||
---
|
||||
```
|
||||
|
||||
## Tone & Style Guide
|
||||
|
||||
Read unixsheikh.com for inspiration. Key characteristics:
|
||||
|
||||
### Voice
|
||||
- **Direct and authoritative** - Say what you mean, don't hedge unnecessarily
|
||||
- **Personal opinion is welcome** - Write from a first-person perspective
|
||||
- **Technical but accessible** - Explain complex topics simply
|
||||
- **Not afraid to be contrarian** - Challenge conventional wisdom when you disagree with it
|
||||
|
||||
### Structure
|
||||
- **Strong opening** - Hook the reader immediately
|
||||
- **Clear sections** - Use headers to organize thoughts
|
||||
- **Concrete examples** - Illustrate abstract concepts
|
||||
- **Practical takeaways** - End with actionable advice
|
||||
|
||||
### What to Avoid
|
||||
- Corporate/tech-blog speak ("leverage", "synergy", "cutting-edge")
|
||||
- Unnecessary hedging ("might", "could potentially", "in some cases")
|
||||
- Padding or fluff - every sentence should add value
|
||||
- Being mean-spirited - critique ideas, not people
|
||||
|
||||
### Example Openers
|
||||
|
||||
Bad:
|
||||
> "In today's fast-paced digital world, journaling has evolved..."
|
||||
|
||||
Good:
|
||||
> "Traditional journaling apps ask you to write long entries at the end of the day. But let's be honest - who has time for that?"
|
||||
|
||||
### Length
|
||||
- 500-1500 words is ideal
|
||||
- If you're writing more, consider splitting into multiple posts
|
||||
- Short posts can be 200-300 words if the idea is complete
|
||||
|
||||
## Topics to Cover
|
||||
|
||||
### DearDiary-Specific
|
||||
- How to use features effectively
|
||||
- Tips and tricks for better journaling
|
||||
- Behind-the-scenes development stories
|
||||
- Why AI-assisted journaling makes sense
|
||||
- Privacy and self-hosting benefits
|
||||
|
||||
### General Tech Thoughts
|
||||
- Software craftsmanship
|
||||
- Human-AI collaboration
|
||||
- Simplicity in development
|
||||
- Critical thinking about tech trends
|
||||
- The value of boring technology
|
||||
|
||||
### Personal/Philosophy
|
||||
- Productivity and reflection
|
||||
- Memory and identity
|
||||
- The importance of记录 (record-keeping)
|
||||
- Learning from daily life
|
||||
|
||||
## Post Ideas
|
||||
|
||||
1. Why capture events, not essays (the thesis behind DearDiary)
|
||||
2. My journaling experiment - 30 days of DearDiary
|
||||
3. What I learned building an app with AI
|
||||
4. The case for boring technology in side projects
|
||||
5. How to remember your life better
|
||||
6. Self-hosting isn't hard, it's just unfamiliar
|
||||
|
||||
## Technical Notes
|
||||
|
||||
- The `build-blog.js` uses a simple regex-based Markdown converter
|
||||
- For full Markdown support (tables, footnotes), consider using a proper parser
|
||||
- Images should be hosted externally or added to the repo
|
||||
- Code blocks work but syntax highlighting is limited
|
||||
Reference in New Issue
Block a user