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:
16
lib/config.mjs
Normal file
16
lib/config.mjs
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user