MCPcopy Create free account
hub / github.com/danja/dogalog / template

Function template

scripts/build-docs.mjs:19–31  ·  view source on GitHub ↗
(title, body)

Source from the content-addressed store, hash-verified

17const outputDir = path.resolve(__dirname, '..', 'public', 'docs');
18
19const template = (title, body) => `<!doctype html>
20<html lang="en">
21<head>
22 <meta charset="UTF-8" />
23 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
24 <title>${title}</title>
25 <link rel="stylesheet" href="docs.css" />
26</head>
27<body>
28${body}
29</body>
30</html>
31`;
32
33await mkdir(outputDir, { recursive: true });
34await copyFile(path.join(docsDir, 'docs.css'), path.join(outputDir, 'docs.css'));

Callers 1

build-docs.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected