domma-cms 1.61.0 → 1.61.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/CLAUDE.md +1 -1
  3. package/docs/DommaFeatures.md +3 -1
  4. package/docs/cache.md +24 -0
  5. package/docs/configuration.md +1 -1
  6. package/package.json +1 -1
  7. package/public/js/effects.js +1 -1
  8. package/public/js/site.js +1 -1
  9. package/server/config.js +37 -0
  10. package/server/routes/api/chats.js +3 -1
  11. package/server/routes/api/components.js +2 -1
  12. package/server/routes/api/content-api.js +1 -1
  13. package/server/routes/api/content-public.js +2 -2
  14. package/server/routes/api/content-writes.js +1 -1
  15. package/server/routes/api/effects.js +4 -9
  16. package/server/routes/api/layouts.js +1 -1
  17. package/server/routes/api/pages.js +6 -5
  18. package/server/routes/api/search.js +3 -3
  19. package/server/routes/api/sidebar-counts.js +2 -0
  20. package/server/routes/api/theme.js +2 -1
  21. package/server/routes/api/views.js +2 -1
  22. package/server/routes/public.js +4 -4
  23. package/server/server.js +12 -6
  24. package/server/services/cache/adminChange.js +28 -0
  25. package/server/services/content.js +73 -10
  26. package/server/services/effectsSettings.js +25 -0
  27. package/server/services/health.js +2 -2
  28. package/server/services/htmlResponse.js +33 -4
  29. package/server/services/listTags.js +1 -1
  30. package/server/services/markdown.js +56 -22
  31. package/server/services/pluginGuides.js +2 -2
  32. package/server/services/plugins.js +25 -2
  33. package/server/services/projects.js +39 -4
  34. package/server/services/publicAssets.js +488 -0
  35. package/server/services/renderer.js +10 -8
  36. package/server/services/seo/index.js +3 -3
  37. package/server/services/sitemap.js +1 -1
  38. package/server/services/versions.js +2 -2
  39. package/server/services/wpImport/index.js +2 -2
  40. package/server/templates/page.html +3 -2
