Add Gitea markdown rendering and Edit/Preview tabs

- New /api/render-markdown proxy to Gitea (configured via config.yaml)
- lib/config.mjs loads config.yaml with yaml-js
- Edit/Preview tabs on the body field in the task dialog
- Title and body rendered as markdown inline in the task list
- Gitea markup+chroma CSS extracted and vendored to public/gitea-markup.css
- Markdown cached in memory per text string

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-17 18:19:29 +00:00
parent 1100720b03
commit 444b51794a
12 changed files with 369 additions and 12 deletions

16
lib/config.mjs Normal file
View File

@@ -0,0 +1,16 @@
import * as fs from 'node:fs';
import yaml from 'yaml-js';
let _config = null;
export function get_config() {
if (_config !== null) { return _config; }
try {
const content = fs.readFileSync('./config.yaml', 'utf-8');
_config = yaml.load(content);
} catch (e) {
if (e.code === 'ENOENT') { _config = {}; }
else { throw e; }
}
return _config;
}