@pagenary/publisher 2026.5.0

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.
Files changed (147) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +337 -0
  3. package/bin/pagenary.mjs +116 -0
  4. package/build.config.json +5 -0
  5. package/package.json +66 -0
  6. package/scripts/build-site.js +87 -0
  7. package/scripts/build-tenants.js +3569 -0
  8. package/scripts/build.js +99 -0
  9. package/scripts/generate-sections.js +41 -0
  10. package/scripts/lib/seo-generator.js +558 -0
  11. package/scripts/lint-content.js +62 -0
  12. package/scripts/seo-smoke.js +94 -0
  13. package/scripts/serve.js +142 -0
  14. package/site/app.js +1 -0
  15. package/site/index.html +57 -0
  16. package/site/lib/categories.js +1 -0
  17. package/site/lib/export.js +1 -0
  18. package/site/lib/manifest-utils.js +1 -0
  19. package/site/lib/router.js +1 -0
  20. package/site/lib/search.js +1 -0
  21. package/site/llms.txt +22 -0
  22. package/site/manifest.js +132 -0
  23. package/site/mermaid-init.js +1 -0
  24. package/site/pages/api.html +339 -0
  25. package/site/pages/architecture.html +303 -0
  26. package/site/pages/deployment.html +282 -0
  27. package/site/pages/developer-guide.html +157 -0
  28. package/site/pages/extending.html +135 -0
  29. package/site/pages/quickstart.html +318 -0
  30. package/site/pages/seo-strategy.html +121 -0
  31. package/site/pages/tenant-config.html +519 -0
  32. package/site/pages/welcome.html +116 -0
  33. package/site/robots.txt +10 -0
  34. package/site/sections/api.js +3 -0
  35. package/site/sections/architecture.js +3 -0
  36. package/site/sections/deployment.js +3 -0
  37. package/site/sections/developer-guide.js +3 -0
  38. package/site/sections/extending.js +3 -0
  39. package/site/sections/quickstart.js +3 -0
  40. package/site/sections/section-templates.js +1 -0
  41. package/site/sections/seo-strategy.js +3 -0
  42. package/site/sections/tenant-config.js +3 -0
  43. package/site/sections/welcome.js +3 -0
  44. package/site/seo.js +1 -0
  45. package/site/sitemap.xml +63 -0
  46. package/site/styles.css +1982 -0
  47. package/site/syntax-highlight.js +1 -0
  48. package/src/app.js +988 -0
  49. package/src/index.html +56 -0
  50. package/src/lib/categories.js +55 -0
  51. package/src/lib/export.js +195 -0
  52. package/src/lib/manifest-utils.js +69 -0
  53. package/src/lib/router.js +44 -0
  54. package/src/lib/search.js +151 -0
  55. package/src/manifest.js +246 -0
  56. package/src/mermaid-init.js +207 -0
  57. package/src/sections/archive-future-roadmap.js +7 -0
  58. package/src/sections/archive-initiative-alpha.js +7 -0
  59. package/src/sections/archive-milestone-records.js +7 -0
  60. package/src/sections/archive-timeline-overview.js +7 -0
  61. package/src/sections/core-technology-compliance-frameworks.js +7 -0
  62. package/src/sections/core-technology-coordination-model.js +7 -0
  63. package/src/sections/core-technology-data-definitions.js +7 -0
  64. package/src/sections/core-technology-hardware-integration.js +7 -0
  65. package/src/sections/core-technology-integrity-controls.js +7 -0
  66. package/src/sections/core-technology-network-topology.js +7 -0
  67. package/src/sections/core-technology-operator-requirements.js +7 -0
  68. package/src/sections/core-technology-overview.js +7 -0
  69. package/src/sections/core-technology-service-interfaces.js +7 -0
  70. package/src/sections/core-technology-synchronization-strategy.js +7 -0
  71. package/src/sections/core-technology-system-foundation.js +7 -0
  72. package/src/sections/developers-api-credentials.js +7 -0
  73. package/src/sections/developers-api-operations.js +7 -0
  74. package/src/sections/developers-api-reference.js +7 -0
  75. package/src/sections/developers-api-websocket.js +7 -0
  76. package/src/sections/developers-automation-blueprints.js +7 -0
  77. package/src/sections/developers-automation-modules.js +7 -0
  78. package/src/sections/developers-automation-patterns.js +7 -0
  79. package/src/sections/developers-deployment-playbook.js +7 -0
  80. package/src/sections/developers-overview.js +7 -0
  81. package/src/sections/developers-scheduling-patterns.js +7 -0
  82. package/src/sections/developers-sdk-go.js +7 -0
  83. package/src/sections/developers-sdk-javascript.js +7 -0
  84. package/src/sections/developers-sdk-python.js +7 -0
  85. package/src/sections/developers-sdk-rust.js +7 -0
  86. package/src/sections/developers-sdks.js +7 -0
  87. package/src/sections/developers-solution-examples.js +7 -0
  88. package/src/sections/developers-testing-framework.js +7 -0
  89. package/src/sections/getting-started-architecture-basics.js +7 -0
  90. package/src/sections/getting-started-introduction.js +7 -0
  91. package/src/sections/getting-started-performance-overview.js +7 -0
  92. package/src/sections/governance-community-initiatives.js +7 -0
  93. package/src/sections/governance-dao-overview.js +7 -0
  94. package/src/sections/governance-multi-token.js +7 -0
  95. package/src/sections/governance-overview.js +7 -0
  96. package/src/sections/governance-proposal-process.js +7 -0
  97. package/src/sections/governance-proposals.js +7 -0
  98. package/src/sections/governance-structure.js +7 -0
  99. package/src/sections/governance-token-distribution.js +7 -0
  100. package/src/sections/governance-treasury.js +7 -0
  101. package/src/sections/operations-environment-prep.js +7 -0
  102. package/src/sections/operations-getting-started.js +7 -0
  103. package/src/sections/operations-incentives-guide.js +7 -0
  104. package/src/sections/operations-incentives-strategies.js +7 -0
  105. package/src/sections/operations-incentives.js +7 -0
  106. package/src/sections/operations-infrastructure.js +7 -0
  107. package/src/sections/operations-monitoring.js +7 -0
  108. package/src/sections/operations-overview.js +7 -0
  109. package/src/sections/operations-performance.js +7 -0
  110. package/src/sections/operations-power-infrastructure.js +7 -0
  111. package/src/sections/operations-setup-guide.js +7 -0
  112. package/src/sections/operations-sync-setup.js +7 -0
  113. package/src/sections/products-flagship-solution.js +7 -0
  114. package/src/sections/products-solution-library.js +7 -0
  115. package/src/sections/resources-brand-assets.js +7 -0
  116. package/src/sections/resources-faq.js +7 -0
  117. package/src/sections/resources-glossary.js +7 -0
  118. package/src/sections/resources-research-papers.js +7 -0
  119. package/src/sections/section-templates.js +873 -0
  120. package/src/sections/security-audits.js +7 -0
  121. package/src/sections/security-best-practices.js +7 -0
  122. package/src/sections/security-bug-bounty.js +7 -0
  123. package/src/sections/security-incident-response.js +7 -0
  124. package/src/sections/security-overview.js +7 -0
  125. package/src/sections/technical-architecture.js +7 -0
  126. package/src/sections/technical-whitepaper.js +7 -0
  127. package/src/sections/tutorial-automation-bot.js +7 -0
  128. package/src/sections/tutorial-build-first-integration.js +7 -0
  129. package/src/sections/tutorial-deploy-automation.js +7 -0
  130. package/src/sections/tutorial-event-driven-experience.js +7 -0
  131. package/src/sections/tutorial-operations-onboarding.js +7 -0
  132. package/src/sections/tutorial-systems-integration.js +7 -0
  133. package/src/sections/tutorials-overview.js +7 -0
  134. package/src/sections/use-case-connected-devices.js +7 -0
  135. package/src/sections/use-case-digital-auctions.js +7 -0
  136. package/src/sections/use-case-financial-automation.js +7 -0
  137. package/src/sections/use-case-interactive-media.js +7 -0
  138. package/src/sections/use-case-realtime-execution.js +7 -0
  139. package/src/sections/use-case-research-analytics.js +7 -0
  140. package/src/sections/use-case-supply-operations.js +7 -0
  141. package/src/sections/use-cases-overview.js +7 -0
  142. package/src/sections/welcome-overview.js +7 -0
  143. package/src/seo.js +90 -0
  144. package/src/styles.css +1982 -0
  145. package/src/syntax-highlight.js +90 -0
  146. package/tenants.json.example +68 -0
  147. package/tenants.schema.json +231 -0
