- 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>
17 lines
357 B
JavaScript
17 lines
357 B
JavaScript
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;
|
|
}
|