@kirchdev/duxt 0.1.1-dev-main.12-4d33ebf → 0.1.1-dev-main.13-636388d

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.
@@ -331,10 +331,12 @@ details[open] > .duxt-schema-row .duxt-schema-tile .duxt-schema-minus {
331
331
  set at 0.6875rem in `muted-foreground`: the same idea, two sizes, two
332
332
  weights, two colours, on pages a reader moves between.
333
333
 
334
- The colour is the DEFAULT and not the rule: a caller that has a tone of its
335
- own — a changelog group — sets it after this class and wins. */
336
- .duxt-label {
337
- @apply text-[0.6875rem] font-semibold tracking-[0.12em] text-muted-foreground uppercase;
334
+ Keep the defaults in the components layer so a caller's colour utilities
335
+ can override them. Unlayered rules beat utilities regardless of class order. */
336
+ @layer components {
337
+ .duxt-label {
338
+ @apply text-[0.6875rem] font-semibold tracking-[0.12em] text-muted-foreground uppercase;
339
+ }
338
340
  }
339
341
 
340
342
  /* A release group's ENTRIES, which arrive as ordinary Markdown in
@@ -6,6 +6,14 @@ const localeLink = useDuxtLink();
6
6
 
7
7
  const { data: navigation } = await useDuxtNavigation();
8
8
 
9
+ // Nitro's HTML crawler treats v0.1.0 as a file with extension .0 and skips it.
10
+ // Register known pages explicitly so their HTML and Nuxt payloads are emitted.
11
+ if (import.meta.prerender) {
12
+ prerenderRoutes(
13
+ navigationPagePaths(navigation.value ?? []).map((path) => localeLink(path)!)
14
+ );
15
+ }
16
+
9
17
  // The mobile sheet shows the same branch the sidebar does.
10
18
  const { items } = useDuxtSection(navigation);
11
19
 
@@ -15,7 +15,10 @@ export function stripLocalePrefix(
15
15
  path: string,
16
16
  codes: Iterable<string>
17
17
  ): string {
18
- return splitLocalePath(path, codes).path;
18
+ const documentPath = splitLocalePath(path, codes).path;
19
+ // Static hosts may append a slash; Content paths and prerendered async-data
20
+ // keys do not. Both URLs must reuse the same data during hydration.
21
+ return documentPath.replace(/\/+$/, '') || (documentPath ? '/' : '');
19
22
  }
20
23
 
21
24
  /**
@@ -1,5 +1,18 @@
1
1
  import type { ContentNavigationItem } from '@nuxt/content';
2
2
 
3
+ /** Actual pages, including dotted version paths; folder wrappers are not pages. */
4
+ export function navigationPagePaths(items: ContentNavigationItem[]): string[] {
5
+ const paths = new Set<string>();
6
+ for (const item of items) {
7
+ if (item.children?.length) {
8
+ for (const path of navigationPagePaths(item.children)) paths.add(path);
9
+ } else {
10
+ paths.add(item.path);
11
+ }
12
+ }
13
+ return [...paths];
14
+ }
15
+
3
16
  /** Find a node by path, anywhere in the tree. */
4
17
  export function findByPath(
5
18
  items: ContentNavigationItem[],
package/nuxt.config.ts CHANGED
@@ -376,10 +376,13 @@ export default defineNuxtConfig({
376
376
 
377
377
  /**
378
378
  * nuxt-seo-utils, whose defaults are written for a site that sets no head
379
- * tags of its own. Three of them are wrong HERE, and each for a reason this
380
- * layer cannot design away.
379
+ * tags of its own. These defaults need adjusting for this layer's rendering.
381
380
  */
382
381
  seo: {
382
+ // MDC hydrates its Shiki <style> text from the Content payload. Rewriting
383
+ // only the prerendered HTML makes that text differ on the client.
384
+ minify: false,
385
+
383
386
  /**
384
387
  * A LOCALE PREFIX IS CASE-SENSITIVE. i18n routes this site's locales under
385
388
  * their own codes — `/de-DE/guides`, `/pt-BR/guides` — and lowercasing a
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://www.schemastore.org/package.json",
3
3
  "name": "@kirchdev/duxt",
4
- "version": "0.1.1-dev-main.12-4d33ebf",
4
+ "version": "0.1.1-dev-main.13-636388d",
5
5
  "description": "Nuxt documentation layer on Content v3 — multi-repo, versioned docs from one compact source list.",
6
6
  "keywords": [
7
7
  "content-v3",