@@ -0,0 +1,282 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>Deployment | Pagenary Docs</title>
7
+ <meta name="description" content="Hosting the static output and multi-tenant domain routing." />
8
+ <link rel="canonical" href="/#deployment" />
9
+
10
+ <!-- Open Graph -->
11
+ <meta property="og:title" content="Deployment" />
12
+ <meta property="og:description" content="Hosting the static output and multi-tenant domain routing." />
13
+ <meta property="og:type" content="article" />
14
+ <meta property="og:url" content="/#deployment" />
15
+
16
+ <!-- Twitter Card -->
17
+ <meta name="twitter:card" content="summary" />
18
+ <meta name="twitter:title" content="Deployment" />
19
+ <meta name="twitter:description" content="Hosting the static output and multi-tenant domain routing." />
20
+
21
+ <!-- Structured Data -->
22
+ <script type="application/ld+json">
23
+ [
24
+ {
25
+ "@context": "https://schema.org",
26
+ "@type": "TechArticle",
27
+ "headline": "Deployment",
28
+ "description": "Hosting the static output and multi-tenant domain routing.",
29
+ "url": "/#deployment",
30
+ "dateModified": "2026-05-26",
31
+ "mainEntityOfPage": {
32
+ "@type": "WebPage",
33
+ "@id": "/#deployment"
34
+ },
35
+ "isPartOf": {
36
+ "@type": "WebSite",
37
+ "name": "Pagenary Docs",
38
+ "url": "/"
39
+ }
40
+ },
41
+ {
42
+ "@context": "https://schema.org",
43
+ "@type": "BreadcrumbList",
44
+ "itemListElement": [
45
+ {
46
+ "@type": "ListItem",
47
+ "position": 1,
48
+ "name": "Home",
49
+ "item": "/"
50
+ },
51
+ {
52
+ "@type": "ListItem",
53
+ "position": 2,
54
+ "name": "Reference",
55
+ "item": "/#reference"
56
+ },
57
+ {
58
+ "@type": "ListItem",
59
+ "position": 3,
60
+ "name": "Deployment",
61
+ "item": "/#deployment"
62
+ }
63
+ ]
64
+ }
65
+ ]
66
+ </script>
67
+
68
+ <!-- Redirect to SPA for JavaScript-enabled browsers -->
69
+ <script>
70
+ if (typeof window !== 'undefined') {
71
+ window.location.replace('/#deployment');
72
+ }
73
+ </script>
74
+ <noscript>
75
+ <meta http-equiv="refresh" content="0; url=/#deployment" />
76
+ </noscript>
77
+
78
+ <link rel="stylesheet" href="../styles.css" />
79
+ <style>
80
+ .static-content { max-width: 800px; margin: 0 auto; padding: 2rem; }
81
+ .static-footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid #eee; font-size: 0.9rem; color: #666; }
82
+ </style>
83
+ </head>
84
+ <body>
85
+ <main class="static-content">
86
+ <article>
87
+ <h1>Deployment</h1>
88
+ <p class="lead">Hosting the static output and multi-tenant domain routing.</p>
89
+ <div class="section-body">
90
+ <section class="section doc markdown">
91
+ <div class="doc-content">
92
+ <h1 id="deployment-guide">Deployment Guide</h1>
93
+ <p>Pagenary produces static files that can be served by any web server, CDN, or object storage.</p>
94
+ <h2 id="quick-deploy">Quick Deploy</h2>
95
+ <pre><code class="language-bash"># Build a tenant to a specific directory
96
+ node scripts/build-tenants.js my-tenant --target /var/www/docs
97
+
98
+ # The output is ready to serve - no server setup required</code></pre>
99
+ <h2 id="build-options">Build Options</h2>
100
+ <h3 id="custom-output-directory">Custom Output Directory</h3>
101
+ <pre><code class="language-bash"># Override target for all tenants
102
+ node scripts/build-tenants.js --target /var/www/html
103
+
104
+ # Build specific tenant to custom location
105
+ node scripts/build-tenants.js my-docs --target /opt/docs/my-docs</code></pre>
106
+ <h3 id="build-from-git-repository">Build from Git Repository</h3>
107
+ <p>Configure a git source in your registry:</p>
108
+ <pre><code class="language-json">{
109
+ &quot;tenants&quot;: [
110
+ {
111
+ &quot;id&quot;: &quot;my-docs&quot;,
112
+ &quot;source&quot;: {
113
+ &quot;type&quot;: &quot;git&quot;,
114
+ &quot;url&quot;: &quot;https://github.com/org/my-docs.git&quot;,
115
+ &quot;ref&quot;: &quot;main&quot;,
116
+ &quot;path&quot;: &quot;docs/&quot;
117
+ },
118
+ &quot;target&quot;: {
119
+ &quot;type&quot;: &quot;local&quot;,
120
+ &quot;path&quot;: &quot;/var/www/my-docs&quot;
121
+ }
122
+ }
123
+ ]
124
+ }</code></pre>
125
+ <p>Then build:</p>
126
+ <pre><code class="language-bash">node scripts/build-tenants.js my-docs</code></pre>
127
+ <h3 id="external-registry">External Registry</h3>
128
+ <p>Use a registry file from any location:</p>
129
+ <pre><code class="language-bash">node scripts/build-tenants.js --registry /etc/pagenary/tenants.json</code></pre>
130
+ <p>Or via environment variable:</p>
131
+ <pre><code class="language-bash">TENANT_REGISTRY=/etc/pagenary/tenants.json node scripts/build-tenants.js</code></pre>
132
+ <h3 id="git-authentication">Git Authentication</h3>
133
+ <p>For private repositories:</p>
134
+ <pre><code class="language-bash"># SSH key
135
+ GIT_SSH_COMMAND=&quot;ssh -i ~/.ssh/deploy_key&quot; node scripts/build-tenants.js
136
+
137
+ # HTTPS token
138
+ GIT_CREDENTIALS=&quot;username:token&quot; node scripts/build-tenants.js
139
+
140
+ # Disable interactive prompts (recommended for CI)
141
+ GIT_TERMINAL_PROMPT=0 node scripts/build-tenants.js</code></pre>
142
+ <h2 id="cicd-integration">CI/CD Integration</h2>
143
+ <h3 id="github-actions">GitHub Actions</h3>
144
+ <pre><code class="language-yaml">name: Build Docs
145
+ on:
146
+ push:
147
+ branches: [main]
148
+
149
+ jobs:
150
+ build:
151
+ runs-on: ubuntu-latest
152
+ steps:
153
+ - uses: actions/checkout@v4
154
+
155
+ - uses: actions/setup-node@v4
156
+ with:
157
+ node-version: &#39;20&#39;
158
+
159
+ - run: npm ci
160
+
161
+ - name: Build documentation
162
+ run: node scripts/build-tenants.js my-docs --target ./output
163
+
164
+ - name: Upload artifact
165
+ uses: actions/upload-artifact@v4
166
+ with:
167
+ name: docs
168
+ path: output/</code></pre>
169
+ <h3 id="gitlab-ci">GitLab CI</h3>
170
+ <pre><code class="language-yaml">build-docs:
171
+ image: node:20
172
+ script:
173
+ - npm ci
174
+ - node scripts/build-tenants.js my-docs --target ./public
175
+ artifacts:
176
+ paths:
177
+ - public/</code></pre>
178
+ <h3 id="incremental-builds">Incremental Builds</h3>
179
+ <p>For faster CI builds with git-based sources:</p>
180
+ <pre><code class="language-bash"># Only rebuild changed content
181
+ node scripts/build-tenants.js my-docs --incremental --keep-cache
182
+
183
+ # Show what changed without building
184
+ node scripts/build-tenants.js my-docs --diff-only</code></pre>
185
+ <h2 id="hosting-patterns">Hosting Patterns</h2>
186
+ <h3 id="static-file-servers">Static File Servers</h3>
187
+ <p>The build output is self-contained. Serve with any static server:</p>
188
+ <pre><code class="language-bash"># Python
189
+ python -m http.server 8080 -d /var/www/my-docs
190
+
191
+ # Node.js (npx)
192
+ npx serve /var/www/my-docs
193
+
194
+ # Caddy
195
+ caddy file-server --root /var/www/my-docs --listen :8080</code></pre>
196
+ <h3 id="nginx">Nginx</h3>
197
+ <pre><code class="language-nginx">server {
198
+ listen 80;
199
+ server_name docs.example.com;
200
+ root /var/www/my-docs;
201
+
202
+ location / {
203
+ try_files $uri $uri/ /index.html;
204
+ }
205
+
206
+ # Cache static assets
207
+ location ~* \.(js|css|png|jpg|ico)$ {
208
+ expires 1y;
209
+ add_header Cache-Control &quot;public, immutable&quot;;
210
+ }
211
+ }</code></pre>
212
+ <h3 id="caddy">Caddy</h3>
213
+ <pre><code class="language-caddyfile">docs.example.com {
214
+ root * /var/www/my-docs
215
+ file_server
216
+ try_files {path} /index.html
217
+
218
+ @static path *.js *.css *.png *.jpg *.ico
219
+ header @static Cache-Control &quot;public, max-age=31536000, immutable&quot;
220
+ }</code></pre>
221
+ <h3 id="s3-cloudfront">S3 + CloudFront</h3>
222
+ <p>1. Create S3 bucket with static website hosting</p>
223
+ <p>2. Upload build output:</p>
224
+ <pre><code class="language-bash"> aws s3 sync /var/www/my-docs s3://my-docs-bucket/</code></pre>
225
+ <p>3. Create CloudFront distribution pointing to S3</p>
226
+ <p>4. Set default root object to `index.html`</p>
227
+ <p>5. Configure error pages to return `index.html` for 404s (for hash routing)</p>
228
+ <h3 id="netlify-vercel">Netlify / Vercel</h3>
229
+ <p>1. Point to your repository</p>
230
+ <p>2. Build command: `node scripts/build-tenants.js my-docs --target ./dist`</p>
231
+ <p>3. Publish directory: `dist/`</p>
232
+ <h2 id="multi-tenant-deployment">Multi-Tenant Deployment</h2>
233
+ <h3 id="single-server-multiple-tenants">Single Server, Multiple Tenants</h3>
234
+ <p>Build all tenants to subdirectories:</p>
235
+ <pre><code class="language-bash">node scripts/build-tenants.js --target /var/www/docs
236
+ # Creates /var/www/docs/tenant-a/, /var/www/docs/tenant-b/, etc.</code></pre>
237
+ <p>Nginx config:</p>
238
+ <pre><code class="language-nginx">server {
239
+ listen 80;
240
+ root /var/www/docs;
241
+
242
+ location ~ ^/([^/]+)/ {
243
+ try_files $uri $uri/ /$1/index.html;
244
+ }
245
+ }</code></pre>
246
+ <h3 id="domain-based-routing">Domain-Based Routing</h3>
247
+ <p>Each tenant gets its own domain:</p>
248
+ <pre><code class="language-caddyfile">tenant-a.example.com {
249
+ root * /var/www/docs/tenant-a
250
+ file_server
251
+ try_files {path} /index.html
252
+ }
253
+
254
+ tenant-b.example.com {
255
+ root * /var/www/docs/tenant-b
256
+ file_server
257
+ try_files {path} /index.html
258
+ }</code></pre>
259
+ <h2 id="cache-strategy">Cache Strategy</h2>
260
+ <table><thead><tr><th style="text-align: left">Asset</th><th style="text-align: left">Cache Policy</th></tr></thead><tbody><tr><td style="text-align: left">`index.html`</td><td style="text-align: left">`no-cache` or short TTL (1 minute)</td></tr><tr><td style="text-align: left">`<em>.js`, `</em>.css`</td><td style="text-align: left">Long TTL with immutable (`max-age=31536000, immutable`)</td></tr><tr><td style="text-align: left">`sections/*.js`</td><td style="text-align: left">Long TTL (content-addressed)</td></tr></tbody></table>
261
+ <p>The hash-based router means all navigation works client-side, so `index.html` is the only file that needs frequent updates.</p>
262
+ <h2 id="monitoring">Monitoring</h2>
263
+ <h3 id="health-check">Health Check</h3>
264
+ <p>Create a simple health endpoint by checking for `index.html`:</p>
265
+ <pre><code class="language-bash">curl -f https://docs.example.com/ || exit 1</code></pre>
266
+ <h3 id="build-verification">Build Verification</h3>
267
+ <p>After deployment, verify the build:</p>
268
+ <pre><code class="language-bash"># Check response
269
+ curl -I https://docs.example.com/
270
+
271
+ # Verify content
272
+ curl -s https://docs.example.com/ | grep -q &quot;manifest.js&quot;</code></pre>
273
+ </div>
274
+ </section>
275
+ </div>
276
+ </article>
277
+ <footer class="static-footer">
278
+ <p>View interactive version: <a href="/#deployment">Deployment</a></p>
279
+ </footer>
280
+ </main>
281
+ </body>
282
+ </html>
@@ -0,0 +1,157 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>Developer Guide | Pagenary Docs</title>
7
+ <meta name="description" content="Project layout, scripts, and the content authoring workflow." />
8
+ <link rel="canonical" href="/#developer-guide" />
9
+
10
+ <!-- Open Graph -->
11
+ <meta property="og:title" content="Developer Guide" />
12
+ <meta property="og:description" content="Project layout, scripts, and the content authoring workflow." />
13
+ <meta property="og:type" content="article" />
14
+ <meta property="og:url" content="/#developer-guide" />
15
+
16
+ <!-- Twitter Card -->
17
+ <meta name="twitter:card" content="summary" />
18
+ <meta name="twitter:title" content="Developer Guide" />
19
+ <meta name="twitter:description" content="Project layout, scripts, and the content authoring workflow." />
20
+
21
+ <!-- Structured Data -->
22
+ <script type="application/ld+json">
23
+ [
24
+ {
25
+ "@context": "https://schema.org",
26
+ "@type": "TechArticle",
27
+ "headline": "Developer Guide",
28
+ "description": "Project layout, scripts, and the content authoring workflow.",
29
+ "url": "/#developer-guide",
30
+ "dateModified": "2026-05-26",
31
+ "mainEntityOfPage": {
32
+ "@type": "WebPage",
33
+ "@id": "/#developer-guide"
34
+ },
35
+ "isPartOf": {
36
+ "@type": "WebSite",
37
+ "name": "Pagenary Docs",
38
+ "url": "/"
39
+ }
40
+ },
41
+ {
42
+ "@context": "https://schema.org",
43
+ "@type": "BreadcrumbList",
44
+ "itemListElement": [
45
+ {
46
+ "@type": "ListItem",
47
+ "position": 1,
48
+ "name": "Home",
49
+ "item": "/"
50
+ },
51
+ {
52
+ "@type": "ListItem",
53
+ "position": 2,
54
+ "name": "Guides",
55
+ "item": "/#guides"
56
+ },
57
+ {
58
+ "@type": "ListItem",
59
+ "position": 3,
60
+ "name": "Developer Guide",
61
+ "item": "/#developer-guide"
62
+ }
63
+ ]
64
+ }
65
+ ]
66
+ </script>
67
+
68
+ <!-- Redirect to SPA for JavaScript-enabled browsers -->
69
+ <script>
70
+ if (typeof window !== 'undefined') {
71
+ window.location.replace('/#developer-guide');
72
+ }
73
+ </script>
74
+ <noscript>
75
+ <meta http-equiv="refresh" content="0; url=/#developer-guide" />
76
+ </noscript>
77
+
78
+ <link rel="stylesheet" href="../styles.css" />
79
+ <style>
80
+ .static-content { max-width: 800px; margin: 0 auto; padding: 2rem; }
81
+ .static-footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid #eee; font-size: 0.9rem; color: #666; }
82
+ </style>
83
+ </head>
84
+ <body>
85
+ <main class="static-content">
86
+ <article>
87
+ <h1>Developer Guide</h1>
88
+ <p class="lead">Project layout, scripts, and the content authoring workflow.</p>
89
+ <div class="section-body">
90
+ <section class="section doc markdown">
91
+ <div class="doc-content">
92
+ <h1 id="developer-guide">Developer Guide</h1>
93
+ <p>Welcome to Pagenary Publisher. This workspace lives at `apps/publisher/` inside the Pagenary platform monorepo. Use the repo-level commands (e.g. `npm run publisher:*`) when you prefer not to `cd` into the workspace. This guide keeps onboarding fast so you can focus on tailoring tenant-specific copy rather than plumbing.</p>
94
+ <h2 id="prerequisites">Prerequisites</h2>
95
+ <ul>
96
+ <li>Node.js 16+</li>
97
+ <li>npm (ships with Node)</li>
98
+ <li>Optional: a modern browser for local testing, and a static host account for deployment</li>
99
+ </ul>
100
+ <h2 id="install-run">Install &amp; Run</h2>
101
+ <pre><code class="language-bash">npm install
102
+ npm run dev</code></pre>
103
+ <p>The dev command builds to `dist/` and serves the bundle with live reload. Open the printed URL and start exploring.</p>
104
+ <h2 id="project-tour">Project Tour</h2>
105
+ <ul>
106
+ <li>`src/index.html` – HTML entry point with top-level shell structure</li>
107
+ <li>`src/app.js` – navigation, routing, command palette, export logic</li>
108
+ <li>`src/sections/section-templates.js` – template catalogue for every page type</li>
109
+ <li>`src/manifest.js` – default navigation structure (overridden per tenant via `tenants/&lt;id&gt;/manifest.json`)</li>
110
+ <li>`scripts/` – small Node utilities for building, serving, syncing sections, linting content, and checking SEO metadata</li>
111
+ </ul>
112
+ <h2 id="key-features">Key Features</h2>
113
+ <p>1. <strong>Mermaid Diagrams</strong> - Use fenced code blocks with `mermaid` language. Renders with zoom/pan controls and pan-on-drag functionality.</p>
114
+ <p>2. <strong>External Links</strong> - Links to external URLs (http/https) automatically open in new tab with security attributes. Use `url` property in manifest for external nav links.</p>
115
+ <p>3. <strong>Internal Linking</strong> - Link between sections with `#section-id` syntax. Build validates that all internal links reference existing sections.</p>
116
+ <p>4. <strong>Bottom Navigation</strong> - Configurable via `bottomNav` in root manifest. Options: &quot;mobile&quot; (default), &quot;always&quot;, or &quot;never&quot;.</p>
117
+ <p>5. <strong>Command Palette</strong> - Press Ctrl+K (or Cmd+K) to search and navigate sections. Supports fuzzy search across section titles and summaries.</p>
118
+ <p>See TENANT-CONFIG.md for full configuration details and examples.</p>
119
+ <h2 id="common-tasks">Common Tasks</h2>
120
+ <ul>
121
+ <li><strong>Add a Section</strong> – create `src/sections/my-section.js`, set the `SECTION_ID`, update `manifest.js`.</li>
122
+ <li><strong>Regenerate Templates</strong> – run `npm run sync:docs` to reset section boilerplate if you need a clean slate.</li>
123
+ <li><strong>Branding</strong> – tweak the logo text and footer copy in `src/index.html`; adjust colors in `src/styles.css`.</li>
124
+ <li><strong>Export Testing</strong> – open the app locally and use the Export button to confirm the combined PDF-ready document looks correct.</li>
125
+ </ul>
126
+ <h2 id="tenant-content-bundles">Tenant Content Bundles</h2>
127
+ <ul>
128
+ <li>Each tenant folder supports a `manifest.json` describing nav groupings, titles, and the content file backing each section. Use nested `sections` arrays to create expandable groups.</li>
129
+ <li>Supported content types live in `tenants/&lt;id&gt;/content/`:</li>
130
+ <li>`.md` → converted to structured HTML (headings, lists, blockquotes supported by the lightweight parser).</li>
131
+ <li>`.html` → shipped as-is, wrapped in a loader module.</li>
132
+ <li>`.js` → copied unchanged; export a `load()` function that returns `{ html, afterRender? }` to drive rich experiences.</li>
133
+ <li>Run `npm run build:tenants` after editing content. The script regenerates `dist/&lt;id&gt;/manifest.js` plus section modules so the navigation immediately reflects the manifest.</li>
134
+ <li>Provide per-tenant overrides (styles, assets, app shell tweaks) inside `tenants/&lt;id&gt;/overrides/`; they copy into the tenant bundle after content generation, so you can replace generated files if needed.</li>
135
+ </ul>
136
+ <h2 id="tooling-philosophy">Tooling Philosophy</h2>
137
+ <ul>
138
+ <li>Zero framework lock-in; replace `app.js` with your own router if you outgrow it.</li>
139
+ <li>Scripts avoid third-party dependencies so they run in restricted environments.</li>
140
+ <li>Everything is ASCII-only by default to ease diffs and downstream localization.</li>
141
+ </ul>
142
+ <h2 id="support-checklist">Support Checklist</h2>
143
+ <p>Before shipping to a tenant:</p>
144
+ <p>1. Replace placeholder copy with real content.</p>
145
+ <p>2. Verify navigation order and summaries in `manifest.js`.</p>
146
+ <p>3. Run `npm run check` to ensure lint and SEO checks pass.</p>
147
+ <p>4. Test export output and section highlighting.</p>
148
+ </div>
149
+ </section>
150
+ </div>
151
+ </article>
152
+ <footer class="static-footer">
153
+ <p>View interactive version: <a href="/#developer-guide">Developer Guide</a></p>
154
+ </footer>
155
+ </main>
156
+ </body>
157
+ </html>
@@ -0,0 +1,135 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>Extending | Pagenary Docs</title>
7
+ <meta name="description" content="Add section templates, content types, and build behaviors." />
8
+ <link rel="canonical" href="/#extending" />
9
+
10
+ <!-- Open Graph -->
11
+ <meta property="og:title" content="Extending" />
12
+ <meta property="og:description" content="Add section templates, content types, and build behaviors." />
13
+ <meta property="og:type" content="article" />
14
+ <meta property="og:url" content="/#extending" />
15
+
16
+ <!-- Twitter Card -->
17
+ <meta name="twitter:card" content="summary" />
18
+ <meta name="twitter:title" content="Extending" />
19
+ <meta name="twitter:description" content="Add section templates, content types, and build behaviors." />
20
+
21
+ <!-- Structured Data -->
22
+ <script type="application/ld+json">
23
+ [
24
+ {
25
+ "@context": "https://schema.org",
26
+ "@type": "TechArticle",
27
+ "headline": "Extending",
28
+ "description": "Add section templates, content types, and build behaviors.",
29
+ "url": "/#extending",
30
+ "dateModified": "2026-05-26",
31
+ "mainEntityOfPage": {
32
+ "@type": "WebPage",
33
+ "@id": "/#extending"
34
+ },
35
+ "isPartOf": {
36
+ "@type": "WebSite",
37
+ "name": "Pagenary Docs",
38
+ "url": "/"
39
+ }
40
+ },
41
+ {
42
+ "@context": "https://schema.org",
43
+ "@type": "BreadcrumbList",
44
+ "itemListElement": [
45
+ {
46
+ "@type": "ListItem",
47
+ "position": 1,
48
+ "name": "Home",
49
+ "item": "/"
50
+ },
51
+ {
52
+ "@type": "ListItem",
53
+ "position": 2,
54
+ "name": "Guides",
55
+ "item": "/#guides"
56
+ },
57
+ {
58
+ "@type": "ListItem",
59
+ "position": 3,
60
+ "name": "Extending",
61
+ "item": "/#extending"
62
+ }
63
+ ]
64
+ }
65
+ ]
66
+ </script>
67
+
68
+ <!-- Redirect to SPA for JavaScript-enabled browsers -->
69
+ <script>
70
+ if (typeof window !== 'undefined') {
71
+ window.location.replace('/#extending');
72
+ }
73
+ </script>
74
+ <noscript>
75
+ <meta http-equiv="refresh" content="0; url=/#extending" />
76
+ </noscript>
77
+
78
+ <link rel="stylesheet" href="../styles.css" />
79
+ <style>
80
+ .static-content { max-width: 800px; margin: 0 auto; padding: 2rem; }
81
+ .static-footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid #eee; font-size: 0.9rem; color: #666; }
82
+ </style>
83
+ </head>
84
+ <body>
85
+ <main class="static-content">
86
+ <article>
87
+ <h1>Extending</h1>
88
+ <p class="lead">Add section templates, content types, and build behaviors.</p>
89
+ <div class="section-body">
90
+ <section class="section doc markdown">
91
+ <div class="doc-content">
92
+ <h1 id="extending-docs-toolkit">Extending Docs Toolkit</h1>
93
+ <p>This project is meant to be forked or templated per reseller. Everything lives in vanilla modules, so extending it is a matter of editing a handful of files.</p>
94
+ <h2 id="add-a-new-page-type">Add a New Page Type</h2>
95
+ <p>1. Update `section-templates.js` with a new category configuration (summary + render function).</p>
96
+ <p>2. Create a section file in `src/sections/` that imports `renderSectionTemplate` and sets `SECTION_ID` to match the slug you want.</p>
97
+ <p>3. Register the slug inside `src/manifest.js` under the appropriate group (or create a new group entry).</p>
98
+ <p>Run `npm run sync:docs` to regenerate the boilerplate module if you want to reapply the standard wrapper.</p>
99
+ <h2 id="override-styling">Override Styling</h2>
100
+ <ul>
101
+ <li>Adjust global tokens and typographic scale in `src/styles.css`.</li>
102
+ <li>Use existing utility classes (`doc-content`, `doc-grid`, etc.) when adding new markup blocks.</li>
103
+ <li>Keep the high-contrast palette for accessibility unless brand guidelines state otherwise; test color contrast if you change it.</li>
104
+ </ul>
105
+ <h2 id="inject-dynamic-data">Inject Dynamic Data</h2>
106
+ <p>While the bundle is static, section modules can directly fetch remote JSON or call APIs. Recommended approach:</p>
107
+ <pre><code class="language-js">export async function load() {
108
+ const res = await fetch(&#39;https://api.example.com/tenant/metrics.json&#39;);
109
+ const metrics = await res.json();
110
+
111
+ return {
112
+ html: renderCustomTemplate(metrics)
113
+ };
114
+ }</code></pre>
115
+ <p>Keep requests idempotent and cache-friendly—most hosts allow short-lived fetches if end users need fresh stats.</p>
116
+ <h2 id="internationalisation">Internationalisation</h2>
117
+ <ul>
118
+ <li>Duplicate `manifest.js` with translated summaries or hydrate labels at runtime via a locale switcher.</li>
119
+ <li>Wrap static strings in template helpers so copy updates stay centralized.</li>
120
+ </ul>
121
+ <h2 id="automation-ideas">Automation Ideas</h2>
122
+ <ul>
123
+ <li>Add a content pipeline that transforms Markdown into HTML and swaps it into templates.</li>
124
+ <li>Integrate accessibility scans (axe, pa11y) into CI alongside the provided lint/SEO scripts.</li>
125
+ </ul>
126
+ </div>
127
+ </section>
128
+ </div>
129
+ </article>
130
+ <footer class="static-footer">
131
+ <p>View interactive version: <a href="/#extending">Extending</a></p>
132
+ </footer>
133
+ </main>
134
+ </body>
135
+ </html>