Add sci-fi blog design and RSS feed

This commit is contained in:
hbrain 2026-05-16 08:59:23 +00:00
parent b7e417636e
commit 04e10a57ce
4 changed files with 173 additions and 35 deletions

View file

@ -4,7 +4,7 @@ Cron-friendly Home Assistant observer:
- every 30 minutes: collect compact Home Assistant snapshots into `./data`
- every day at 05:00: send the last day of snapshots to AI
- publish a funny local blog at `./web/index.html` with daily article archive links
- publish a funny local blog with daily article archive links
- save Markdown AI reports in `./reports`
## Setup
@ -105,12 +105,26 @@ Run the 05:00-style analysis/publishing step:
Open the blog served by nginx:
```text
http://localhost/haobserver/
http://localhost/
```
Daily articles are written under `web/articles/YYYY-MM-DD.html`, and `index.html` links to the archive. New articles include context from previous reports from the last `ARTICLE_CONTEXT_DAYS` days.
This instance publishes to the web root with:
This uses a symlink from `/var/www/html/haobserver` to the project's `./web` directory.
```bash
WEB_DIR="/var/www/html"
SITE_BASE_PATH="/"
SITE_URL="http://piagent"
```
For a subdirectory install, use for example:
```bash
WEB_DIR="/var/www/html/haobserver"
SITE_BASE_PATH="/haobserver"
SITE_URL="http://piagent"
```
Daily articles are written under `articles/YYYY-MM-DD.html` inside `WEB_DIR`, and `index.html` links to the archive. An RSS feed is published at `rss.xml`, and a sci-fi favicon is published at `favicon.svg`. New articles include context from previous reports from the last `ARTICLE_CONTEXT_DAYS` days.
## Install cron jobs
@ -135,8 +149,7 @@ Manual crontab equivalent:
```text
/home/hbrain/haobserver/data/ 30-minute JSON snapshots
/home/hbrain/haobserver/reports/ daily Markdown AI reports
/home/hbrain/haobserver/web/ local funny blog, index.html and articles/*.html
/var/www/html/haobserver symlink to web/ for nginx
/var/www/html/ local funny blog, index.html, rss.xml, favicon.svg, and articles/*.html
/home/hbrain/haobserver/cron.log cron logs
```