@@ -210,7 +210,7 @@ async function seo(fastify, {enabled = true, getBaseUrl = null, rolesService = n
210
210
  seen.add(e.urlPath);
211
211
  list.push({urlPath: e.urlPath, source: e.source, title: e.title});
212
212
  }
213
- for (const p of await listPages()) {
213
+ for (const p of await listPages({render: false})) {
214
214
  if (seen.has(p.urlPath) || !isPublic(p)) continue;
215
215
  list.push({urlPath: p.urlPath, source: 'pages', title: p.title, noindex: p.seo?.noindex === true, unlisted: true});
216
216
  }
@@ -218,7 +218,7 @@ async function seo(fastify, {enabled = true, getBaseUrl = null, rolesService = n
218
218
  }
219
219
  async function focusMap() {
220
220
  const map = {};
221
- for (const p of await listPages()) if (p.seo?.focus) map[p.urlPath] = p.seo.focus;
221
+ for (const p of await listPages({render: false})) if (p.seo?.focus) map[p.urlPath] = p.seo.focus;
222
222
  for (const [p, o] of Object.entries(store.overrides())) if (o.focus) map[p] = o.focus;
223
223
  return map;
224
224
  }
@@ -301,7 +301,7 @@ async function seo(fastify, {enabled = true, getBaseUrl = null, rolesService = n
301
301
 
302
302
  /** The sitemap entries before SEO's filter (pages + every source), to show what it leaves out. */
303
303
  async function rawEntries(origin) {
304
- const out = (await listPages()).filter(p => isPublic(p) && !p.seo?.noindex).map(p => ({urlPath: p.urlPath, title: p.title, source: 'pages'}));
304
+ const out = (await listPages({render: false})).filter(p => isPublic(p) && !p.seo?.noindex).map(p => ({urlPath: p.urlPath, title: p.title, source: 'pages'}));
305
305
  const seen = new Set(out.map(p => p.urlPath));
306
306
  for (const s of getSitemapSources()) {
307
307
  try {
@@ -55,7 +55,7 @@ function pageEntry(page) {
55
55
  */
56
56
  export async function listSitemapEntries(baseUrl, {log = console} = {}) {
57
57
  const normalised = normaliseBaseUrl(baseUrl);
58
- const pages = (await listPages()).filter(shouldIncludeInSitemap);
58
+ const pages = (await listPages({render: false})).filter(shouldIncludeInSitemap);
59
59
  const offline = await offlinePageUrls(pages);
60
60
  const entries = pages.filter(p => !offline.has(p.urlPath)).map(pageEntry);
61
61
  const seen = new Set(entries.map(e => e.urlPath));
@@ -256,8 +256,8 @@ export async function deleteVersion(urlPath, filename) {
256
256
  */
257
257
  async function keepLiveAdminTags(livePath, restored) {
258
258
  let live;
259
- try { live = matter(await fs.readFile(livePath, 'utf8')).data?.adminTags; } catch { return restored; }
260
- const old = matter(restored);
259
+ try { live = matter(await fs.readFile(livePath, 'utf8'), {}).data?.adminTags; } catch { return restored; }
260
+ const old = matter(restored, {});
261
261
  if (JSON.stringify(old.data?.adminTags ?? null) === JSON.stringify(live ?? null)) return restored;
262
262
  const data = {...old.data};
263
263
  if (Array.isArray(live) && live.length) data.adminTags = live;
@@ -216,7 +216,7 @@ async function pageFingerprint(urlPath) {
216
216
  try {
217
217
  const file = await resolveExistingFilePath(urlPath);
218
218
  const raw = await fs.readFile(file, 'utf8');
219
- const parsed = matter(raw);
219
+ const parsed = matter(raw, {});
220
220
  return fingerprint(parsed.data?.title, parsed.content);
221
221
  } catch { return ''; }
222
222
  }
@@ -238,7 +238,7 @@ export function footerBlockList(site = null) {
238
238
 
239
239
  /** The site's state as the planner needs it. */
240
240
  export async function siteState(mapping = {}, source = '') {
241
- const pages = await listPages();
241
+ const pages = await listPages({render: false});
242
242
  const pagePaths = new Set(pages.map(p => String(p.urlPath || '/').toLowerCase()));
243
243
  const homePage = pages.find(p => String(p.urlPath || '/') === '/');
244
244
  const pageHashes = {};
@@ -158,6 +158,7 @@
158
158
  window.__CMS_SITE__ = {{siteJson}};
159
159
  {{footerScript}}
160
160
  {{ctxMenusScript}}
161
+ {{effectsScript}}
161
162
  (function () {
162
163
  var c = window.__CMS_SITE__ && window.__CMS_SITE__.autoTheme;
163
164
  if (!c || !c.enabled) return;
@@ -188,7 +189,7 @@
188
189
  <script src="/public/js/form-logic-engine.js?v=20261031-forms-reduce-motion" defer></script>
189
190
 
190
191
  <!-- Site initialisation -->
191
- <script src="/public/js/site.js?v=20261110-theme-preference" type="module"></script>
192
+ <script src="/public/js/site.js?v=20261111-one-menu-float" type="module"></script>
192
193
  <script src="/public/js/collection-context.js?v=20261010-utf8-payloads" type="module"></script>
193
194
  {{ctxMenusModule}}
194
195
  <!-- [image zoom] pictures' full-size view - only on a page that has one -->
@@ -203,7 +204,7 @@
203
204
  <script src="/public/js/forms.js?v=20261109-form-embed" type="module"></script>
204
205
 
205
206
  <!-- Core effects runtime -->
206
- <script src="/public/js/effects.js?v=20261029-all-cms-fonts" defer></script>
207
+ <script src="/public/js/effects.js?v=20261111-inline-settings" defer></script>
207
208
 
208
209
  <!-- Plugin body-end injection -->
209
210
  {{bodyEndInject}}