@gitpagedocs/cli 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/builders/config-orchestrator.mjs +2 -1
- package/builders/version-config-builder.mjs +59 -8
- package/content/assets/gitpagedocs-project-guide.pdf +34 -34
- package/content/configuration-examples.mjs +76 -0
- package/content/content-blocks.mjs +142 -0
- package/content/docs-en.mjs +73 -23
- package/content/docs-es.mjs +191 -140
- package/content/docs-pt.mjs +213 -162
- package/content/html-doom.mjs +114 -0
- package/content/operations-en.mjs +70 -0
- package/content/operations-es.mjs +70 -0
- package/content/operations-pt.mjs +70 -0
- package/content/overviews-en.mjs +115 -0
- package/content/overviews-es.mjs +115 -0
- package/content/overviews-pt.mjs +115 -0
- package/content/practical-en.mjs +118 -0
- package/content/practical-es.mjs +118 -0
- package/content/practical-pt.mjs +118 -0
- package/contracts/doc-versions.mjs +2 -2
- package/data/composed-pages.mjs +25 -0
- package/data/default-site-config.mjs +150 -130
- package/data/i18n-langmenu.mjs +43 -28
- package/data/i18n-translations.mjs +7 -7
- package/data/menu-sections.mjs +56 -0
- package/data/path-mappings.mjs +16 -1
- package/data/route-metas.mjs +72 -6
- package/package.json +3 -3
- package/runtime/doc-path-resolver.mjs +23 -2
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
export const defaultTranslations = {
|
|
2
2
|
notFound: {
|
|
3
|
-
title: { pt: "
|
|
3
|
+
title: { pt: "Página não encontrada", en: "Page not found", es: "Página no encontrada" },
|
|
4
4
|
description: {
|
|
5
|
-
pt: "A
|
|
5
|
+
pt: "A página de documentação solicitada não existe neste contexto de repositório.",
|
|
6
6
|
en: "The requested documentation page does not exist in this repository context.",
|
|
7
|
-
es: "La
|
|
7
|
+
es: "La página de documentación solicitada no existe en este contexto de repositorio.",
|
|
8
8
|
},
|
|
9
|
-
returnHome: { pt: "Voltar para
|
|
9
|
+
returnHome: { pt: "Voltar para início", en: "Return Home", es: "Volver al inicio" },
|
|
10
10
|
},
|
|
11
11
|
navigation: {
|
|
12
12
|
previous: { pt: "Voltar", en: "Previous", es: "Volver" },
|
|
13
|
-
next: { pt: "
|
|
14
|
-
menuOpen: { pt: "Menu", en: "Menu", es: "
|
|
13
|
+
next: { pt: "Próximo", en: "Next", es: "Siguiente" },
|
|
14
|
+
menuOpen: { pt: "Menu", en: "Menu", es: "Menú" },
|
|
15
15
|
menuClose: { pt: "Fechar", en: "Close", es: "Cerrar" },
|
|
16
16
|
browsePrev: { pt: "Anterior", en: "Previous", es: "Anterior" },
|
|
17
|
-
browseNext: { pt: "
|
|
17
|
+
browseNext: { pt: "Próximo", en: "Next", es: "Siguiente" },
|
|
18
18
|
},
|
|
19
19
|
footer: { footerLabel: { pt: "Projeto", en: "Project", es: "Proyecto" } },
|
|
20
20
|
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { COMPOSED_PAGE_MENU } from "./composed-pages.mjs";
|
|
2
|
+
|
|
3
|
+
export const MARKDOWN_MENU_SECTIONS = [
|
|
4
|
+
1,
|
|
5
|
+
2,
|
|
6
|
+
{
|
|
7
|
+
id: 1000,
|
|
8
|
+
routeId: 31,
|
|
9
|
+
titles: { en: "Guides", pt: "Guias", es: "Guías" },
|
|
10
|
+
submenus: [
|
|
11
|
+
{
|
|
12
|
+
id: 1001,
|
|
13
|
+
routeId: 32,
|
|
14
|
+
titles: { en: "Configure your site", pt: "Configure seu site", es: "Configura tu sitio" },
|
|
15
|
+
submenus: [13, 25, 16, 20],
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: 1002,
|
|
19
|
+
routeId: 33,
|
|
20
|
+
titles: { en: "Read and explore", pt: "Leia e explore", es: "Lee y explora" },
|
|
21
|
+
submenus: [22, 21, 24, 30, 40, COMPOSED_PAGE_MENU],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: 1003,
|
|
25
|
+
routeId: 34,
|
|
26
|
+
titles: { en: "Automate and integrate", pt: "Automatize e integre", es: "Automatiza e integra" },
|
|
27
|
+
submenus: [18, 19, 6],
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 1100,
|
|
33
|
+
routeId: 35,
|
|
34
|
+
titles: { en: "Operations and development", pt: "Operação e desenvolvimento", es: "Operación y desarrollo" },
|
|
35
|
+
submenus: [
|
|
36
|
+
{
|
|
37
|
+
id: 1101,
|
|
38
|
+
routeId: 36,
|
|
39
|
+
titles: { en: "Ship and maintain", pt: "Publique e mantenha", es: "Publica y mantén" },
|
|
40
|
+
submenus: [14, 26, 27, 17],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 1102,
|
|
44
|
+
routeId: 37,
|
|
45
|
+
titles: { en: "Develop the project", pt: "Desenvolva o projeto", es: "Desarrolla el proyecto" },
|
|
46
|
+
submenus: [15, 28, 3],
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 1200,
|
|
52
|
+
routeId: 38,
|
|
53
|
+
titles: { en: "Git and GitHub", pt: "Git e GitHub", es: "Git y GitHub" },
|
|
54
|
+
submenus: [5, 4],
|
|
55
|
+
},
|
|
56
|
+
];
|
package/data/path-mappings.mjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/** Path and media mappings for doc versions */
|
|
2
2
|
|
|
3
3
|
export const PDF_GUIDE_FILENAME = "gitpagedocs-project-guide.pdf";
|
|
4
|
+
export const HTML_DOOM_FILENAME = "doom.html";
|
|
4
5
|
|
|
5
6
|
export const ROUTE_PATHS = {
|
|
7
|
+
40: { en: "content-blocks.md", pt: "content-blocks.md", es: "content-blocks.md" },
|
|
6
8
|
1: { pt: "getting-started.md", en: "getting-started.md", es: "getting-started.md" },
|
|
7
9
|
2: { pt: "project-overview.md", en: "project-overview.md", es: "project-overview.md" },
|
|
8
10
|
3: { pt: "functionalities.md", en: "functionalities.md", es: "functionalities.md" },
|
|
@@ -20,6 +22,19 @@ export const ROUTE_PATHS = {
|
|
|
20
22
|
21: { pt: "accessibility.md", en: "accessibility.md", es: "accessibility.md" },
|
|
21
23
|
22: { pt: "focus-mode.md", en: "focus-mode.md", es: "focus-mode.md" },
|
|
22
24
|
24: { pt: "pdf.md", en: "pdf.md", es: "pdf.md" },
|
|
25
|
+
25: { pt: "configuration-recipes.md", en: "configuration-recipes.md", es: "configuration-recipes.md" },
|
|
26
|
+
26: { pt: "migration.md", en: "migration.md", es: "migration.md" },
|
|
27
|
+
27: { pt: "troubleshooting.md", en: "troubleshooting.md", es: "troubleshooting.md" },
|
|
28
|
+
28: { pt: "contributing.md", en: "contributing.md", es: "contributing.md" },
|
|
29
|
+
30: { pt: "html-containers.md", en: "html-containers.md", es: "html-containers.md" },
|
|
30
|
+
31: { pt: "guides.md", en: "guides.md", es: "guides.md" },
|
|
31
|
+
32: { pt: "configure-your-site.md", en: "configure-your-site.md", es: "configure-your-site.md" },
|
|
32
|
+
33: { pt: "read-and-explore.md", en: "read-and-explore.md", es: "read-and-explore.md" },
|
|
33
|
+
34: { pt: "automate-and-integrate.md", en: "automate-and-integrate.md", es: "automate-and-integrate.md" },
|
|
34
|
+
35: { pt: "operations-and-development.md", en: "operations-and-development.md", es: "operations-and-development.md" },
|
|
35
|
+
36: { pt: "ship-and-maintain.md", en: "ship-and-maintain.md", es: "ship-and-maintain.md" },
|
|
36
|
+
37: { pt: "develop-the-project.md", en: "develop-the-project.md", es: "develop-the-project.md" },
|
|
37
|
+
38: { pt: "git-and-github.md", en: "git-and-github.md", es: "git-and-github.md" },
|
|
23
38
|
};
|
|
24
39
|
|
|
25
40
|
export const VIDEO_IDS = ["bdIJkGr2NV0", "c67GaAkf1BE", "N3my6W_Rdwg", "r8jQ9hVA2qs"];
|
|
@@ -33,7 +48,7 @@ export const PAGE2_AUDIO = {
|
|
|
33
48
|
{
|
|
34
49
|
url: "https://www.youtube.com/watch?v=0w80F8FffQ4",
|
|
35
50
|
type: "youtube",
|
|
36
|
-
title: { pt: "
|
|
51
|
+
title: { pt: "Música página 2", en: "Page 2 music", es: "Música página 2" },
|
|
37
52
|
},
|
|
38
53
|
],
|
|
39
54
|
};
|
package/data/route-metas.mjs
CHANGED
|
@@ -39,6 +39,10 @@ export const ROUTE_META_ID6 = {
|
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
export const REFERENCE_ROUTE_METAS = {
|
|
42
|
+
40: {
|
|
43
|
+
titles: { en: "Ordered content blocks", pt: "Blocos de conteúdo ordenados", es: "Bloques de contenido ordenados" },
|
|
44
|
+
descriptions: { en: "Combine and repeat content in one page", pt: "Combine e repita conteúdos na mesma página", es: "Combina y repite contenidos en una página" },
|
|
45
|
+
},
|
|
42
46
|
13: {
|
|
43
47
|
titles: { pt: "Configuração", en: "Configuration", es: "Configuración" },
|
|
44
48
|
descriptions: { pt: "Idiomas, ícones, navegação, foco e acessibilidade", en: "Languages, icons, navigation, focus and accessibility", es: "Idiomas, iconos, navegación, foco y accesibilidad" },
|
|
@@ -83,25 +87,87 @@ export const REFERENCE_ROUTE_METAS = {
|
|
|
83
87
|
titles: { pt: "Documentos PDF", en: "PDF documents", es: "Documentos PDF" },
|
|
84
88
|
descriptions: { pt: "Rotas, prévia, download e publicação de anexos PDF", en: "Routes, previews, downloads and publishing PDF attachments", es: "Rutas, vista previa, descarga y publicación de anexos PDF" },
|
|
85
89
|
},
|
|
90
|
+
25: {
|
|
91
|
+
titles: { pt: "Receitas de configuração", en: "Configuration recipes", es: "Recetas de configuración" },
|
|
92
|
+
descriptions: { pt: "Exemplos completos de configuração e seções aninhadas", en: "Complete configuration and nested-section examples", es: "Ejemplos completos de configuración y secciones anidadas" },
|
|
93
|
+
},
|
|
94
|
+
26: {
|
|
95
|
+
titles: { pt: "Migração e compatibilidade", en: "Migration and compatibility", es: "Migración y compatibilidad" },
|
|
96
|
+
descriptions: { pt: "Atualize preservando conteúdo e personalizações", en: "Upgrade while preserving content and customizations", es: "Actualiza conservando contenido y personalizaciones" },
|
|
97
|
+
},
|
|
98
|
+
27: {
|
|
99
|
+
titles: { pt: "Solução de problemas", en: "Troubleshooting", es: "Solución de problemas" },
|
|
100
|
+
descriptions: { pt: "Diagnostique configuração, publicação, PDF e integrações", en: "Diagnose configuration, deployment, PDF and integrations", es: "Diagnostica configuración, publicación, PDF e integraciones" },
|
|
101
|
+
},
|
|
102
|
+
28: {
|
|
103
|
+
titles: { pt: "Contribuição e testes", en: "Contributing and testing", es: "Contribución y pruebas" },
|
|
104
|
+
descriptions: { pt: "Fontes autorais, contratos, testes e publicação", en: "Authoring sources, contracts, tests and releases", es: "Fuentes, contratos, pruebas y publicación" },
|
|
105
|
+
},
|
|
106
|
+
30: {
|
|
107
|
+
titles: { pt: "Containers HTML", en: "HTML containers", es: "Contenedores HTML" },
|
|
108
|
+
descriptions: { pt: "Páginas HTML, URLs externas e o exemplo interativo DOOM", en: "HTML pages, external URLs and the interactive DOOM example", es: "Páginas HTML, URLs externas y el ejemplo interactivo DOOM" },
|
|
109
|
+
},
|
|
110
|
+
31: {
|
|
111
|
+
titles: { pt: "Guias", en: "Guides", es: "Guías" },
|
|
112
|
+
descriptions: { pt: "Escolha um caminho para configurar, ler ou integrar", en: "Choose a path to configure, read or integrate", es: "Elige un recorrido para configurar, leer o integrar" },
|
|
113
|
+
},
|
|
114
|
+
32: {
|
|
115
|
+
titles: { pt: "Configure seu site", en: "Configure your site", es: "Configura tu sitio" },
|
|
116
|
+
descriptions: { pt: "Organize conteúdo, navegação e apresentação", en: "Organize content, navigation and presentation", es: "Organiza contenido, navegación y presentación" },
|
|
117
|
+
},
|
|
118
|
+
33: {
|
|
119
|
+
titles: { pt: "Leia e explore", en: "Read and explore", es: "Lee y explora" },
|
|
120
|
+
descriptions: { pt: "Escolha como ler documentos e exemplos interativos", en: "Choose how to read documents and interactive examples", es: "Elige cómo leer documentos y ejemplos interactivos" },
|
|
121
|
+
},
|
|
122
|
+
34: {
|
|
123
|
+
titles: { pt: "Automatize e integre", en: "Automate and integrate", es: "Automatiza e integra" },
|
|
124
|
+
descriptions: { pt: "Use CLI, MCP e políticas de acesso", en: "Use the CLI, MCP and access policies", es: "Usa la CLI, MCP y políticas de acceso" },
|
|
125
|
+
},
|
|
126
|
+
35: {
|
|
127
|
+
titles: { pt: "Operação e desenvolvimento", en: "Operations and development", es: "Operación y desarrollo" },
|
|
128
|
+
descriptions: { pt: "Publique, mantenha e desenvolva a documentação", en: "Publish, maintain and develop the documentation", es: "Pública, mantén y desarrolla la documentación" },
|
|
129
|
+
},
|
|
130
|
+
36: {
|
|
131
|
+
titles: { pt: "Publique e mantenha", en: "Ship and maintain", es: "Pública y mantén" },
|
|
132
|
+
descriptions: { pt: "Prepare a publicação e preserve compatibilidade", en: "Prepare releases and preserve compatibility", es: "Prepara publicaciones y conserva compatibilidad" },
|
|
133
|
+
},
|
|
134
|
+
37: {
|
|
135
|
+
titles: { pt: "Desenvolva o projeto", en: "Develop the project", es: "Desarrolla el proyecto" },
|
|
136
|
+
descriptions: { pt: "Localize fontes, contratos e verificações", en: "Locate sources, contracts and checks", es: "Localiza fuentes, contratos y comprobaciones" },
|
|
137
|
+
},
|
|
138
|
+
38: {
|
|
139
|
+
titles: { pt: "Git e GitHub", en: "Git and GitHub", es: "Git y GitHub" },
|
|
140
|
+
descriptions: { pt: "Versione mudanças e organize o trabalho", en: "Version changes and organize the work", es: "Versiona cambios y organiza el trabajo" },
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export const HTML_DOOM_META = {
|
|
145
|
+
id: 29,
|
|
146
|
+
titles: { pt: "DOOM: exemplo HTML", en: "DOOM: HTML example", es: "DOOM: ejemplo HTML" },
|
|
147
|
+
descriptions: {
|
|
148
|
+
pt: "Jogue DOOM em um container HTML usando os controles do próprio player.",
|
|
149
|
+
en: "Play DOOM in an HTML container using the player’s native controls.",
|
|
150
|
+
es: "Juega a DOOM en un contenedor HTML con los controles del reproductor.",
|
|
151
|
+
},
|
|
86
152
|
};
|
|
87
153
|
|
|
88
154
|
export const SOURCE_VIEWER_META = {
|
|
89
155
|
id: 7,
|
|
90
|
-
titles: { pt: "
|
|
156
|
+
titles: { pt: "Código fonte", en: "Source code", es: "Código fuente" },
|
|
91
157
|
descriptions: {
|
|
92
|
-
pt: "Explore a
|
|
158
|
+
pt: "Explore a árvore do repositório, navegue por pastas e visualize arquivos diretamente na documentação.",
|
|
93
159
|
en: "Explore the repository tree, browse folders, and preview files directly inside the documentation.",
|
|
94
|
-
es: "Explora el
|
|
160
|
+
es: "Explora el árbol del repositorio, navega por carpetas y previsualiza archivos directamente en la documentación.",
|
|
95
161
|
},
|
|
96
162
|
};
|
|
97
163
|
|
|
98
164
|
export const AUDIO_META_ID12 = {
|
|
99
165
|
id: 12,
|
|
100
|
-
title: { pt: "Trilha de
|
|
166
|
+
title: { pt: "Trilha de áudio", en: "Audio track", es: "Pista de audio" },
|
|
101
167
|
description: {
|
|
102
|
-
pt: "Ouça uma faixa de exemplo diretamente na
|
|
168
|
+
pt: "Ouça uma faixa de exemplo diretamente na documentação.",
|
|
103
169
|
en: "Listen to a sample track directly inside the documentation.",
|
|
104
|
-
es: "Escucha una pista de ejemplo directamente en la
|
|
170
|
+
es: "Escucha una pista de ejemplo directamente en la documentación.",
|
|
105
171
|
},
|
|
106
172
|
};
|
|
107
173
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitpagedocs/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "CLI that scaffolds and maintains gitpagedocs documentation, generates docs with AI, configures GitHub Pages, and runs the MCP server.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"gitpagedocs": "index.mjs"
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@clack/prompts": "^1.5.1",
|
|
32
|
-
"@gitpagedocs/mcp": "^0.0.
|
|
33
|
-
"@gitpagedocs/tools": "^0.0.
|
|
32
|
+
"@gitpagedocs/mcp": "^0.0.11",
|
|
33
|
+
"@gitpagedocs/tools": "^0.0.11",
|
|
34
34
|
"tsx": "^4.21.0"
|
|
35
35
|
},
|
|
36
36
|
"repository": {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/** Map doc paths to content keys and apply version badges */
|
|
2
2
|
|
|
3
|
+
import { PACKAGE_VERSION } from "../contracts/doc-versions.mjs";
|
|
4
|
+
|
|
3
5
|
const DOC_FILE_KEYS = new Map([
|
|
6
|
+
["content-blocks.md", "contentBlocks"],
|
|
4
7
|
["index.md", "index"],
|
|
5
8
|
["getting-started.md", "gettingStarted"],
|
|
6
9
|
["configuration.md", "configuration"],
|
|
@@ -19,6 +22,19 @@ const DOC_FILE_KEYS = new Map([
|
|
|
19
22
|
["accessibility.md", "accessibility"],
|
|
20
23
|
["focus-mode.md", "focusMode"],
|
|
21
24
|
["pdf.md", "pdf"],
|
|
25
|
+
["configuration-recipes.md", "configurationRecipes"],
|
|
26
|
+
["migration.md", "migration"],
|
|
27
|
+
["troubleshooting.md", "troubleshooting"],
|
|
28
|
+
["contributing.md", "contributing"],
|
|
29
|
+
["html-containers.md", "htmlContainers"],
|
|
30
|
+
["guides.md", "guides"],
|
|
31
|
+
["configure-your-site.md", "configureYourSite"],
|
|
32
|
+
["read-and-explore.md", "readAndExplore"],
|
|
33
|
+
["automate-and-integrate.md", "automateAndIntegrate"],
|
|
34
|
+
["operations-and-development.md", "operationsAndDevelopment"],
|
|
35
|
+
["ship-and-maintain.md", "shipAndMaintain"],
|
|
36
|
+
["develop-the-project.md", "developTheProject"],
|
|
37
|
+
["git-and-github.md", "gitAndGitHub"],
|
|
22
38
|
]);
|
|
23
39
|
|
|
24
40
|
export function parseDocFileToKey(fileName) {
|
|
@@ -28,6 +44,7 @@ export function parseDocFileToKey(fileName) {
|
|
|
28
44
|
export function parseHtmlFileToKey(fileName) {
|
|
29
45
|
const base = fileName.replace(/\.html$/, "");
|
|
30
46
|
if (base === "source-viewer") return "sourceViewer";
|
|
47
|
+
if (base === "doom") return "doom";
|
|
31
48
|
return undefined;
|
|
32
49
|
}
|
|
33
50
|
|
|
@@ -37,13 +54,17 @@ export function extractLanguageFromPath(docPath) {
|
|
|
37
54
|
}
|
|
38
55
|
|
|
39
56
|
export function withVersionBadge(content, versionId, language) {
|
|
40
|
-
const normalized = typeof content === "string"
|
|
57
|
+
const normalized = typeof content === "string"
|
|
58
|
+
? content.replaceAll(`/versions/${PACKAGE_VERSION}/`, `/versions/${versionId}/`)
|
|
59
|
+
: "";
|
|
41
60
|
if (!normalized.trim()) {
|
|
42
61
|
return normalized;
|
|
43
62
|
}
|
|
44
63
|
|
|
45
64
|
const alreadyTagged =
|
|
46
65
|
normalized.includes(`Version: ${versionId}`) ||
|
|
66
|
+
normalized.includes(`Versão: ${versionId}`) ||
|
|
67
|
+
normalized.includes(`Versión: ${versionId}`) ||
|
|
47
68
|
normalized.includes(`Versao: ${versionId}`) ||
|
|
48
69
|
normalized.includes(`Version (ES): ${versionId}`);
|
|
49
70
|
if (alreadyTagged) {
|
|
@@ -56,7 +77,7 @@ export function withVersionBadge(content, versionId, language) {
|
|
|
56
77
|
}
|
|
57
78
|
|
|
58
79
|
/** Badge wording per language; every other language reads the English form. */
|
|
59
|
-
const VERSION_LABEL_PREFIXES = { pt: "
|
|
80
|
+
const VERSION_LABEL_PREFIXES = { pt: "Versão", es: "Versión" };
|
|
60
81
|
|
|
61
82
|
function versionLabelPrefix(language) {
|
|
62
83
|
return VERSION_LABEL_PREFIXES[language] ?? "Version";
|