https://github.com/scott-the-programmer/blog-api
A homebrewed CMS for my website
https://github.com/scott-the-programmer/blog-api
Last synced: 12 months ago
JSON representation
A homebrewed CMS for my website
- Host: GitHub
- URL: https://github.com/scott-the-programmer/blog-api
- Owner: scott-the-programmer
- License: gpl-3.0
- Created: 2025-06-04T12:34:24.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-08T02:11:34.000Z (about 1 year ago)
- Last Synced: 2025-06-08T02:39:31.380Z (about 1 year ago)
- Language: Go
- Size: 45.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Blog API
A simple Go API that serves blog posts from markdown files.
## Quick Start
```bash
make deps # Install dependencies
make run # Start the API at http://localhost:8080
```
## Makefile Commands
| Command | Description |
| -------------------- | ------------------------------ |
| `make help` | Show all available commands |
| `make run` | Run the application |
| `make build` | Build the application binary |
| `make test` | Run unit tests |
| `make test-e2e` | Run end-to-end tests |
| `make test-all` | Run all tests |
| `make test-coverage` | Run tests with coverage report |
| `make fmt` | Format code |
| `make vet` | Vet code |
| `make lint` | Run linter |
| `make clean` | Clean build artifacts |
| `make watch` | Watch for changes and rebuild |
## Writing Posts
Create `.md` files in the `posts/` directory with YAML frontmatter:
```yaml
---
title: "Your Post Title"
date: "2025-06-05"
tags: ["tag1", "tag2"]
excerpt: "Brief description"
---
# Your content here
```
## API Endpoints
- `GET /` - API info
- `GET /posts` - List all posts
- `GET /posts/:slug` - Get specific post
- `GET /health` - Health check
- `GET /rss` - RSS feed