Skip to content

Commit 05b43a7

Browse files
committed
Blog infrastructure + first post
1 parent 1281817 commit 05b43a7

58 files changed

Lines changed: 5857 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: pages
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build-and-deploy:
18+
runs-on: ubuntu-latest
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
- name: Setup Bun
26+
uses: oven-sh/setup-bun@v2
27+
- name: Install dependencies
28+
run: bun install --frozen-lockfile
29+
- name: Run checks
30+
run: bun run check
31+
- name: Build site
32+
run: bun run build
33+
- name: Configure Pages
34+
uses: actions/configure-pages@v5
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v3
37+
with:
38+
path: dist
39+
- name: Deploy to GitHub Pages
40+
id: deployment
41+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# output
2+
dist
3+
tests/tmp-*
4+
5+
# temporary files dir
6+
tmp
7+
8+
# dependencies
9+
node_modules
10+
11+
# Local agent/Claude files with personal context
12+
*.local.md
13+
.claude/
14+
15+
# Obsidian config
16+
.obsidian/
17+
18+
# Finder (MacOS) folder config
19+
.DS_Store

AGENTS.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# AI Agent Guidelines
2+
3+
## Key References
4+
5+
- @CONTRIBUTING.md for development workflow
6+
- @README.md for project philosophy and purpose
7+
8+
## Communication Style
9+
10+
- No emoji in responses or generated content (exception: CLI output is fine)
11+
- No marketing language (avoid: "comprehensive", "robust", "cutting-edge", "streamlined", etc.)
12+
- Be concise - this applies to responses AND generated documents
13+
- Direct, technical communication without fluff
14+
15+
## Working on this Codebase
16+
17+
- Always read files before modifying them
18+
- Run `bun run check` before proposing changes
19+
- Use todo lists for multi-step tasks
20+
- Tests are required for new features
21+
22+
## Project Context
23+
24+
- Personal blog, not a product
25+
- Owner is sole user (optimize for that)
26+
- Simplicity over features
27+
28+
## Decision-Making
29+
30+
- When in doubt, ask for clarification
31+
- Don't add frameworks or dependencies without explicit request
32+
- Fix ALL warnings, not just errors
33+
34+
## Common Pitfalls to Avoid
35+
36+
- Don't over-engineer
37+
- Don't add features "for the future"
38+
- Don't skip type checking
39+
- Don't ignore lint warnings
40+
- Don't create unnecessary abstractions

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENTS.md

