caracms 0.9.0 → 0.9.1
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/bin/init.mjs +6 -2
- package/package.json +1 -1
package/bin/init.mjs
CHANGED
|
@@ -611,8 +611,12 @@ function changesOf(site, { railway = false, mode = null, field = null } = {}) {
|
|
|
611
611
|
if (!site.setUp) add('caracms.config.ts', mode ? withServices(template('caracms.config.ts.txt'), mode).text : template('caracms.config.ts.txt'));
|
|
612
612
|
else if (mode && mode !== field) edit('caracms.config.ts', site.caracmsConfigText, withServices(site.caracmsConfigText, mode).text);
|
|
613
613
|
else if (mode) done.push(`caracms.config.ts (services: '${mode}')`);
|
|
614
|
-
|
|
615
|
-
|
|
614
|
+
// The starting page component and block, for a new site only: a set-up site's config names its own,
|
|
615
|
+
// and may have deleted these (am-rebrand's port did; 0.9.0's init added TextBlock.astro back).
|
|
616
|
+
if (!site.setUp) {
|
|
617
|
+
add('src/components/caracms/Page.astro', template('Page.astro.txt'));
|
|
618
|
+
add('src/components/caracms/TextBlock.astro', template('TextBlock.astro.txt'));
|
|
619
|
+
}
|
|
616
620
|
add(`${posix(site.srcDir)}/pages/[...path].astro`, template('catch-all.astro.txt'));
|
|
617
621
|
const health = pageRoutes(root, site.srcDir).find((r) => !r.dynamic && r.url === '/health');
|
|
618
622
|
const healthFile = `${posix(site.srcDir)}/pages/health.ts`;
|