@gitpagedocs/cli 1.1.54 → 1.1.56
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/README.md +43 -31
- package/ai/application/run-ai-cli-command.ts +16 -5
- package/ai/core/models/parse-ai-cli-config.ts +78 -0
- package/ai/infrastructure/ai-config-file.ts +77 -8
- package/ai/infrastructure/file-system-adapter.ts +5 -3
- package/ai/presentation/ai-prompts.ts +1 -1
- package/application/report/config-only-reporter.mjs +63 -62
- package/builders/config-orchestrator.mjs +34 -40
- package/builders/project-links.mjs +26 -0
- package/builders/root-config-builder.mjs +7 -9
- package/builders/route-builders.mjs +136 -111
- package/builders/theme-template.mjs +76 -75
- package/builders/version-config-builder.mjs +186 -151
- package/content/docs-en.mjs +20 -17
- package/content/docs-es.mjs +14 -13
- package/content/docs-pt.mjs +14 -13
- package/contracts/doc-versions.mjs +3 -1
- package/contracts/index.mjs +0 -0
- package/data/i18n-langmenu.mjs +36 -0
- package/data/path-mappings.mjs +26 -34
- package/data/route-metas.mjs +93 -73
- package/data/urls.mjs +12 -7
- package/package.json +60 -60
- package/presentation/commands/config-clear.ts +23 -0
- package/presentation/commands/diagnostics.ts +1 -1
- package/presentation/commands/run-command.ts +6 -0
- package/presentation/index.ts +1 -1
- package/runtime/output.mjs +25 -1
- package/runtime/workflow.mjs +28 -45
- package/start.mjs +1 -1
- package/ui/logger.mjs +9 -9
- package/builders/source-viewer.mjs +0 -330
|
@@ -1,151 +1,186 @@
|
|
|
1
|
-
/** Build version config (routes, menus) for each doc version */
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ROUTE_PATHS,
|
|
5
|
-
VIDEO_IDS,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "../data/path-mappings.mjs";
|
|
9
|
-
import {
|
|
10
|
-
ROUTE_META_ID1,
|
|
11
|
-
ROUTE_META_ID2,
|
|
12
|
-
ROUTE_META_ID3,
|
|
13
|
-
ROUTE_META_ID4,
|
|
14
|
-
ROUTE_META_ID5,
|
|
15
|
-
ROUTE_META_ID6,
|
|
16
|
-
VIDEO_META_ID1,
|
|
17
|
-
VIDEO_META_ID2,
|
|
18
|
-
VIDEO_META_ID3,
|
|
19
|
-
VIDEO_META_ID4,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
VIDEO_METAS[id].
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
1
|
+
/** Build version config (routes, menus) for each doc version */
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
ROUTE_PATHS,
|
|
5
|
+
VIDEO_IDS,
|
|
6
|
+
AUDIO_IDS,
|
|
7
|
+
PAGE2_AUDIO,
|
|
8
|
+
} from "../data/path-mappings.mjs";
|
|
9
|
+
import {
|
|
10
|
+
ROUTE_META_ID1,
|
|
11
|
+
ROUTE_META_ID2,
|
|
12
|
+
ROUTE_META_ID3,
|
|
13
|
+
ROUTE_META_ID4,
|
|
14
|
+
ROUTE_META_ID5,
|
|
15
|
+
ROUTE_META_ID6,
|
|
16
|
+
VIDEO_META_ID1,
|
|
17
|
+
VIDEO_META_ID2,
|
|
18
|
+
VIDEO_META_ID3,
|
|
19
|
+
VIDEO_META_ID4,
|
|
20
|
+
AUDIO_META_ID12,
|
|
21
|
+
SOURCE_VIEWER_META,
|
|
22
|
+
DEFAULT_HIERARCHY,
|
|
23
|
+
} from "../data/route-metas.mjs";
|
|
24
|
+
import { buildAudioRoute, buildMdRoute, buildSourceViewerRoute, buildVideoRoute } from "./route-builders.mjs";
|
|
25
|
+
import { resolveSourceViewerPath } from "./project-links.mjs";
|
|
26
|
+
|
|
27
|
+
/** Demo route protections showcasing the "Authorized Routes" feature. They are
|
|
28
|
+
* applied only to the official (non-parameterized) scaffold — user sites
|
|
29
|
+
* generated with --owner/--repo stay public, since visitors of those sites
|
|
30
|
+
* have no discoverable unlock recipe. */
|
|
31
|
+
const EXTERNAL_AUTH_PROVIDERS = ["authjs", "clerk", "firebase", "jwt"];
|
|
32
|
+
const DOCS_ACCESS_KEY_ID = "docs-key";
|
|
33
|
+
const MAINTAINER_ROLE = "maintainer";
|
|
34
|
+
const VIDEO_ROUTE_AUTHORIZATION = {
|
|
35
|
+
requireExternalAuth: true,
|
|
36
|
+
allowedProviders: EXTERNAL_AUTH_PROVIDERS,
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const ROUTE_METAS = {
|
|
40
|
+
1: ROUTE_META_ID1,
|
|
41
|
+
2: ROUTE_META_ID2,
|
|
42
|
+
3: ROUTE_META_ID3,
|
|
43
|
+
4: ROUTE_META_ID4,
|
|
44
|
+
5: ROUTE_META_ID5,
|
|
45
|
+
6: ROUTE_META_ID6,
|
|
46
|
+
};
|
|
47
|
+
const VIDEO_METAS = { 1: VIDEO_META_ID1, 2: VIDEO_META_ID2, 3: VIDEO_META_ID3, 4: VIDEO_META_ID4 };
|
|
48
|
+
|
|
49
|
+
function buildVersionMdRoutes(versionId, includeDemoAuthorization) {
|
|
50
|
+
const base = `gitpagedocs/docs/versions/${versionId}`;
|
|
51
|
+
return [1, 2, 3, 4, 5, 6].map((id) => {
|
|
52
|
+
const paths = ROUTE_PATHS[id];
|
|
53
|
+
const meta = ROUTE_METAS[id];
|
|
54
|
+
const pathByLang = {
|
|
55
|
+
pt: `${base}/pt/${paths.pt}`,
|
|
56
|
+
en: `${base}/en/${paths.en}`,
|
|
57
|
+
es: `${base}/es/${paths.es}`,
|
|
58
|
+
};
|
|
59
|
+
const routeOptions = {
|
|
60
|
+
...(id === 2 ? { audio: PAGE2_AUDIO } : {}),
|
|
61
|
+
...(includeDemoAuthorization && id === 3
|
|
62
|
+
? { authorization: { requiredRoles: [MAINTAINER_ROLE] } }
|
|
63
|
+
: {}),
|
|
64
|
+
...(includeDemoAuthorization && id === 6
|
|
65
|
+
? {
|
|
66
|
+
authorization: {
|
|
67
|
+
accessKeyId: DOCS_ACCESS_KEY_ID,
|
|
68
|
+
requiredRoles: [MAINTAINER_ROLE],
|
|
69
|
+
requireExternalAuth: true,
|
|
70
|
+
allowedProviders: EXTERNAL_AUTH_PROVIDERS,
|
|
71
|
+
},
|
|
72
|
+
}
|
|
73
|
+
: {}),
|
|
74
|
+
};
|
|
75
|
+
return buildMdRoute(versionId, id, pathByLang, meta.titles, meta.descriptions, routeOptions);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function buildVersionVideoRoutes(versionId, includeDemoAuthorization) {
|
|
80
|
+
return [1, 2, 3, 4].map((id) =>
|
|
81
|
+
buildVideoRoute(
|
|
82
|
+
versionId,
|
|
83
|
+
id + 7,
|
|
84
|
+
"youtube",
|
|
85
|
+
VIDEO_IDS[id - 1],
|
|
86
|
+
VIDEO_METAS[id].title,
|
|
87
|
+
VIDEO_METAS[id].description,
|
|
88
|
+
includeDemoAuthorization ? { authorization: VIDEO_ROUTE_AUTHORIZATION } : {},
|
|
89
|
+
)
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function buildVersionAudioRoutes(versionId) {
|
|
94
|
+
return [
|
|
95
|
+
buildAudioRoute(
|
|
96
|
+
versionId,
|
|
97
|
+
AUDIO_META_ID12.id,
|
|
98
|
+
"youtube",
|
|
99
|
+
AUDIO_IDS[0],
|
|
100
|
+
AUDIO_META_ID12.title,
|
|
101
|
+
AUDIO_META_ID12.description,
|
|
102
|
+
),
|
|
103
|
+
];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function buildVersionSourceViewerRoutes(options = {}) {
|
|
107
|
+
return [
|
|
108
|
+
buildSourceViewerRoute(
|
|
109
|
+
SOURCE_VIEWER_META.id,
|
|
110
|
+
resolveSourceViewerPath(options.githubOwner, options.githubRepo),
|
|
111
|
+
SOURCE_VIEWER_META.titles,
|
|
112
|
+
SOURCE_VIEWER_META.descriptions,
|
|
113
|
+
),
|
|
114
|
+
];
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function buildVersionMenus(versionId) {
|
|
118
|
+
const base = `gitpagedocs/docs/versions/${versionId}`;
|
|
119
|
+
const menuMd = [1, 2, 3, 4, 5, 6].map((id) => ({
|
|
120
|
+
id,
|
|
121
|
+
pt: { title: ROUTE_METAS[id].titles.pt, "path-click": `${base}/pt/${ROUTE_PATHS[id].pt}` },
|
|
122
|
+
en: { title: ROUTE_METAS[id].titles.en, "path-click": `${base}/en/${ROUTE_PATHS[id].en}` },
|
|
123
|
+
es: { title: ROUTE_METAS[id].titles.es, "path-click": `${base}/es/${ROUTE_PATHS[id].es}` },
|
|
124
|
+
}));
|
|
125
|
+
const menuVideo = [1, 2, 3, 4].map((id) => ({
|
|
126
|
+
id: id + 7,
|
|
127
|
+
pt: { title: `${VIDEO_METAS[id].title.pt.slice(0, 40)}...`, "path-click": `page:${id + 7}` },
|
|
128
|
+
en: { title: `${VIDEO_METAS[id].title.en.slice(0, 40)}...`, "path-click": `page:${id + 7}` },
|
|
129
|
+
es: { title: `${VIDEO_METAS[id].title.es.slice(0, 40)}...`, "path-click": `page:${id + 7}` },
|
|
130
|
+
}));
|
|
131
|
+
const menuAudio = [
|
|
132
|
+
{
|
|
133
|
+
id: AUDIO_META_ID12.id,
|
|
134
|
+
pt: { title: AUDIO_META_ID12.title.pt, "path-click": `page:${AUDIO_META_ID12.id}` },
|
|
135
|
+
en: { title: AUDIO_META_ID12.title.en, "path-click": `page:${AUDIO_META_ID12.id}` },
|
|
136
|
+
es: { title: AUDIO_META_ID12.title.es, "path-click": `page:${AUDIO_META_ID12.id}` },
|
|
137
|
+
},
|
|
138
|
+
];
|
|
139
|
+
const menuSourceViewer = [
|
|
140
|
+
{
|
|
141
|
+
id: SOURCE_VIEWER_META.id,
|
|
142
|
+
pt: { title: SOURCE_VIEWER_META.titles.pt, "path-click": `page:${SOURCE_VIEWER_META.id}` },
|
|
143
|
+
en: { title: SOURCE_VIEWER_META.titles.en, "path-click": `page:${SOURCE_VIEWER_META.id}` },
|
|
144
|
+
es: { title: SOURCE_VIEWER_META.titles.es, "path-click": `page:${SOURCE_VIEWER_META.id}` },
|
|
145
|
+
},
|
|
146
|
+
];
|
|
147
|
+
return { md: menuMd, sourceViewer: menuSourceViewer, html: [], video: menuVideo, audio: menuAudio };
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Build version config for a single doc version.
|
|
152
|
+
* @param {string} versionId - e.g. "1.1.54"
|
|
153
|
+
* @param {object} [options] - { githubOwner, githubRepo } for the source-viewer link
|
|
154
|
+
* @returns {object} Version config with routes, menus, and hierarchy
|
|
155
|
+
*/
|
|
156
|
+
export function buildVersionConfig(versionId, options = {}) {
|
|
157
|
+
const includeDemoAuthorization = !options.githubOwner && !options.githubRepo;
|
|
158
|
+
const menus = buildVersionMenus(versionId);
|
|
159
|
+
|
|
160
|
+
return {
|
|
161
|
+
auth: {
|
|
162
|
+
accessKeys: {
|
|
163
|
+
"docs-key": "open-gitpagedocs-docs",
|
|
164
|
+
},
|
|
165
|
+
rolesStorageKey: "git-page-docs:route-auth:roles",
|
|
166
|
+
providers: [
|
|
167
|
+
{ type: "authjs", enabled: true, sessionEndpoint: "/api/auth/session", rolesClaimPath: "user.roles" },
|
|
168
|
+
{ type: "clerk", enabled: true, rolesClaimPath: "claims.publicMetadata.roles" },
|
|
169
|
+
{ type: "firebase", enabled: true, tokenStorageKey: "git-page-docs:firebase-token", rolesClaimPath: "roles" },
|
|
170
|
+
{ type: "jwt", enabled: true, tokenStorageKey: "git-page-docs:jwt-token", rolesClaimPath: "roles" },
|
|
171
|
+
],
|
|
172
|
+
},
|
|
173
|
+
"routes-md": buildVersionMdRoutes(versionId, includeDemoAuthorization),
|
|
174
|
+
"routes-source-viewer": buildVersionSourceViewerRoutes(options),
|
|
175
|
+
"routes-html": [],
|
|
176
|
+
"routes-video": buildVersionVideoRoutes(versionId, includeDemoAuthorization),
|
|
177
|
+
"routes-audio": buildVersionAudioRoutes(versionId),
|
|
178
|
+
"menus-header-md": menus.md,
|
|
179
|
+
"menus-header-source-viewer": menus.sourceViewer,
|
|
180
|
+
"menus-header-html": menus.html,
|
|
181
|
+
"menus-header-video": menus.video,
|
|
182
|
+
"menus-header-audio": menus.audio,
|
|
183
|
+
hierarchyPage: DEFAULT_HIERARCHY,
|
|
184
|
+
hierarchyMenu: DEFAULT_HIERARCHY,
|
|
185
|
+
};
|
|
186
|
+
}
|
package/content/docs-en.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PACKAGE_VERSION } from "../contracts/doc-versions.mjs";
|
|
2
|
+
|
|
1
3
|
export const docsEn = {
|
|
2
4
|
index: `# Git Page Docs
|
|
3
5
|
|
|
@@ -144,7 +146,6 @@ Install globally with \`npm install -g gitpagedocs\`, or run one-off with \`npx
|
|
|
144
146
|
- \`gitpagedocs/icon.svg\` – default icon
|
|
145
147
|
- \`gitpagedocs/docs/versions/<ver>/config.json\` – per-version routes
|
|
146
148
|
- \`gitpagedocs/docs/versions/<ver>/{en,pt,es}/*.md\` – markdown docs
|
|
147
|
-
- \`gitpagedocs/docs/versions/<ver>/{en,pt,es}/source-viewer\` – GitHub-style source code viewer
|
|
148
149
|
- \`gitpagedocs/layouts/\` – only with \`--layoutconfig\`
|
|
149
150
|
|
|
150
151
|
## Content types
|
|
@@ -152,20 +153,20 @@ Install globally with \`npm install -g gitpagedocs\`, or run one-off with \`npx
|
|
|
152
153
|
| Type | Config key | Description |
|
|
153
154
|
|------|------------|-------------|
|
|
154
155
|
| Markdown | \`routes-md\` | .md files with \`path\` per language |
|
|
155
|
-
| HTML | \`routes-html\` | \`path\`
|
|
156
|
+
| HTML | \`routes-html\` | local \`path\` or external \`url\` |
|
|
156
157
|
| Video | \`routes-video\` | \`video.pathVideo\`, \`video.videoType\` |
|
|
157
158
|
| Audio | \`routes-audio\` | \`audio.pathAudio\`, \`audio.audioType\` |
|
|
158
159
|
|
|
159
160
|
## Source code viewer
|
|
160
161
|
|
|
161
|
-
The
|
|
162
|
+
The version config can render a **Source code** container through \`routes-source-viewer\` and \`menus-header-source-viewer\`. The viewer reads GitHub repository trees at runtime and applies the current documentation theme.
|
|
162
163
|
|
|
163
|
-
-
|
|
164
|
-
-
|
|
165
|
-
-
|
|
166
|
-
-
|
|
167
|
-
-
|
|
168
|
-
-
|
|
164
|
+
- Repository tree from \`source-viewer-path\`; branch defaults to \`main\`
|
|
165
|
+
- Folder navigation and file filtering
|
|
166
|
+
- GitHub-style directory listing
|
|
167
|
+
- Code rendering with line numbers
|
|
168
|
+
- Markdown preview/code toggle, including \`README.md\`
|
|
169
|
+
- Collapsible folders in the sidebar
|
|
169
170
|
|
|
170
171
|
## Config keys (site)
|
|
171
172
|
|
|
@@ -180,7 +181,7 @@ The CLI generates a **Source code** page per version. It scans \`src/\`, \`cli/\
|
|
|
180
181
|
|
|
181
182
|
## AI assistant
|
|
182
183
|
|
|
183
|
-
The docs ship an AI assistant in two surfaces: an in-docs **chat drawer** (the
|
|
184
|
+
The docs ship an AI assistant in two surfaces: an in-docs **chat drawer** (the AI chat button in the sidebar, enabled via \`site.AiChatEnabled\`) and a dedicated **\`/ai\` console** page.
|
|
184
185
|
|
|
185
186
|
- **14 providers** via one shared core: OpenAI, Anthropic, Gemini, OpenRouter, Ollama, Azure OpenAI, Mistral, DeepSeek, Cohere, Groq, xAI, Together, Fireworks, Perplexity.
|
|
186
187
|
- **Model selection** — pick from each provider's catalog (\`gitpagedocs models <provider>\`) or type a custom id.
|
|
@@ -296,9 +297,9 @@ Supported adapters:
|
|
|
296
297
|
{
|
|
297
298
|
"id": 6,
|
|
298
299
|
"path": {
|
|
299
|
-
"en": "gitpagedocs/docs/versions/
|
|
300
|
-
"pt": "gitpagedocs/docs/versions/
|
|
301
|
-
"es": "gitpagedocs/docs/versions/
|
|
300
|
+
"en": "gitpagedocs/docs/versions/${PACKAGE_VERSION}/en/authorized-routes.md",
|
|
301
|
+
"pt": "gitpagedocs/docs/versions/${PACKAGE_VERSION}/pt/authorized-routes.md",
|
|
302
|
+
"es": "gitpagedocs/docs/versions/${PACKAGE_VERSION}/es/authorized-routes.md"
|
|
302
303
|
},
|
|
303
304
|
"authorization": {
|
|
304
305
|
"accessKeyId": "docs-key",
|
|
@@ -348,6 +349,7 @@ Behavior:
|
|
|
348
349
|
- \`id\`
|
|
349
350
|
- \`path\`
|
|
350
351
|
- optional metadata links (\`ProjectLink\`, \`branch\`, \`release\`, \`commit\`)
|
|
352
|
+
- optional source viewer metadata (\`source-viewer\`, \`source-viewer-path\`)
|
|
351
353
|
|
|
352
354
|
## Navigation
|
|
353
355
|
|
|
@@ -367,13 +369,14 @@ Behavior:
|
|
|
367
369
|
Version configs support multiple content types:
|
|
368
370
|
|
|
369
371
|
- \`routes-md\`: Markdown routes with optional \`title\`, \`description\` (centered via \`titlePosition\`, \`descriptionPosition\`)
|
|
372
|
+
- \`routes-source-viewer\`: Source viewer containers with \`source-viewer: true\` and \`source-viewer-path\`
|
|
370
373
|
- \`routes-html\`: HTML page paths per language
|
|
371
374
|
- \`routes-video\`: Video config with \`video.videoType\` (youtube, vimeo, mp4, etc.) and \`video.pathVideo\`
|
|
372
375
|
- \`routes-audio\`: Audio config with \`audio.audioType\` (youtube, mp3, etc.) and \`audio.pathAudio\`
|
|
373
376
|
- \`authorization\` (md/html/video): route guard by access key, roles, and external auth
|
|
374
|
-
- \`menus-header-md\`, \`menus-header-html\`, \`menus-header-video\`, \`menus-header-audio\`: menus per type
|
|
375
|
-
- \`hierarchyPage\`: container order on page \`{ md: 0,
|
|
376
|
-
- \`hierarchyMenu\`: menu section order \`{ md: 0,
|
|
377
|
+
- \`menus-header-md\`, \`menus-header-source-viewer\`, \`menus-header-html\`, \`menus-header-video\`, \`menus-header-audio\`: menus per type
|
|
378
|
+
- \`hierarchyPage\`: container order on page \`{ md: 0, "source-viewer": 1, html: 2, video: 3, audio: 4 }\`
|
|
379
|
+
- \`hierarchyMenu\`: menu section order \`{ md: 0, "source-viewer": 1, html: 2, video: 3, audio: 4 }\`
|
|
377
380
|
|
|
378
381
|
Each route can include \`title\`, \`description\` (per language), \`titleCss\`, \`titlePosition: "center"\`, \`descriptionPosition: "center"\`, \`titleIsVisible\`, \`descriptionIsVisible\`.
|
|
379
382
|
|
|
@@ -389,7 +392,7 @@ Per-route options for \`routes-md\`, \`routes-html\`, \`routes-video\`, and \`ro
|
|
|
389
392
|
## Content types: path vs url (HTML)
|
|
390
393
|
|
|
391
394
|
- **Markdown (\`routes-md\`)**: always uses \`path\` pointing to local \`.md\` files.
|
|
392
|
-
- **HTML (\`routes-html\`)**: uses \`path\` for local HTML files (no \`.html\` extension in config
|
|
395
|
+
- **HTML (\`routes-html\`)**: uses \`path\` for local HTML files (no \`.html\` extension in config) or \`url\` for external URLs. When \`url\` is set, the iframe loads the external page; no local file is generated.
|
|
393
396
|
- **Video (\`routes-video\`)**: uses \`video.pathVideo\` and \`video.videoType\` (youtube, vimeo, mp4, etc.).
|
|
394
397
|
- **Audio (\`routes-audio\`)**: uses \`audio.pathAudio\` and \`audio.audioType\` (youtube, mp3, etc.). No autoplay by default.
|
|
395
398
|
|
package/content/docs-es.mjs
CHANGED
|
@@ -130,7 +130,6 @@ Referencia completa de opciones CLI, claves de configuracion y funciones del run
|
|
|
130
130
|
- \`gitpagedocs/icon.svg\` – icono por defecto
|
|
131
131
|
- \`gitpagedocs/docs/versions/<ver>/config.json\` – rutas por version
|
|
132
132
|
- \`gitpagedocs/docs/versions/<ver>/{en,pt,es}/*.md\` – docs en markdown
|
|
133
|
-
- \`gitpagedocs/docs/versions/<ver>/{en,pt,es}/source-viewer\` – visor de codigo (estilo GitHub)
|
|
134
133
|
- \`gitpagedocs/layouts/\` – solo con \`--layoutconfig\`
|
|
135
134
|
|
|
136
135
|
## Tipos de contenido
|
|
@@ -138,20 +137,20 @@ Referencia completa de opciones CLI, claves de configuracion y funciones del run
|
|
|
138
137
|
| Tipo | Clave config | Descripcion |
|
|
139
138
|
|------|--------------|-------------|
|
|
140
139
|
| Markdown | \`routes-md\` | Archivos .md con \`path\` por idioma |
|
|
141
|
-
| HTML | \`routes-html\` | \`path\`
|
|
140
|
+
| HTML | \`routes-html\` | \`path\` local o \`url\` externa |
|
|
142
141
|
| Video | \`routes-video\` | \`video.pathVideo\`, \`video.videoType\` |
|
|
143
142
|
| Audio | \`routes-audio\` | \`audio.pathAudio\`, \`audio.audioType\` |
|
|
144
143
|
|
|
145
144
|
## Visor de codigo fuente
|
|
146
145
|
|
|
147
|
-
|
|
146
|
+
El config de version puede renderizar un contenedor **Codigo fuente** via \`routes-source-viewer\` y \`menus-header-source-viewer\`. El viewer lee el arbol del repositorio en GitHub en tiempo de ejecucion y aplica el tema actual de la documentacion.
|
|
148
147
|
|
|
149
|
-
- Arbol
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
148
|
+
- Arbol del repositorio desde \`source-viewer-path\`; la branch por defecto es \`main\`
|
|
149
|
+
- Navegacion por carpetas y filtro de archivos
|
|
150
|
+
- Listado de directorios estilo GitHub
|
|
151
|
+
- Renderizado de codigo con numeros de linea
|
|
152
|
+
- Alternancia vista previa/codigo para Markdown, incluido \`README.md\`
|
|
153
|
+
- Carpetas colapsables en la barra lateral
|
|
155
154
|
|
|
156
155
|
## Claves de config (site)
|
|
157
156
|
|
|
@@ -202,6 +201,7 @@ Claves principales:
|
|
|
202
201
|
- \`id\`: identificador de version
|
|
203
202
|
- \`path\`: ruta de config de version
|
|
204
203
|
- links opcionales (\`ProjectLink\`, \`branch\`, \`release\`, \`commit\`)
|
|
204
|
+
- metadatos opcionales del source viewer (\`source-viewer\`, \`source-viewer-path\`)
|
|
205
205
|
|
|
206
206
|
## Navegacion y rutas
|
|
207
207
|
|
|
@@ -221,13 +221,14 @@ Claves principales:
|
|
|
221
221
|
Los configs de version soportan multiples tipos:
|
|
222
222
|
|
|
223
223
|
- \`routes-md\`: Rutas markdown con \`title\`, \`description\` (centrados via \`titlePosition\`, \`descriptionPosition\`)
|
|
224
|
+
- \`routes-source-viewer\`: Contenedores de codigo fuente con \`source-viewer: true\` y \`source-viewer-path\`
|
|
224
225
|
- \`routes-html\`: Rutas de paginas HTML por idioma
|
|
225
226
|
- \`routes-video\`: Config de video con \`video.videoType\` (youtube, vimeo, mp4, etc.) y \`video.pathVideo\`
|
|
226
227
|
- \`routes-audio\`: Config de audio con \`audio.audioType\` (youtube, mp3, etc.) y \`audio.pathAudio\`
|
|
227
228
|
- \`authorization\` (md/html/video): guardia de acceso por clave, roles y autenticacion externa
|
|
228
|
-
- \`menus-header-md\`, \`menus-header-html\`, \`menus-header-video\`, \`menus-header-audio\`: menus por tipo
|
|
229
|
-
- \`hierarchyPage\`: orden de contenedores en la pagina \`{ md: 0,
|
|
230
|
-
- \`hierarchyMenu\`: orden de secciones del menu \`{ md: 0,
|
|
229
|
+
- \`menus-header-md\`, \`menus-header-source-viewer\`, \`menus-header-html\`, \`menus-header-video\`, \`menus-header-audio\`: menus por tipo
|
|
230
|
+
- \`hierarchyPage\`: orden de contenedores en la pagina \`{ md: 0, "source-viewer": 1, html: 2, video: 3, audio: 4 }\`
|
|
231
|
+
- \`hierarchyMenu\`: orden de secciones del menu \`{ md: 0, "source-viewer": 1, html: 2, video: 3, audio: 4 }\`
|
|
231
232
|
|
|
232
233
|
Cada ruta puede incluir \`title\`, \`description\` (por idioma), \`titleCss\`, \`titlePosition: "center"\`, \`descriptionPosition: "center"\`, \`titleIsVisible\`, \`descriptionIsVisible\`.
|
|
233
234
|
|
|
@@ -243,7 +244,7 @@ Opciones por ruta en \`routes-md\`, \`routes-html\` y \`routes-video\`:
|
|
|
243
244
|
## Tipos de contenido: path vs url (HTML)
|
|
244
245
|
|
|
245
246
|
- **Markdown (\`routes-md\`)**: usa \`path\` apuntando a archivos \`.md\` locales.
|
|
246
|
-
- **HTML (\`routes-html\`)**: usa \`path\` para archivos HTML locales (sin extension .html en config
|
|
247
|
+
- **HTML (\`routes-html\`)**: usa \`path\` para archivos HTML locales (sin extension .html en config) o \`url\` para URLs externas. Con \`url\`, el iframe carga la pagina externa; no se genera archivo local.
|
|
247
248
|
- **Video (\`routes-video\`)**: usa \`video.pathVideo\` y \`video.videoType\` (youtube, vimeo, mp4, etc.).
|
|
248
249
|
|
|
249
250
|
## Variables de entorno
|
package/content/docs-pt.mjs
CHANGED
|
@@ -130,7 +130,6 @@ Referencia completa de opcoes da CLI, chaves de configuracao e recursos do runti
|
|
|
130
130
|
- \`gitpagedocs/icon.svg\` – icone padrao
|
|
131
131
|
- \`gitpagedocs/docs/versions/<ver>/config.json\` – rotas por versao
|
|
132
132
|
- \`gitpagedocs/docs/versions/<ver>/{en,pt,es}/*.md\` – docs em markdown
|
|
133
|
-
- \`gitpagedocs/docs/versions/<ver>/{en,pt,es}/source-viewer\` – visualizador de codigo (estilo GitHub)
|
|
134
133
|
- \`gitpagedocs/layouts/\` – apenas com \`--layoutconfig\`
|
|
135
134
|
|
|
136
135
|
## Tipos de conteudo
|
|
@@ -138,20 +137,20 @@ Referencia completa de opcoes da CLI, chaves de configuracao e recursos do runti
|
|
|
138
137
|
| Tipo | Chave config | Descricao |
|
|
139
138
|
|------|--------------|-----------|
|
|
140
139
|
| Markdown | \`routes-md\` | Arquivos .md com \`path\` por idioma |
|
|
141
|
-
| HTML | \`routes-html\` | \`path\`
|
|
140
|
+
| HTML | \`routes-html\` | \`path\` local ou \`url\` externa |
|
|
142
141
|
| Video | \`routes-video\` | \`video.pathVideo\`, \`video.videoType\` |
|
|
143
142
|
| Audio | \`routes-audio\` | \`audio.pathAudio\`, \`audio.audioType\` |
|
|
144
143
|
|
|
145
144
|
## Visualizador de codigo fonte
|
|
146
145
|
|
|
147
|
-
|
|
146
|
+
O config da versao pode renderizar um container **Codigo fonte** via \`routes-source-viewer\` e \`menus-header-source-viewer\`. O viewer le a arvore do repositorio no GitHub em tempo de execucao e aplica o tema atual da documentacao.
|
|
148
147
|
|
|
149
|
-
- Arvore de
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
148
|
+
- Arvore do repositorio a partir de \`source-viewer-path\`; a branch padrao e \`main\`
|
|
149
|
+
- Navegacao por pastas e filtro de arquivos
|
|
150
|
+
- Listagem de diretorios no estilo GitHub
|
|
151
|
+
- Renderizacao de codigo com numeros de linha
|
|
152
|
+
- Alternancia preview/codigo para Markdown, incluindo \`README.md\`
|
|
153
|
+
- Pastas recolhiveis na lateral
|
|
155
154
|
|
|
156
155
|
## Chaves de config (site)
|
|
157
156
|
|
|
@@ -202,6 +201,7 @@ Principais chaves:
|
|
|
202
201
|
- \`id\`: identificador da versao
|
|
203
202
|
- \`path\`: caminho do config da versao
|
|
204
203
|
- links opcionais (\`ProjectLink\`, \`branch\`, \`release\`, \`commit\`)
|
|
204
|
+
- metadados opcionais do source viewer (\`source-viewer\`, \`source-viewer-path\`)
|
|
205
205
|
|
|
206
206
|
## Navegacao e rotas
|
|
207
207
|
|
|
@@ -221,13 +221,14 @@ Principais chaves:
|
|
|
221
221
|
Configs de versao suportam multiplos tipos:
|
|
222
222
|
|
|
223
223
|
- \`routes-md\`: Rotas markdown com \`title\`, \`description\` (centralizados via \`titlePosition\`, \`descriptionPosition\`)
|
|
224
|
+
- \`routes-source-viewer\`: Containers de codigo fonte com \`source-viewer: true\` e \`source-viewer-path\`
|
|
224
225
|
- \`routes-html\`: Caminhos de paginas HTML por idioma
|
|
225
226
|
- \`routes-video\`: Config de video com \`video.videoType\` (youtube, vimeo, mp4, etc.) e \`video.pathVideo\`
|
|
226
227
|
- \`routes-audio\`: Config de audio com \`audio.audioType\` (youtube, mp3, etc.) e \`audio.pathAudio\`
|
|
227
228
|
- \`authorization\` (md/html/video): guarda de acesso por chave, papeis e autenticacao externa
|
|
228
|
-
- \`menus-header-md\`, \`menus-header-html\`, \`menus-header-video\`, \`menus-header-audio\`: menus por tipo
|
|
229
|
-
- \`hierarchyPage\`: ordem dos containers na pagina \`{ md: 0,
|
|
230
|
-
- \`hierarchyMenu\`: ordem das secoes do menu \`{ md: 0,
|
|
229
|
+
- \`menus-header-md\`, \`menus-header-source-viewer\`, \`menus-header-html\`, \`menus-header-video\`, \`menus-header-audio\`: menus por tipo
|
|
230
|
+
- \`hierarchyPage\`: ordem dos containers na pagina \`{ md: 0, "source-viewer": 1, html: 2, video: 3, audio: 4 }\`
|
|
231
|
+
- \`hierarchyMenu\`: ordem das secoes do menu \`{ md: 0, "source-viewer": 1, html: 2, video: 3, audio: 4 }\`
|
|
231
232
|
|
|
232
233
|
Cada rota pode incluir \`title\`, \`description\` (por idioma), \`titleCss\`, \`titlePosition: "center"\`, \`descriptionPosition: "center"\`, \`titleIsVisible\`, \`descriptionIsVisible\`.
|
|
233
234
|
|
|
@@ -243,7 +244,7 @@ Opcoes por rota em \`routes-md\`, \`routes-html\` e \`routes-video\`:
|
|
|
243
244
|
## Tipos de conteudo: path vs url (HTML)
|
|
244
245
|
|
|
245
246
|
- **Markdown (\`routes-md\`)**: usa \`path\` apontando para arquivos \`.md\` locais.
|
|
246
|
-
- **HTML (\`routes-html\`)**: usa \`path\` para arquivos HTML locais (sem extensao .html no config
|
|
247
|
+
- **HTML (\`routes-html\`)**: usa \`path\` para arquivos HTML locais (sem extensao .html no config) ou \`url\` para URLs externas. Com \`url\`, o iframe carrega a pagina externa; nenhum arquivo local e gerado.
|
|
247
248
|
- **Video (\`routes-video\`)**: usa \`video.pathVideo\` e \`video.videoType\` (youtube, vimeo, mp4, etc.).
|
|
248
249
|
|
|
249
250
|
## Variaveis de ambiente
|
package/contracts/index.mjs
CHANGED
|
File without changes
|