@gitpagedocs/cli 0.0.12 → 0.0.14
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 +3 -1
- package/builders/config-orchestrator.mjs +2 -1
- package/builders/route-builders.mjs +7 -5
- package/builders/version-config-builder.mjs +8 -6
- package/content/assets/pagination-high.wav +0 -0
- package/content/assets/pagination-low.wav +0 -0
- package/content/assets/pagination-reference.pdf +80 -0
- package/content/container-pagination.mjs +155 -0
- package/content/docs-en.mjs +39 -8
- package/content/docs-es.mjs +39 -8
- package/content/docs-pt.mjs +39 -8
- package/content/markdown-markers.mjs +153 -0
- package/content/overviews-en.mjs +2 -0
- package/content/overviews-es.mjs +2 -0
- package/content/overviews-pt.mjs +2 -0
- package/content/pagination-html.mjs +39 -0
- package/content/practical-en.mjs +3 -3
- package/content/practical-es.mjs +3 -3
- package/content/practical-pt.mjs +3 -3
- package/contracts/doc-versions.mjs +2 -2
- package/data/default-site-config.mjs +30 -0
- package/data/i18n-langmenu.mjs +3 -0
- package/data/menu-sections.mjs +2 -1
- package/data/paginated-pages.mjs +77 -0
- package/data/path-mappings.mjs +2 -0
- package/data/route-metas.mjs +8 -0
- package/package.json +3 -3
- package/runtime/doc-path-resolver.mjs +5 -0
- package/runtime/output.mjs +13 -10
package/README.md
CHANGED
|
@@ -39,7 +39,9 @@ The AI-CLI implementation lives in `cli/ai/` (relocated from the frontend so the
|
|
|
39
39
|
|
|
40
40
|
## Generated documentation and themes
|
|
41
41
|
|
|
42
|
-
Version 0.0.
|
|
42
|
+
Version 0.0.14 registers documentation versions 0.0.14, 0.0.13, 0.0.12, 0.0.11, 0.0.10 and 0.0.9, newest first, with English, Portuguese and Spanish pages. Existing older folders are preserved. Source content lives in `content/`; defaults and UI labels live in `data/`; edit these sources before regeneration. The published package includes the English PDF guide and the local HTML integration for the externally hosted DOOM player.
|
|
43
|
+
|
|
44
|
+
The scaffold includes independent file pagination for Markdown, HTML, video, audio and PDF in page 50, with two localized HTML samples, local WAV tracks and a PDF reference. Configure shared controls in `site.containerPagination` and each sequence in its route's `pagination.items`. The generated pagination and Markdown markers guides explain defaults, route overrides, focus/search integration and theme-aware highlights linked from the document index. `RouteGuideSpeciFicbrand` keeps its existing heading-filter behavior.
|
|
43
45
|
|
|
44
46
|
The scaffold demonstrates parent Markdown destinations with recursive submenus and navigable breadcrumbs, PDF routes/actions, and a page with ordered, repeated Markdown/HTML/video/audio/PDF blocks. Route titles and descriptions have independent placement settings. Focus mode provides source actions and eight document/section navigation controls; browser narration is configured separately. See the generated configuration, content-blocks, focus, accessibility and HTML/PDF guides for complete examples.
|
|
45
47
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { LAYOUTS, FALLBACK_LAYOUTS } from "../data/layouts.mjs";
|
|
4
4
|
import { DOCS } from "../content/docs.mjs";
|
|
5
5
|
import { HTML_DOOM } from "../content/html-doom.mjs";
|
|
6
|
+
import { PAGINATION_HTML } from "../content/pagination-html.mjs";
|
|
6
7
|
import { DOC_VERSIONS } from "../data/version-constants.mjs";
|
|
7
8
|
import { buildRootConfig } from "./root-config-builder.mjs";
|
|
8
9
|
import { buildVersionConfig } from "./version-config-builder.mjs";
|
|
@@ -30,7 +31,7 @@ export function buildConfigArtifacts(options = {}) {
|
|
|
30
31
|
layoutsConfig,
|
|
31
32
|
fallbackLayoutsConfig,
|
|
32
33
|
docs: DOCS,
|
|
33
|
-
docsHtml: { doom: HTML_DOOM },
|
|
34
|
+
docsHtml: { doom: HTML_DOOM, ...PAGINATION_HTML },
|
|
34
35
|
versionConfigs,
|
|
35
36
|
};
|
|
36
37
|
}
|
|
@@ -53,6 +53,8 @@ export function buildMdRoute(versionId, routeId, pathByLang, titles, description
|
|
|
53
53
|
audio,
|
|
54
54
|
authorization,
|
|
55
55
|
hierarchyPage,
|
|
56
|
+
pagination,
|
|
57
|
+
markdownMarkers,
|
|
56
58
|
} = options;
|
|
57
59
|
const out = {
|
|
58
60
|
id: routeId,
|
|
@@ -68,7 +70,7 @@ export function buildMdRoute(versionId, routeId, pathByLang, titles, description
|
|
|
68
70
|
RouteguideBrandPosition,
|
|
69
71
|
RouteguideBrandContainerTop,
|
|
70
72
|
};
|
|
71
|
-
return assignDefined(out, { container, audio, authorization, hierarchyPage });
|
|
73
|
+
return assignDefined(out, { container, audio, authorization, hierarchyPage, pagination, markdownMarkers });
|
|
72
74
|
}
|
|
73
75
|
|
|
74
76
|
export function buildHtmlRoute(versionId, routeId, pathByLang, titles, descriptions, options = {}) {
|
|
@@ -77,7 +79,7 @@ export function buildHtmlRoute(versionId, routeId, pathByLang, titles, descripti
|
|
|
77
79
|
}
|
|
78
80
|
|
|
79
81
|
export function buildVideoRoute(versionId, routeId, videoType, pathVideo, titles, descriptions, options = {}) {
|
|
80
|
-
const { container, browseAll = false, authorization } = options;
|
|
82
|
+
const { container, browseAll = false, authorization, pagination } = options;
|
|
81
83
|
const obj = {
|
|
82
84
|
id: routeId,
|
|
83
85
|
title: titles ?? { pt: "Vídeo", en: "Video", es: "Vídeo" },
|
|
@@ -87,7 +89,7 @@ export function buildVideoRoute(versionId, routeId, videoType, pathVideo, titles
|
|
|
87
89
|
browseAll,
|
|
88
90
|
video: { videoType: perLanguage(videoType), pathVideo: perLanguage(pathVideo) },
|
|
89
91
|
};
|
|
90
|
-
return assignDefined(obj, { container, authorization });
|
|
92
|
+
return assignDefined(obj, { container, authorization, pagination });
|
|
91
93
|
}
|
|
92
94
|
|
|
93
95
|
export function buildAudioRoute(versionId, routeId, audioType, pathAudio, titles, descriptions, options = {}) {
|
|
@@ -100,7 +102,7 @@ export function buildAudioRoute(versionId, routeId, audioType, pathAudio, titles
|
|
|
100
102
|
}
|
|
101
103
|
|
|
102
104
|
export function buildPdfRoute(meta, pathPdf, options = {}) {
|
|
103
|
-
const { container, authorization, pdf } = options;
|
|
105
|
+
const { container, authorization, pdf, pagination } = options;
|
|
104
106
|
const route = {
|
|
105
107
|
id: meta.id,
|
|
106
108
|
title: meta.titles,
|
|
@@ -109,7 +111,7 @@ export function buildPdfRoute(meta, pathPdf, options = {}) {
|
|
|
109
111
|
...withDefaults(ROUTE_FRAME_DEFAULTS, options),
|
|
110
112
|
pdf: { pathPdf: perLanguage(pathPdf), ...pdf },
|
|
111
113
|
};
|
|
112
|
-
return assignDefined(route, { container, authorization });
|
|
114
|
+
return assignDefined(route, { container, authorization, pagination });
|
|
113
115
|
}
|
|
114
116
|
|
|
115
117
|
export function buildSourceViewerRoute(routeId, sourceViewerPath, titles, descriptions, options = {}) {
|
|
@@ -32,6 +32,7 @@ import { resolveSourceViewerPath } from "./project-links.mjs";
|
|
|
32
32
|
import { MARKDOWN_MENU_SECTIONS } from "../data/menu-sections.mjs";
|
|
33
33
|
import { SUPPORTED_LANGUAGES } from "../contracts/languages.mjs";
|
|
34
34
|
import { COMPOSED_PAGES } from "../data/composed-pages.mjs";
|
|
35
|
+
import { buildPaginatedRoutes, PAGINATED_PAGE } from "../data/paginated-pages.mjs";
|
|
35
36
|
|
|
36
37
|
/** Demo route protections showcasing the "Authorized Routes" feature. They are
|
|
37
38
|
* applied only to the official (non-parameterized) scaffold — user sites
|
|
@@ -245,6 +246,7 @@ function buildVersionMenus(versionId) {
|
|
|
245
246
|
export function buildVersionConfig(versionId, options = {}) {
|
|
246
247
|
const includeDemoAuthorization = !options.githubOwner && !options.githubRepo;
|
|
247
248
|
const menus = buildVersionMenus(versionId);
|
|
249
|
+
const paginated = buildPaginatedRoutes(versionId);
|
|
248
250
|
|
|
249
251
|
return {
|
|
250
252
|
auth: {
|
|
@@ -259,13 +261,13 @@ export function buildVersionConfig(versionId, options = {}) {
|
|
|
259
261
|
{ type: "jwt", enabled: true, tokenStorageKey: "git-page-docs:jwt-token", rolesClaimPath: "roles" },
|
|
260
262
|
],
|
|
261
263
|
},
|
|
262
|
-
"routes-md": buildVersionMdRoutes(versionId, includeDemoAuthorization),
|
|
264
|
+
"routes-md": [...buildVersionMdRoutes(versionId, includeDemoAuthorization), ...paginated["routes-md"]],
|
|
263
265
|
"routes-source-viewer": buildVersionSourceViewerRoutes(options),
|
|
264
|
-
"routes-html": buildVersionHtmlRoutes(versionId),
|
|
265
|
-
"routes-video": buildVersionVideoRoutes(versionId, includeDemoAuthorization),
|
|
266
|
-
"routes-audio": buildVersionAudioRoutes(versionId),
|
|
267
|
-
"routes-pdf": [buildPdfRoute(PDF_GUIDE_META, `gitpagedocs/docs/versions/${versionId}/en/${PDF_GUIDE_FILENAME}`)],
|
|
268
|
-
pages: structuredClone(COMPOSED_PAGES),
|
|
266
|
+
"routes-html": [...buildVersionHtmlRoutes(versionId), ...paginated["routes-html"]],
|
|
267
|
+
"routes-video": [...buildVersionVideoRoutes(versionId, includeDemoAuthorization), ...paginated["routes-video"]],
|
|
268
|
+
"routes-audio": [...buildVersionAudioRoutes(versionId), ...paginated["routes-audio"]],
|
|
269
|
+
"routes-pdf": [buildPdfRoute(PDF_GUIDE_META, `gitpagedocs/docs/versions/${versionId}/en/${PDF_GUIDE_FILENAME}`), ...paginated["routes-pdf"]],
|
|
270
|
+
pages: structuredClone([...COMPOSED_PAGES, PAGINATED_PAGE]),
|
|
269
271
|
"menus-header-md": menus.md,
|
|
270
272
|
"menus-header-source-viewer": menus.sourceViewer,
|
|
271
273
|
"menus-header-html": menus.html,
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
%PDF-1.4
|
|
2
|
+
%���� ReportLab Generated PDF document (opensource)
|
|
3
|
+
1 0 obj
|
|
4
|
+
<<
|
|
5
|
+
/F1 2 0 R /F2 3 0 R /F3 4 0 R
|
|
6
|
+
>>
|
|
7
|
+
endobj
|
|
8
|
+
2 0 obj
|
|
9
|
+
<<
|
|
10
|
+
/BaseFont /Helvetica /Encoding /WinAnsiEncoding /Name /F1 /Subtype /Type1 /Type /Font
|
|
11
|
+
>>
|
|
12
|
+
endobj
|
|
13
|
+
3 0 obj
|
|
14
|
+
<<
|
|
15
|
+
/BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding /Name /F2 /Subtype /Type1 /Type /Font
|
|
16
|
+
>>
|
|
17
|
+
endobj
|
|
18
|
+
4 0 obj
|
|
19
|
+
<<
|
|
20
|
+
/BaseFont /Courier /Encoding /WinAnsiEncoding /Name /F3 /Subtype /Type1 /Type /Font
|
|
21
|
+
>>
|
|
22
|
+
endobj
|
|
23
|
+
5 0 obj
|
|
24
|
+
<<
|
|
25
|
+
/Contents 9 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 8 0 R /Resources <<
|
|
26
|
+
/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ]
|
|
27
|
+
>> /Rotate 0 /Trans <<
|
|
28
|
+
|
|
29
|
+
>>
|
|
30
|
+
/Type /Page
|
|
31
|
+
>>
|
|
32
|
+
endobj
|
|
33
|
+
6 0 obj
|
|
34
|
+
<<
|
|
35
|
+
/PageMode /UseNone /Pages 8 0 R /Type /Catalog
|
|
36
|
+
>>
|
|
37
|
+
endobj
|
|
38
|
+
7 0 obj
|
|
39
|
+
<<
|
|
40
|
+
/Author (Vidigal-code) /CreationDate (D:20261018093432-03'00') /Creator (\(unspecified\)) /Keywords () /ModDate (D:20261018093432-03'00') /Producer (ReportLab PDF Library - \(opensource\))
|
|
41
|
+
/Subject (\(unspecified\)) /Title (GitPageDocs pagination quick reference) /Trapped /False
|
|
42
|
+
>>
|
|
43
|
+
endobj
|
|
44
|
+
8 0 obj
|
|
45
|
+
<<
|
|
46
|
+
/Count 1 /Kids [ 5 0 R ] /Type /Pages
|
|
47
|
+
>>
|
|
48
|
+
endobj
|
|
49
|
+
9 0 obj
|
|
50
|
+
<<
|
|
51
|
+
/Filter [ /ASCII85Decode /FlateDecode ] /Length 1577
|
|
52
|
+
>>
|
|
53
|
+
stream
|
|
54
|
+
Gatm;gMYb8&:O:S$k*hH;jlcJU(SS6,Km6P3,rcBI44rr-C</l,aVdhI;+dmn(Esp8WH6[66O(>GKDjdB'.;I4`^)am,+T]H8h\<@uiaEVAXZQ'@QLT9r<:;mWf==7KXP=@jd:,1#B^#j+`+$%*8g.Om`b#M-OsUn4:gt@*NHf@'Y<&T01^DpPnFoam&Hqf9=>(Vsu&Rdc]L`a7&8%E]gn"HlPq2VWfs4?Ps)4j1"9+4'6Q5""=Kb<8\Yp"6^7(T]6O<.#uF>U-UmIaRT4;(`>Q;pSm5<aAOfkEogD*KA4$!2dEVX16M1^l#LDJY@@'I/+V:SFm[1-_/U:=nWqRZCimtU9U&4l3b.HI<8NphqJCQPThdTkjg%[`8VJFhkksY3DM=\*7T7UcN@8G8k9/;'`Ciq)9UZ#A9FG!$`Fdo!#tsDR9"gNR'tBXcRY7gMQrN[I-^pqk%,FeMr>d@4Cb$a;ggeNU/B^`2)T>:6$1F'G.MQPp"Xb%@nh*_T+C+Xd*Z8X37Ub@e&_E02)b3Nl6L7W1MWb%o!k@S3%%6!ngR-aJG")RX(l'e$oV6AYC[?X^qZ9BnbFTZebhb&A1)E)srY]MN@lEWf\Q4:\2q#a$2fQCO3-qlf0=fX^aK=^tiZ/KCj)^Hr<80!oA:uTp>RSfI<Y>omKQ=XQm"0=>B*udRH,c9mH4qULKJimcAF%.OMSQd*A[u)kL8EYX?Co0F,'']LSHIG3h9BpUS51WrL8;e`e"`?e,n&J"C/ulHYA$o2^?TAb0F=;a(u0(N[*UhRq3(;0;5/@pQ+I$EO9s+LJ)FIKbu1DVAa%@(jnCW/Qp[p"0ecF:V.o??=QM*mk.[&9/gra+FIs257f*?B-"_5sL:"&YF="=a6EuE[GpgF9#FVKa#-WC#X69%s/=U;9m=K>8+uBEZ^XKV6Q-APQ,]0Yk!\fMMH=Q/_'&9/c/E&iji8.^[G/a&j.II0mDJJ5=2+ej$5KV,MB-nQd,oZ#a0cdL:>b2dV5!O&2qX1es-Q'BYC_iDnZ(fD:CLVJ8=YpaImuY8KMs7<Y(^SnolcN#dMF3^6dh(S#;f#)0#7hsd2FG!hC7"h$kt=*&&ad%g`5]NVa*rMd^X]47?V"f#!S`(.q:?FqD^_3Sps0K7CS*MNU56P_h7i]-KDGdlJ)kH>Nupg&:8Pute`[1%i])=T\kf.7%4bAAD7rgXZ)ZeW&_"24*h%`k$sh[BO1bHZ*nQ-HX#4B^9?m%9%XZ[dJ[(`"BpB)>^q4"V_Ek*?.@O])Xf7C2-Jbq-q(M1c@9=;LCM_1OQO=ZVb<b_]#$g&HITTHCe\.g((WG26lOCaEP8.moHk"Dc#(ptkDs;k["ati$jV%1B>?ZJcUoQ/AHKc)02eOGB@Jht)Z`2=bNtrH7(T`NqGs)E@k<+Ll<D'SE8+0FJ)Wr3eN#)tl1bLss*`.qYQpP^mG_Q=XHD>&nd=I8lqmEbV\uFFlouqU0>id0'Z_NSGjmj2M;j*']'Z&IJB\EC,YKggTqX2Zh063ZooThcQ>r4j&_Xoa)XtVsRLOY*o4Z,Gp:kXU+5;:JH0QZ%p(MN8eS`BH-~>endstream
|
|
55
|
+
endobj
|
|
56
|
+
xref
|
|
57
|
+
0 10
|
|
58
|
+
0000000000 65535 f
|
|
59
|
+
0000000061 00000 n
|
|
60
|
+
0000000112 00000 n
|
|
61
|
+
0000000219 00000 n
|
|
62
|
+
0000000331 00000 n
|
|
63
|
+
0000000436 00000 n
|
|
64
|
+
0000000639 00000 n
|
|
65
|
+
0000000707 00000 n
|
|
66
|
+
0000001011 00000 n
|
|
67
|
+
0000001070 00000 n
|
|
68
|
+
trailer
|
|
69
|
+
<<
|
|
70
|
+
/ID
|
|
71
|
+
[<29eaced5e29d56d0e45d0ea8c1d9369d><29eaced5e29d56d0e45d0ea8c1d9369d>]
|
|
72
|
+
% ReportLab generated PDF document -- digest (opensource)
|
|
73
|
+
|
|
74
|
+
/Info 7 0 R
|
|
75
|
+
/Root 6 0 R
|
|
76
|
+
/Size 10
|
|
77
|
+
>>
|
|
78
|
+
startxref
|
|
79
|
+
2738
|
|
80
|
+
%%EOF
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { getDefaultSiteConfig } from "../data/default-site-config.mjs";
|
|
2
|
+
|
|
3
|
+
const defaults = JSON.stringify({ site: { containerPagination: getDefaultSiteConfig("").containerPagination } }, null, 2);
|
|
4
|
+
const route = JSON.stringify({
|
|
5
|
+
id: 51,
|
|
6
|
+
path: { en: "gitpagedocs/docs/versions/<version>/en/pagination-first.md", pt: "gitpagedocs/docs/versions/<version>/pt/pagination-first.md", es: "gitpagedocs/docs/versions/<version>/es/pagination-first.md" },
|
|
7
|
+
pagination: { items: [
|
|
8
|
+
{ routeId: 51, title: { en: "First lesson", pt: "Primeira lição", es: "Primera lección" } },
|
|
9
|
+
{ routeId: 1, title: { en: "Getting started", pt: "Primeiros passos", es: "Primeros pasos" }, description: { en: "Configure your project", pt: "Configure seu projeto", es: "Configura tu proyecto" } },
|
|
10
|
+
] },
|
|
11
|
+
}, null, 2);
|
|
12
|
+
|
|
13
|
+
export const PAGINATION_DOCS = {
|
|
14
|
+
en: `# Paginated containers
|
|
15
|
+
|
|
16
|
+
Show several files in one Markdown, HTML, video, audio or PDF container. Add the files to the matching route collection, then reference their IDs in an ordered \`pagination.items\` array on the container's route. Each container has an independent selection. Use ordered content blocks when one page needs several containers or different content types.
|
|
17
|
+
|
|
18
|
+
## Site defaults
|
|
19
|
+
|
|
20
|
+
Configure \`site.containerPagination\` in \`gitpagedocs/config.json\`. All four controls are enabled by default: first, previous, next and last. They appear below the content, aligned right, with icons and a current/total counter.
|
|
21
|
+
|
|
22
|
+
\`\`\`json
|
|
23
|
+
${defaults}
|
|
24
|
+
\`\`\`
|
|
25
|
+
|
|
26
|
+
## Per-route files and metadata
|
|
27
|
+
|
|
28
|
+
Add the following to \`routes-md\` in the version configuration. Route 1 must already exist. The first item may reference the owner route itself. For HTML, video, audio and PDF, use the same pagination structure inside the corresponding \`routes-*\` collection.
|
|
29
|
+
|
|
30
|
+
\`\`\`json
|
|
31
|
+
${route}
|
|
32
|
+
\`\`\`
|
|
33
|
+
|
|
34
|
+
| Option | Values and behavior |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| \`enabled\` | Enable or disable pagination; the route overrides the site default. |
|
|
37
|
+
| \`alignment\` | \`left\`, \`center\`, \`right\`; default \`right\`. |
|
|
38
|
+
| \`placement\` | \`top\`, \`bottom\`, \`both\`; default \`bottom\`. |
|
|
39
|
+
| \`display\` | \`icon\` or \`text\`; default \`icon\`. |
|
|
40
|
+
| \`showCount\` | Show the current item and total; default \`true\`. |
|
|
41
|
+
| \`controls\` | Independently enable \`first\`, \`previous\`, \`next\`, \`last\`. |
|
|
42
|
+
| \`icons\` / \`iconSize\` | React Icons tags for those actions and a CSS size. Colors follow the active theme. |
|
|
43
|
+
| \`labels\` | Strings or language maps for each action and \`pages\`; accessible names remain in icon mode. |
|
|
44
|
+
| \`items\` | Ordered entries with an integer \`routeId\` from the same content type. |
|
|
45
|
+
| \`items[].title\` / \`description\` | Language maps overriding metadata for that item. Omitted fields use the route metadata. |
|
|
46
|
+
|
|
47
|
+
Controls, icons and labels merge with site defaults. Endpoint buttons disable when their destination is unavailable. Disabled pagination shows the original route. Unknown or malformed references are reported in the browser console; inaccessible sources are excluded. Pagination does not recursively expand another route's pagination.
|
|
48
|
+
|
|
49
|
+
## Focus mode, search and media
|
|
50
|
+
|
|
51
|
+
Markdown containers retain their pagination inside focus mode. Changing a file keeps focus open, updates the title, description and source actions, and returns to the first section. Ctrl+K indexes every available item of a container with a menu destination; selecting a result opens that item inside its owner page. The current selection is kept while navigating the loaded documentation and resets on a language/version change or reload.
|
|
52
|
+
|
|
53
|
+
The selected route keeps the existing metadata layout options. Markdown title and description remain outside its rendered Markdown. Media changes replace the previous player, preserving the site's exclusive-playback behavior. Normal footer navigation is separate: \`site.documentNavigation.position\` still defaults to \`center\`.
|
|
54
|
+
|
|
55
|
+
## Included validation example
|
|
56
|
+
|
|
57
|
+
Open Guides > Read and explore > Paginated containers example (page 50). It contains a three-file Markdown sequence, two HTML files, MP4/WebM versions of the public MDN flower clip, two local two-second WAV tones and two different English PDFs. The video requires internet access. The other sample files ship with the documentation. Change each container independently, try Ctrl+K, then open the Markdown sequence in focus mode.
|
|
58
|
+
`,
|
|
59
|
+
pt: `# Containers paginados
|
|
60
|
+
|
|
61
|
+
Mostre vários arquivos em um único container Markdown, HTML, vídeo, áudio ou PDF. Cadastre os arquivos na coleção de rotas correspondente e informe os IDs, na ordem desejada, em \`pagination.items\` na rota do container. Cada container mantém sua própria seleção. Use blocos de conteúdo ordenados para combinar vários containers e tipos em uma página.
|
|
62
|
+
|
|
63
|
+
## Padrões do site
|
|
64
|
+
|
|
65
|
+
Configure \`site.containerPagination\` em \`gitpagedocs/config.json\`. Os quatro controles ficam ativos por padrão: primeira página, anterior, próxima e última. Aparecem abaixo do conteúdo, à direita, com ícones e contador de página atual/total.
|
|
66
|
+
|
|
67
|
+
\`\`\`json
|
|
68
|
+
${defaults}
|
|
69
|
+
\`\`\`
|
|
70
|
+
|
|
71
|
+
## Arquivos e metadados por rota
|
|
72
|
+
|
|
73
|
+
Adicione este exemplo a \`routes-md\` na configuração da versão. A rota 1 já deve existir. O primeiro item pode apontar para a própria rota. HTML, vídeo, áudio e PDF utilizam a mesma estrutura na coleção \`routes-*\` correspondente.
|
|
74
|
+
|
|
75
|
+
\`\`\`json
|
|
76
|
+
${route}
|
|
77
|
+
\`\`\`
|
|
78
|
+
|
|
79
|
+
| Opção | Valores e comportamento |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| \`enabled\` | Ativa ou desativa; a rota tem prioridade sobre o padrão do site. |
|
|
82
|
+
| \`alignment\` | \`left\`, \`center\` ou \`right\`; padrão \`right\`. |
|
|
83
|
+
| \`placement\` | \`top\`, \`bottom\` ou \`both\`; padrão \`bottom\`. |
|
|
84
|
+
| \`display\` | \`icon\` ou \`text\`; padrão \`icon\`. |
|
|
85
|
+
| \`showCount\` | Exibe página atual e total; padrão \`true\`. |
|
|
86
|
+
| \`controls\` | Ativa individualmente \`first\`, \`previous\`, \`next\` e \`last\`. |
|
|
87
|
+
| \`icons\` / \`iconSize\` | Tags do React Icons e tamanho CSS; cores acompanham o tema. |
|
|
88
|
+
| \`labels\` | Texto ou mapa de idiomas para as ações e \`pages\`; nomes acessíveis permanecem no modo ícone. |
|
|
89
|
+
| \`items\` | Lista ordenada com \`routeId\` inteiro do mesmo tipo de conteúdo. |
|
|
90
|
+
| \`items[].title\` / \`description\` | Mapas de idiomas que substituem os metadados do item; campos omitidos usam os metadados da rota. |
|
|
91
|
+
|
|
92
|
+
Controles, ícones e rótulos complementam os padrões globais. Botões sem destino disponível ficam desabilitados. Desativar a paginação mostra a rota original. Referências inválidas são informadas no console; fontes sem autorização são excluídas. A paginação de outra rota não é expandida recursivamente.
|
|
93
|
+
|
|
94
|
+
## Foco, busca e mídia
|
|
95
|
+
|
|
96
|
+
A paginação Markdown aparece no modo foco. Trocar de arquivo mantém o foco aberto, atualiza título, descrição e ações de origem, e retorna à primeira seção. O Ctrl+K inclui os itens disponíveis de containers com destino no menu; o resultado abre o item na página proprietária. A seleção é mantida durante a navegação na documentação carregada e reiniciada ao mudar idioma, versão ou recarregar.
|
|
97
|
+
|
|
98
|
+
O arquivo selecionado utiliza as opções existentes de disposição dos metadados. Título e descrição do Markdown permanecem fora do Markdown renderizado. A troca de mídia substitui o player anterior e preserva a reprodução exclusiva. A navegação geral do rodapé é independente: \`site.documentNavigation.position\` continua com padrão \`center\`.
|
|
99
|
+
|
|
100
|
+
## Exemplo para validar
|
|
101
|
+
|
|
102
|
+
Abra Guias > Leia e explore > Exemplo de containers paginados (página 50). Há três arquivos Markdown, dois HTML, versões MP4/WebM do vídeo público de flores da MDN, dois tons WAV locais de dois segundos e dois PDFs diferentes em inglês. O vídeo precisa de internet; os demais arquivos acompanham a documentação. Navegue em cada container, teste o Ctrl+K e abra a sequência Markdown no modo foco.
|
|
103
|
+
`,
|
|
104
|
+
es: `# Contenedores paginados
|
|
105
|
+
|
|
106
|
+
Muestra varios archivos en un único contenedor Markdown, HTML, vídeo, audio o PDF. Registra los archivos en la colección de rutas correspondiente y añade sus IDs, en orden, a \`pagination.items\` en la ruta del contenedor. Cada contenedor conserva su propia selección. Usa bloques de contenido ordenados para combinar varios contenedores y tipos en una página.
|
|
107
|
+
|
|
108
|
+
## Valores del sitio
|
|
109
|
+
|
|
110
|
+
Configura \`site.containerPagination\` en \`gitpagedocs/config.json\`. Los cuatro controles están activos: primera página, anterior, siguiente y última. Aparecen debajo del contenido, a la derecha, con iconos y contador de página actual/total.
|
|
111
|
+
|
|
112
|
+
\`\`\`json
|
|
113
|
+
${defaults}
|
|
114
|
+
\`\`\`
|
|
115
|
+
|
|
116
|
+
## Archivos y metadatos por ruta
|
|
117
|
+
|
|
118
|
+
Añade este ejemplo a \`routes-md\` en la configuración de la versión. La ruta 1 debe existir. El primer elemento puede apuntar a la propia ruta. HTML, vídeo, audio y PDF usan la misma estructura en la colección \`routes-*\` correspondiente.
|
|
119
|
+
|
|
120
|
+
\`\`\`json
|
|
121
|
+
${route}
|
|
122
|
+
\`\`\`
|
|
123
|
+
|
|
124
|
+
| Opción | Valores y comportamiento |
|
|
125
|
+
| --- | --- |
|
|
126
|
+
| \`enabled\` | Activa o desactiva; la ruta tiene prioridad sobre el sitio. |
|
|
127
|
+
| \`alignment\` | \`left\`, \`center\` o \`right\`; predeterminado \`right\`. |
|
|
128
|
+
| \`placement\` | \`top\`, \`bottom\` o \`both\`; predeterminado \`bottom\`. |
|
|
129
|
+
| \`display\` | \`icon\` o \`text\`; predeterminado \`icon\`. |
|
|
130
|
+
| \`showCount\` | Muestra la página actual y el total; predeterminado \`true\`. |
|
|
131
|
+
| \`controls\` | Activa individualmente \`first\`, \`previous\`, \`next\` y \`last\`. |
|
|
132
|
+
| \`icons\` / \`iconSize\` | Tags de React Icons y tamaño CSS; colores del tema activo. |
|
|
133
|
+
| \`labels\` | Texto o mapas de idiomas para acciones y \`pages\`; conserva nombres accesibles con iconos. |
|
|
134
|
+
| \`items\` | Lista ordenada con \`routeId\` entero del mismo tipo de contenido. |
|
|
135
|
+
| \`items[].title\` / \`description\` | Mapas de idiomas que sustituyen los metadatos; los campos omitidos usan los de la ruta. |
|
|
136
|
+
|
|
137
|
+
Controles, iconos y etiquetas complementan los valores globales. Los botones sin destino disponible se deshabilitan. Desactivar la paginación muestra la ruta original. Las referencias inválidas se notifican en la consola; las fuentes sin autorización se excluyen. No se expande recursivamente la paginación de otra ruta.
|
|
138
|
+
|
|
139
|
+
## Enfoque, búsqueda y medios
|
|
140
|
+
|
|
141
|
+
La paginación Markdown aparece en el modo enfoque. Cambiar el archivo mantiene el enfoque abierto, actualiza título, descripción y acciones del archivo, y vuelve a la primera sección. Ctrl+K incluye los elementos disponibles de contenedores con un destino en el menú; abre el elemento dentro de su página. La selección se conserva durante la navegación y se reinicia al cambiar idioma, versión o recargar.
|
|
142
|
+
|
|
143
|
+
El archivo seleccionado utiliza la disposición de metadatos existente. Título y descripción de Markdown permanecen fuera del Markdown renderizado. Cambiar de medio sustituye el reproductor anterior y conserva la reproducción exclusiva. La navegación general es independiente: \`site.documentNavigation.position\` mantiene \`center\` como valor predeterminado.
|
|
144
|
+
|
|
145
|
+
## Ejemplo de validación
|
|
146
|
+
|
|
147
|
+
Abre Guías > Lee y explora > Ejemplo de contenedores paginados (página 50). Incluye tres archivos Markdown, dos HTML, MP4/WebM del vídeo público de flores de MDN, dos tonos WAV locales de dos segundos y dos PDF diferentes en inglés. El vídeo requiere internet; los demás archivos vienen con la documentación. Navega en cada contenedor, prueba Ctrl+K y abre la secuencia Markdown en modo enfoque.
|
|
148
|
+
`,
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export const PAGINATION_FIRST_DOCS = {
|
|
152
|
+
en: "# Try container pagination\n\nThis highlighted sentence is a navigation target.\n\nUse the index to scroll to the highlight. The four buttons below this container move to the first, previous, next or last file.\n\n## Keep reading in focus mode\n\nOpen focus mode and change the container page. The overlay remains open and starts the selected file at its first section. Use Ctrl+K to find Lesson 2 or Lesson 3 directly.",
|
|
153
|
+
pt: "# Experimente a paginação\n\nEsta frase realçada é um destino de navegação.\n\nUse o índice para rolar até o destaque. Os quatro botões abaixo do container levam ao primeiro, anterior, próximo ou último arquivo.\n\n## Continue no modo foco\n\nAbra o modo foco e mude a página do container. A janela permanece aberta e inicia o arquivo selecionado na primeira seção. Use Ctrl+K para encontrar a Lição 2 ou a Lição 3 diretamente.",
|
|
154
|
+
es: "# Prueba la paginación\n\nEsta frase resaltada es un destino de navegación.\n\nUsa el índice para desplazarte al resaltado. Los cuatro botones debajo del contenedor llevan al primer archivo, al anterior, al siguiente o al último.\n\n## Continúa en modo enfoque\n\nAbre el modo enfoque y cambia la página del contenedor. La ventana permanece abierta y comienza el archivo seleccionado en su primera sección. Usa Ctrl+K para encontrar la Lección 2 o la Lección 3 directamente.",
|
|
155
|
+
};
|
package/content/docs-en.mjs
CHANGED
|
@@ -5,8 +5,13 @@ import { overviewsEn } from "./overviews-en.mjs";
|
|
|
5
5
|
import { CONTENT_BLOCKS_DOCS } from "./content-blocks.mjs";
|
|
6
6
|
import { PARENT_MENU_JSON } from "./configuration-examples.mjs";
|
|
7
7
|
import { THEME_BACKGROUND_DOCS } from "./theme-backgrounds.mjs";
|
|
8
|
+
import { PAGINATION_DOCS, PAGINATION_FIRST_DOCS } from "./container-pagination.mjs";
|
|
9
|
+
import { MARKDOWN_MARKER_DOCS } from "./markdown-markers.mjs";
|
|
8
10
|
|
|
9
11
|
export const docsEn = {
|
|
12
|
+
containerPagination: PAGINATION_DOCS.en,
|
|
13
|
+
paginationFirst: PAGINATION_FIRST_DOCS.en,
|
|
14
|
+
markdownMarkers: MARKDOWN_MARKER_DOCS.en,
|
|
10
15
|
...practicalEn,
|
|
11
16
|
...operationsEn,
|
|
12
17
|
...overviewsEn,
|
|
@@ -44,7 +49,7 @@ PDF actions use icons by default. Configure \`site.icons.PdfDownload\` (\`LuDown
|
|
|
44
49
|
|
|
45
50
|
## Route and menu example
|
|
46
51
|
|
|
47
|
-
In \`gitpagedocs/docs/versions/0.0.
|
|
52
|
+
In \`gitpagedocs/docs/versions/0.0.14/config.json\`, keep route and menu arrays at the top level:
|
|
48
53
|
|
|
49
54
|
\`\`\`json
|
|
50
55
|
{
|
|
@@ -53,9 +58,9 @@ In \`gitpagedocs/docs/versions/0.0.12/config.json\`, keep route and menu arrays
|
|
|
53
58
|
"title": { "en": "Project guide (English)", "pt": "Guia do projeto (inglês)", "es": "Guía del proyecto (inglés)" },
|
|
54
59
|
"pdf": {
|
|
55
60
|
"pathPdf": {
|
|
56
|
-
"en": "gitpagedocs/docs/versions/0.0.
|
|
57
|
-
"pt": "gitpagedocs/docs/versions/0.0.
|
|
58
|
-
"es": "gitpagedocs/docs/versions/0.0.
|
|
61
|
+
"en": "gitpagedocs/docs/versions/0.0.14/en/gitpagedocs-project-guide.pdf",
|
|
62
|
+
"pt": "gitpagedocs/docs/versions/0.0.14/en/gitpagedocs-project-guide.pdf",
|
|
63
|
+
"es": "gitpagedocs/docs/versions/0.0.14/en/gitpagedocs-project-guide.pdf"
|
|
59
64
|
},
|
|
60
65
|
"previewEnabled": true,
|
|
61
66
|
"downloadEnabled": true,
|
|
@@ -77,7 +82,7 @@ The optional route flags live inside \`pdf\`. Shared presentation, \`container\`
|
|
|
77
82
|
|
|
78
83
|
## Files and deployment
|
|
79
84
|
|
|
80
|
-
|
|
85
|
+
PDFs and supported native audio/video files under the repository's \`gitpagedocs/\` tree are copied into the viewer's public assets when Next.js starts or builds. The URL respects the configured deployment subpath on GitHub Pages. Keep these files tracked in Git and publish them with the generated documentation. Assets outside \`gitpagedocs/\` must already be in the viewer's \`frontend/public/\` directory or be reachable through an HTTP(S) URL.
|
|
81
86
|
|
|
82
87
|
Use the binary PDF URL, not an HTML repository preview URL. For remote repositories, the configured path resolves against that repository. Preview, download and opening a new tab fetch the file bytes, so an external server must allow CORS for all three actions. The viewer validates the PDF signature and creates a temporary \`application/pdf\` Blob URL. Preview and new-tab viewing use the browser's native PDF viewer; the origin server's framing policy and MIME/disposition headers do not control the Blob view.
|
|
83
88
|
|
|
@@ -213,7 +218,7 @@ Git Page Docs is a **pnpm + turborepo monorepo** that turns a repository's \`git
|
|
|
213
218
|
- 14-provider AI system (OpenAI, Anthropic, Gemini, Ollama, Mistral, DeepSeek, Cohere, Groq, xAI, and more) with streaming
|
|
214
219
|
- AI API keys stored **encrypted at rest** (AES-256-GCM) behind a local password gate — never plaintext
|
|
215
220
|
- In-docs **AI chat drawer** plus a dedicated **\`/ai\` console**
|
|
216
|
-
-
|
|
221
|
+
- 124-theme layout system (dark and light variants); local and GitHub Pages execution modes
|
|
217
222
|
`,
|
|
218
223
|
functionalities: `# Functionalities
|
|
219
224
|
|
|
@@ -420,6 +425,26 @@ Important keys:
|
|
|
420
425
|
- \`ThemeModeDefault\`
|
|
421
426
|
- \`ProjectLink\`
|
|
422
427
|
|
|
428
|
+
## Document navigation position
|
|
429
|
+
|
|
430
|
+
Configure the document-footer group in \`gitpagedocs/config.json\`:
|
|
431
|
+
|
|
432
|
+
\`\`\`json
|
|
433
|
+
{ "site": { "documentNavigation": { "position": "center" } } }
|
|
434
|
+
\`\`\`
|
|
435
|
+
|
|
436
|
+
\`position\` accepts \`left\`, \`center\` or \`right\`; the default is \`center\`. Omitted or invalid values use that default. Previous, Next and Back to top stay together in this order, with the same alignment on desktop and mobile. This setting positions the group; \`site.backToTop\` still determines whether the top arrow is visible. It does not reposition the introduction-guide arrow.
|
|
437
|
+
|
|
438
|
+
## Back to top on long pages
|
|
439
|
+
|
|
440
|
+
The back-to-top arrow on documentation pages and \`/introduction-guide\` is controlled by \`site.backToTop\` in \`gitpagedocs/config.json\`:
|
|
441
|
+
|
|
442
|
+
\`\`\`json
|
|
443
|
+
{ "site": { "backToTop": { "enabled": true, "minPageHeightViewports": 3 } } }
|
|
444
|
+
\`\`\`
|
|
445
|
+
|
|
446
|
+
The default enables the arrow only on a scrollable page whose total height is at least three viewport heights. Set \`enabled: false\` to hide it. \`minPageHeightViewports\` accepts a finite number greater than \`1\`; omitted or invalid values use \`3\`. For example, \`4\` requires a page at least four viewport heights tall. The threshold measures total page height, not distance already scrolled. The same setting controls documentation pages and the introduction guide.
|
|
447
|
+
|
|
423
448
|
## Layout source keys
|
|
424
449
|
|
|
425
450
|
- \`layoutsConfigPathOficial\`
|
|
@@ -559,6 +584,8 @@ Per-route options for \`routes-md\`, \`routes-html\`, \`routes-video\`, and \`ro
|
|
|
559
584
|
| \`ActiveNavigation\` | true; quick-navigation control and Ctrl+K shortcut |
|
|
560
585
|
| \`FocusMode / focusMode\` | Master switch (true) and independent copy, download, section and document controls; see Focus mode |
|
|
561
586
|
| \`pdf\` | PDF master switch, preview, download and new-tab defaults; all true |
|
|
587
|
+
| \`containerPagination\` | Enabled; bottom/right, four icon controls and count; see Paginated containers |
|
|
588
|
+
| \`markdownMarkers\` | Enabled; theme colors for highlighted targets and their index links; see Markdown markers |
|
|
562
589
|
| \`nestedMenusEnabled\` | true; recursive menu tree, or flat destinations when false |
|
|
563
590
|
| \`RouteGuide\` | true; breadcrumbs, overridable by version defaults and individual Markdown routes |
|
|
564
591
|
| \`accessibility\` | Enabled by default; narration settings are explained in Accessibility |
|
|
@@ -1001,6 +1028,8 @@ The tree supplies sidebar navigation, search labels, parent expansion and breadc
|
|
|
1001
1028
|
|
|
1002
1029
|
## Breadcrumbs: RouteGuide
|
|
1003
1030
|
|
|
1031
|
+
The breadcrumb trail has 12 px of spacing above and below it, separating the navigation path from the surrounding content.
|
|
1032
|
+
|
|
1004
1033
|
\`RouteGuide\` controls the breadcrumb trail. Resolution order is the page's \`routes-md[].RouteGuide\`, then the version's \`routeDefaults.RouteGuide\`, then \`site.RouteGuide\`, with \`true\` as the fallback. The example disables breadcrumbs for the version and enables them for chapter 101. Existing version \`0.0.8\` files can use the same fields.
|
|
1005
1034
|
|
|
1006
1035
|
\`RouteguideBrand\` and \`RouteguideBrandPosition\` are separate settings for the document's heading outline/table of contents; they do not control breadcrumbs.
|
|
@@ -1058,7 +1087,7 @@ The download keeps the Markdown basename from the route's localized \`path\`; if
|
|
|
1058
1087
|
|
|
1059
1088
|
The dialog has an accessible name, keyboard focus management and a close control. Use Tab to move through controls and Escape to close it. Keep icon-only controls accessible by retaining their translated names. Closing the dialog returns to the documentation view.
|
|
1060
1089
|
|
|
1061
|
-
Narration is configured separately in Accessibility. Changing the
|
|
1090
|
+
Narration is configured separately in Accessibility. In focus mode, it reads only the section currently displayed. Changing the section, document or language, or entering or leaving focus mode, stops the previous speech; the next reading starts from the visible content. Voice, speed and volume preferences are retained. With \`sectionNavigationEnabled: false\`, the entire document is visible and available for narration. Copy/download still includes the complete original source.
|
|
1062
1091
|
`,
|
|
1063
1092
|
accessibility: `# Accessibility and narration
|
|
1064
1093
|
|
|
@@ -1099,7 +1128,9 @@ Merge the following settings into \`gitpagedocs/config.json\`:
|
|
|
1099
1128
|
|
|
1100
1129
|
Narration starts only after your action; there is no autoplay. Automatic voice selection follows the document language, while an explicit voice choice uses that voice's language. Narration does not translate the document.
|
|
1101
1130
|
|
|
1102
|
-
The speech content is readable text extracted from the rendered Markdown. Scripts, styles, SVG content and elements marked hidden for assistive technology are excluded. Long
|
|
1131
|
+
The speech content is readable text extracted from the rendered Markdown. Scripts, styles, SVG content and elements marked hidden for assistive technology are excluded. Long visible content is read completely in successive blocks. Changing the document or language, disabling narration or leaving the page cancels the previous speech.
|
|
1132
|
+
|
|
1133
|
+
In focus mode, narration uses only the displayed section. Changing sections or documents, or entering or leaving focus mode, stops the previous reading. Start again to read the newly visible content. With \`site.focusMode.sectionNavigationEnabled: false\`, the whole document remains visible and narratable. These transitions preserve the selected voice, speed and volume.
|
|
1103
1134
|
|
|
1104
1135
|
The normal view and focus mode share voice, speed and volume preferences while the page remains mounted. These preferences are not stored across reloads. Non-numeric speed or volume settings use \`1\`; numeric settings outside the supported ranges are clamped to their nearest limit.
|
|
1105
1136
|
|
package/content/docs-es.mjs
CHANGED
|
@@ -4,8 +4,13 @@ import { overviewsEs } from "./overviews-es.mjs";
|
|
|
4
4
|
import { CONTENT_BLOCKS_DOCS } from "./content-blocks.mjs";
|
|
5
5
|
import { PARENT_MENU_JSON } from "./configuration-examples.mjs";
|
|
6
6
|
import { THEME_BACKGROUND_DOCS } from "./theme-backgrounds.mjs";
|
|
7
|
+
import { PAGINATION_DOCS, PAGINATION_FIRST_DOCS } from "./container-pagination.mjs";
|
|
8
|
+
import { MARKDOWN_MARKER_DOCS } from "./markdown-markers.mjs";
|
|
7
9
|
|
|
8
10
|
export const docsEs = {
|
|
11
|
+
containerPagination: PAGINATION_DOCS.es,
|
|
12
|
+
paginationFirst: PAGINATION_FIRST_DOCS.es,
|
|
13
|
+
markdownMarkers: MARKDOWN_MARKER_DOCS.es,
|
|
9
14
|
...practicalEs,
|
|
10
15
|
...operationsEs,
|
|
11
16
|
...overviewsEs,
|
|
@@ -43,7 +48,7 @@ Las acciones PDF usan iconos por defecto. Configura \`site.icons.PdfDownload\` (
|
|
|
43
48
|
|
|
44
49
|
## Ejemplo de ruta y menú
|
|
45
50
|
|
|
46
|
-
En \`gitpagedocs/docs/versions/0.0.
|
|
51
|
+
En \`gitpagedocs/docs/versions/0.0.14/config.json\`, conserva las listas de rutas y menús en el nivel principal:
|
|
47
52
|
|
|
48
53
|
\`\`\`json
|
|
49
54
|
{
|
|
@@ -52,9 +57,9 @@ En \`gitpagedocs/docs/versions/0.0.12/config.json\`, conserva las listas de ruta
|
|
|
52
57
|
"title": { "en": "Project guide (English)", "pt": "Guia do projeto (inglês)", "es": "Guía del proyecto (inglés)" },
|
|
53
58
|
"pdf": {
|
|
54
59
|
"pathPdf": {
|
|
55
|
-
"en": "gitpagedocs/docs/versions/0.0.
|
|
56
|
-
"pt": "gitpagedocs/docs/versions/0.0.
|
|
57
|
-
"es": "gitpagedocs/docs/versions/0.0.
|
|
60
|
+
"en": "gitpagedocs/docs/versions/0.0.14/en/gitpagedocs-project-guide.pdf",
|
|
61
|
+
"pt": "gitpagedocs/docs/versions/0.0.14/en/gitpagedocs-project-guide.pdf",
|
|
62
|
+
"es": "gitpagedocs/docs/versions/0.0.14/en/gitpagedocs-project-guide.pdf"
|
|
58
63
|
},
|
|
59
64
|
"previewEnabled": true,
|
|
60
65
|
"downloadEnabled": true,
|
|
@@ -76,7 +81,7 @@ Las opciones de la ruta se colocan dentro de \`pdf\`. La presentación compartid
|
|
|
76
81
|
|
|
77
82
|
## Archivos y publicación
|
|
78
83
|
|
|
79
|
-
|
|
84
|
+
Los PDF y archivos nativos de audio/vídeo compatibles dentro de \`gitpagedocs/\` se copian a los assets públicos del visor al iniciar o compilar Next.js. La URL respeta el subdirectorio de publicación de GitHub Pages. Incluye estos archivos en Git y publícalos junto con la documentación generada. Los archivos fuera de \`gitpagedocs/\` deben estar en \`frontend/public/\` del visor o ser accesibles mediante una URL HTTP(S).
|
|
80
85
|
|
|
81
86
|
Usa la URL del PDF binario, no una página HTML de vista previa del repositorio. Para repositorios remotos, la ruta se resuelve dentro de ese repositorio. La vista previa, la descarga y la apertura en una nueva pestaña obtienen los bytes del archivo, por lo que un servidor externo debe permitir CORS para las tres acciones. El visor valida la firma PDF y crea una URL Blob temporal de tipo \`application/pdf\`. La vista previa y la nueva pestaña utilizan el visor PDF nativo del navegador; la política de incorporación y las cabeceras de tipo/disposición del servidor de origen no controlan esta vista Blob.
|
|
82
87
|
|
|
@@ -212,7 +217,7 @@ Git Page Docs es un monorepo pnpm + turborepo que convierte la carpeta \`gitpage
|
|
|
212
217
|
- Sistema de IA con 14 proveedores (OpenAI, Anthropic, Gemini, Ollama, Mistral, DeepSeek, Cohere, Groq, xAI y más) con streaming
|
|
213
218
|
- Claves de IA **cifradas en reposo** (AES-256-GCM) detrás de una contraseña local — nunca en texto plano
|
|
214
219
|
- **Panel de chat de IA** en los docs + una **consola \`/ai\`** dedicada
|
|
215
|
-
- Sistema de
|
|
220
|
+
- Sistema de 124 temas (variantes oscuras y claras); ejecución local y en GitHub Pages
|
|
216
221
|
`,
|
|
217
222
|
functionalities: `# Funcionalidades
|
|
218
223
|
|
|
@@ -314,6 +319,26 @@ Claves principales:
|
|
|
314
319
|
- \`layoutsConfigPath\`: fallback remoto de layouts
|
|
315
320
|
- \`rendering\`: URL canónica publicada
|
|
316
321
|
|
|
322
|
+
## Posición de la navegación de documentos
|
|
323
|
+
|
|
324
|
+
Configura el grupo de botones al pie del documento en \`gitpagedocs/config.json\`:
|
|
325
|
+
|
|
326
|
+
\`\`\`json
|
|
327
|
+
{ "site": { "documentNavigation": { "position": "center" } } }
|
|
328
|
+
\`\`\`
|
|
329
|
+
|
|
330
|
+
\`position\` admite \`left\`, \`center\` o \`right\`; el valor por defecto es \`center\` (centro). Los valores ausentes o no válidos usan ese valor. Anterior, Siguiente y Volver arriba permanecen juntos en este orden, con la misma alineación en escritorio y móvil. Esta opción posiciona el grupo; \`site.backToTop\` sigue determinando cuándo aparece la flecha. No cambia la posición de la flecha de la guía de introducción.
|
|
331
|
+
|
|
332
|
+
## Volver arriba en páginas largas
|
|
333
|
+
|
|
334
|
+
La flecha para volver arriba en las páginas de documentación y en \`/introduction-guide\` se controla mediante \`site.backToTop\` en \`gitpagedocs/config.json\`:
|
|
335
|
+
|
|
336
|
+
\`\`\`json
|
|
337
|
+
{ "site": { "backToTop": { "enabled": true, "minPageHeightViewports": 3 } } }
|
|
338
|
+
\`\`\`
|
|
339
|
+
|
|
340
|
+
Por defecto, la flecha está activada solo en una página desplazable cuya altura total sea al menos tres veces la altura del área visible del navegador. Usa \`enabled: false\` para ocultarla. \`minPageHeightViewports\` acepta un número finito mayor que \`1\`; los valores ausentes o no válidos usan \`3\`. Por ejemplo, \`4\` exige una página de al menos cuatro alturas del área visible. El umbral mide la altura total de la página, no la distancia ya recorrida. La misma configuración controla las páginas de documentación y la guía de introducción.
|
|
341
|
+
|
|
317
342
|
## Controles de idioma, tema, foco, navegación rápida, PDF y documentos
|
|
318
343
|
|
|
319
344
|
En \`gitpagedocs/config.json\`, estas entradas de \`site.icons\` configuran idioma, tema, versión, foco, navegación Ctrl+K, acciones PDF y navegación al pie de los documentos. Los nueve controles utilizan React Icons por defecto:
|
|
@@ -437,6 +462,8 @@ Opciones por ruta en \`routes-md\`, \`routes-html\` y \`routes-video\`:
|
|
|
437
462
|
| \`ActiveNavigation\` | true; navegación rápida y atajo Ctrl+K |
|
|
438
463
|
| \`FocusMode / focusMode\` | Activación general (true) y controles independientes de copia, descarga, sección y documento; consulta Modo foco |
|
|
439
464
|
| \`pdf\` | Activación general, vista previa, descarga y nueva pestaña; todos true |
|
|
465
|
+
| \`containerPagination\` | Activo; abajo/a la derecha, cuatro iconos y contador; consulta Contenedores paginados |
|
|
466
|
+
| \`markdownMarkers\` | Activo; colores del tema para destinos resaltados y enlaces del índice; consulta Marcadores de Markdown |
|
|
440
467
|
| \`nestedMenusEnabled\` | true; árbol recursivo, o destinos planos con false |
|
|
441
468
|
| \`RouteGuide\` | true; breadcrumbs, con prioridad para valores de versión y ruta Markdown |
|
|
442
469
|
| \`accessibility\` | Activado por defecto; opciones de narración en Accesibilidad |
|
|
@@ -954,6 +981,8 @@ El árbol sirve para navegación lateral, etiquetas de búsqueda, expansión de
|
|
|
954
981
|
|
|
955
982
|
## Ruta de navegación: RouteGuide
|
|
956
983
|
|
|
984
|
+
La ruta de navegación tiene 12 px de espacio arriba y abajo, separando el camino del contenido que la rodea.
|
|
985
|
+
|
|
957
986
|
\`RouteGuide\` controla los breadcrumbs. La prioridad es \`routes-md[].RouteGuide\` de la página, después \`routeDefaults.RouteGuide\` de la versión, después \`site.RouteGuide\`, con \`true\` como valor final por defecto. El ejemplo desactiva la ruta de navegación para la versión y la activa en el capítulo 101. Los archivos existentes de la versión \`0.0.8\` aceptan los mismos campos.
|
|
958
987
|
|
|
959
988
|
\`RouteguideBrand\` y \`RouteguideBrandPosition\` son opciones separadas del índice de títulos del documento; no controlan los breadcrumbs.
|
|
@@ -1011,7 +1040,7 @@ La descarga conserva el nombre base Markdown del \`path\` localizado de la ruta;
|
|
|
1011
1040
|
|
|
1012
1041
|
El diálogo tiene nombre accesible, gestión de foco del teclado y control de cierre. Usa Tab para recorrer controles y Escape para cerrar. Los controles de solo icono conservan nombres traducidos accesibles. Cerrar el diálogo vuelve a la documentación.
|
|
1013
1042
|
|
|
1014
|
-
La narración se configura por separado en Accesibilidad. Cambiar de documento o idioma
|
|
1043
|
+
La narración se configura por separado en Accesibilidad. En modo foco, lee solo la sección mostrada. Cambiar de sección, documento o idioma, entrar o salir del modo foco detiene la voz anterior; la próxima lectura empieza desde el contenido visible. Se conservan las preferencias de voz, velocidad y volumen. Con \`sectionNavigationEnabled: false\`, el documento completo queda visible y disponible para narración. Copiar/descargar sigue incluyendo toda la fuente original.
|
|
1015
1044
|
`,
|
|
1016
1045
|
accessibility: `# Accesibilidad y narración
|
|
1017
1046
|
|
|
@@ -1052,7 +1081,9 @@ Combina estas opciones con \`gitpagedocs/config.json\`:
|
|
|
1052
1081
|
|
|
1053
1082
|
La narración empieza solo después de tu acción; no hay reproducción automática. La selección automática de voz sigue el idioma del documento; elegir una voz explícitamente utiliza el idioma de esa voz. La narración no traduce el documento.
|
|
1054
1083
|
|
|
1055
|
-
La voz utiliza texto legible extraído del Markdown renderizado. Se excluyen scripts, estilos, contenido SVG y elementos ocultos para tecnologías de asistencia.
|
|
1084
|
+
La voz utiliza texto legible extraído del Markdown renderizado. Se excluyen scripts, estilos, contenido SVG y elementos ocultos para tecnologías de asistencia. El contenido visible largo se lee completo en bloques sucesivos. Cambiar de documento o idioma, desactivar la narración o salir de la página cancela la voz anterior.
|
|
1085
|
+
|
|
1086
|
+
En modo foco, la narración usa solo la sección mostrada. Cambiar de sección o documento, entrar o salir del modo foco detiene la lectura anterior. Inicia de nuevo para leer el contenido que ahora está visible. Con \`site.focusMode.sectionNavigationEnabled: false\`, el documento completo permanece visible y se puede narrar. Estas transiciones conservan la voz, velocidad y volumen seleccionados.
|
|
1056
1087
|
|
|
1057
1088
|
La vista habitual y el modo foco comparten preferencias de voz, velocidad y volumen mientras la página permanece montada. Las preferencias no se guardan entre recargas. Los valores no numéricos de velocidad o volumen usan \`1\`; los valores numéricos fuera de los rangos admitidos se limitan al extremo más cercano.
|
|
1058
1089
|
|