@techninja/clearstack 0.3.36 → 0.3.37

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 (2) hide show
  1. package/lib/build-og.js +8 -3
  2. package/package.json +1 -1
package/lib/build-og.js CHANGED
@@ -136,9 +136,14 @@ function resolveMeta(config, data, baseUrl, path) {
136
136
  * @param {import('./og-template.js').OGMeta} meta
137
137
  */
138
138
  function writePage(outDir, routePath, shell, meta) {
139
- const filePath = routePath.endsWith('/')
140
- ? resolve(outDir, routePath.slice(1), 'index.html')
141
- : resolve(outDir, routePath.slice(1), 'index.html');
139
+ let filePath;
140
+ if (routePath === '/') {
141
+ filePath = resolve(outDir, 'index.html');
142
+ } else {
143
+ // Write as flat file (e.g. /dna-sources → dna-sources.html)
144
+ // Cloudflare Pages serves dna-sources.html for /dna-sources without redirect
145
+ filePath = resolve(outDir, routePath.slice(1) + '.html');
146
+ }
142
147
  mkdirSync(dirname(filePath), { recursive: true });
143
148
  writeFileSync(filePath, injectMeta(shell, meta));
144
149
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@techninja/clearstack",
3
- "version": "0.3.36",
3
+ "version": "0.3.37",
4
4
  "type": "module",
5
5
  "description": "A no-build web component framework specification — scaffold, validate, and evolve spec-compliant projects",
6
6
  "bin": {