Docs: more tweaks to the documentation script, link to the new documentation site from MapComplete

This commit is contained in:
Pieter Vander Vennet 2025-10-08 10:07:45 +02:00
parent 4db64f7a6f
commit 8198bd9742
2 changed files with 3 additions and 6 deletions

View file

@ -748,7 +748,7 @@ export class GenerateDocs extends Script {
const allFiles = ScriptUtils.readDirRecSync("./Docs/" + subdirectory) const allFiles = ScriptUtils.readDirRecSync("./Docs/" + subdirectory)
.filter(path => path.endsWith(".md")) .filter(path => path.endsWith(".md"))
.filter(path => !path.startsWith("_")) .filter(path => !path.startsWith("_"))
.filter(path => !path.startsWith("./Docs/nl/") || path.startsWith("./Docs/" + subdirectory)) .filter(path => !path.startsWith("./Docs/nl/") || (path.startsWith("./Docs/" + subdirectory) && subdirectory !== ""))
.map(path => path.substring("./Docs/".length + subdirectory.length + 1)) .map(path => path.substring("./Docs/".length + subdirectory.length + 1))
const perDirectory = new Map<string, string[]>() const perDirectory = new Map<string, string[]>()
@ -775,9 +775,6 @@ export class GenerateDocs extends Script {
} }
} }
perDirectory.delete("nl")
// The directories to run over: // The directories to run over:
const directories: [string, Translation | string][] = [ const directories: [string, Translation | string][] = [
["", ""], ["", ""],
@ -852,7 +849,7 @@ export class GenerateDocs extends Script {
} else { } else {
name = (<ThemeConfig>layer).title name = (<ThemeConfig>layer).title
} }
layerinfo.push([`[${id}](./Layers/${id})`, name.textFor(subdir), (layer["shortDescription"] ?? layer.description)?.textFor(subdir)]) layerinfo.push([`[${id}](./${type}/${id})`, name.textFor(subdir), (layer["shortDescription"] ?? layer.description)?.textFor(subdir)])
} }
const titles = { const titles = {

View file

@ -118,7 +118,7 @@
{#if theme.official} {#if theme.official}
<a <a
class="flex" class="flex"
href={"https://source.mapcomplete.org/MapComplete/MapComplete/src/branch/develop/Docs/Themes/" + href={"https://docs.mapcomplete.org/#/Themes/" +
theme.id + theme.id +
".md"} ".md"}
target="_blank" target="_blank"