@rr0/cms 0.3.60 → 0.3.61

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.
@@ -24,6 +24,18 @@ export interface CMSGeneratorOptions {
24
24
  org: DataOptions;
25
25
  };
26
26
  siteBaseUrl: string;
27
+ /**
28
+ * A file holding the part of `netlify.toml` that is NOT derived from `.htaccess` — what a host
29
+ * needs that Apache cannot say: a redirect carrying its own status or `force`, one to an absolute
30
+ * URL on another domain, a header scoped to anything narrower than the whole site, a build or
31
+ * plugin section.
32
+ *
33
+ * Without it those lines have nowhere to live but the generated file itself, where every full
34
+ * build wipes them — which is exactly how this site's `ufoathome.org` redirects and its CORS
35
+ * headers disappeared twice. See ssg-api's HtAccessReplaceCommand for the mechanism; naming a file
36
+ * that is not there fails the build rather than dropping it in silence.
37
+ */
38
+ netlifyPreambleFile?: string;
27
39
  timeFormat: Intl.DateTimeFormatOptions;
28
40
  directoryPages: string[];
29
41
  ufoCaseDirectoryFile: string;
@@ -135,7 +135,9 @@ export class CMSGenerator {
135
135
  }
136
136
  }();
137
137
  const htAccessToNetlifyConfig = {
138
- replacements: [new HtAccessToNetlifyConfigReplaceCommand(this.options.siteBaseUrl)],
138
+ replacements: [
139
+ new HtAccessToNetlifyConfigReplaceCommand(this.options.siteBaseUrl, this.options.netlifyPreambleFile)
140
+ ],
139
141
  roots: [".htaccess"],
140
142
  getOutputPath: (_context) => "netlify.toml"
141
143
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@rr0/cms",
3
3
  "type": "module",
4
4
  "author": "Jérôme Beau <rr0@rr0.org> (https://rr0.org)",
5
- "version": "0.3.60",
5
+ "version": "0.3.61",
6
6
  "description": "RR0 Content Management System (CMS)",
7
7
  "exports": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
@@ -41,7 +41,7 @@
41
41
  "image-size": "^2.0.2",
42
42
  "jsdom": "^27.4.0",
43
43
  "selenium-webdriver": "^4.39.0",
44
- "ssg-api": "^1.17.4"
44
+ "ssg-api": "^1.18.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@javarome/testscript": "^0.13.1",