CONTRIBUTING.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Contributing
2+
3+
## Quick Start
4+
5+
```bash
6+
bun install
7+
bun run dev # Start dev server with hot reload
8+
bun test # Run tests
9+
```
10+
11+
**Runtime Management (Optional):**
12+
This project uses [Mise](https://mise.jdx.dev/) to pin the Bun version. If you have Mise installed, it will automatically use the correct Bun version from `mise.toml`. Otherwise, just install Bun directly.
13+
14+
## Project Structure
15+
16+
- `src/` - Build scripts and core logic
17+
- `posts/` - Blog post markdown files
18+
- `templates/` - HTML templates for rendering
19+
- `static/` - CSS and static assets
20+
- `tests/` - Test fixtures
21+
- `dist/` - Generated static site (gitignored)
22+
- `public/` - Files copied to dist root without hashing (CNAME, favicons)
23+
24+
Tests live next to source files as `*.test.ts`.
25+
26+
**Content editing:** Posts and pages are edited in Obsidian with the [Linter plugin](https://github.com/platers/obsidian-linter) for consistent markdown formatting. Config is in `.obsidian/` (gitignored).
27+
28+
## Code Quality Standards
29+
30+
Before committing, run:
31+
32+
```bash
33+
bun run check # Run all checks (typecheck + lint + test)
34+
```
35+
36+
Individual commands:
37+
```bash
38+
bun run typecheck # Type checking only
39+
bun run lint # Linting only
40+
bun run lint:fix # Auto-fix linting issues (--write)
41+
bun test # Tests only
42+
```
43+
44+
For unsafe fixes (use with caution):
45+
```bash
46+
biome check . --write --unsafe
47+
```
48+
49+
Requirements:
50+
- All warnings must be fixed (not just errors)
51+
- Tests required for new features
52+
- Formatting: tabs for code, 2 spaces for JSON
53+
54+
## Coding Standards
55+
56+
- **DRY:** Don't repeat yourself. Extract common logic into reusable functions
57+
- **Important code first:** Put the most important logic at the top of files
58+
- **Use `type` over `interface`:** Prefer `type` for type definitions
59+
- **Never use `any`:** Always provide proper types. Use `unknown` if type is truly unknown
60+
- **Use JSDoc for documentation:** Add JSDoc comments to document functions and complex logic. Omit type annotations (TypeScript handles that)
61+
62+
## Testing
63+
64+
- Tests use Bun's built-in test runner
65+
- Tests are colocated with source files
66+
67+
## Architecture Decisions
68+
69+
**Simple template replacement:** Uses string replacement instead of a templating framework. Fast, predictable, no dependencies.
70+
71+
**Draft filtering:** Posts with `draft: true` in frontmatter are filtered out during build.
72+
73+
## Common Tasks
74+
75+
**Add a new post:**
76+
```bash
77+
# Create posts/YYYY-MM-DD-slug.md with frontmatter
78+
# Set draft: false to publish
79+
bun run build
80+
```
81+
82+
**Modify templates:**
83+
- Edit files in `templates/`
84+
- Templates use `{{VARIABLE}}` placeholders
85+
- Dev server auto-rebuilds on changes
86+
87+
**Add a new build step:**
88+
- Edit `src/build.ts`
89+
- Export functions for testability
90+
- Add tests in `src/build.test.ts`
91+
92+
## What NOT to Do
93+
94+
- Don't over-engineer
95+
- Don't add frameworks
96+
- Don't skip warnings
97+
- Don't commit without running checks
98+
99+
## Philosophy
100+
101+
Pain-driven development. Keep it simple. Fast builds over features.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Avi Duda
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# aviraccoon's nocturnal scribbles
2+
3+
Personal blog at [raccoon.land](https://raccoon.land/).
4+
5+
Late-night thoughts on ADHD, dev tools, self-hosting, and whatever else keeps me up.
6+
7+
## What it is
8+
9+
A custom static site generator built with Bun and TypeScript. Markdown files in git become static HTML with no framework, minimal JavaScript, and no tracking.
10+
11+
## Why custom-built
12+
13+
- Full control over content and infrastructure
14+
- Built when the need became urgent
15+
- Wanted something simple and maintainable
16+
- Pain-driven development
17+
18+
## How it works
19+
20+
- Markdown files with frontmatter → static HTML
21+
- Simple template replacement (no templating engine)
22+
- Draft support via `draft: true` in frontmatter
23+
- File watching dev server with auto-rebuild
24+
- Fast builds, minimal complexity
25+
26+
## Features
27+
28+
- RSS feeds
29+
- Tag system
30+
- Draft posts
31+
- No analytics
32+
- No tracking
33+
- No comments
34+
- All content portable (just markdown in git)
35+
36+
## Philosophy
37+
38+
Pain-driven development. Keep it simple. Fast builds over features. Data ownership matters.
39+
40+
## Usage
41+
42+
```bash
43+
bun install
44+
bun run dev # Dev server with hot reload
45+
bun run build # Build static site
46+
bun run check # Run tests, lint, typecheck
47+
```
48+
49+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development details.
50+
51+
## Tech Stack
52+
53+
- Bun (runtime + test runner)
54+
- TypeScript
55+
- Marked (markdown parsing)
56+
- Gray-matter (frontmatter)
57+
- date-fns (date formatting)
58+
- Biome (linting + formatting)
59+
60+
## License
61+
62+
MIT

biome.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"includes": [
10+
"**",
11+
"!!dist",
12+
"!!templates",
13+
"!!node_modules",
14+
"!!.claude",
15+
"!!.obsidian",
16+
"!!**/tests/tmp-*"
17+
]
18+
},
19+
"formatter": {
20+
"enabled": true,
21+
"indentStyle": "tab"
22+
},
23+
"linter": {
24+
"enabled": true,
25+
"rules": {
26+
"recommended": true
27+
}
28+
},
29+
"javascript": {
30+
"formatter": {
31+
"quoteStyle": "double"
32+
}
33+
},
34+
"json": {
35+
"formatter": {
36+
"indentStyle": "space",
37+
"indentWidth": 2
38+
}
39+
}
40+
}

0 commit comments

Comments
 (0)