MCPcopy Create free account
hub / github.com/Drakkar-Software/OctoBot / buildFrontmatter

Function buildFrontmatter

docs/scripts/sync-root-docs.mjs:42–52  ·  view source on GitHub ↗
(meta)

Source from the content-addressed store, hash-verified

40];
41
42function buildFrontmatter(meta) {
43 const lines = ['---'];
44 lines.push(`title: "${escapeYaml(meta.title)}"`);
45 lines.push(`description: "${escapeYaml(meta.description)}"`);
46 lines.push(`keywords: [${meta.keywords.map(k => `"${k}"`).join(', ')}]`);
47 lines.push(`slug: ${meta.slug}`);
48 lines.push(`sidebar_position: ${meta.sidebar_position}`);
49 lines.push('format: md');
50 lines.push('---');
51 return lines.join('\n');
52}
53
54/** Adapt relative links to work within the docs site or fall back to GitHub URLs. */
55function adaptLinks(content) {

Callers 1

mainFunction · 0.85

Calls 4

escapeYamlFunction · 0.90
mapMethod · 0.80
pushMethod · 0.65
joinMethod · 0.45

Tested by

no test coverage detected