seemore 1.3.1 → 1.3.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seemore",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Let AI write the Markdown. Let seemore show it better — zero config documentation framework.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,5 +1,6 @@
1
- import { Component, Suspense, type ReactNode } from 'react';
1
+ import { Component, Suspense, useEffect, type ReactNode } from 'react';
2
2
  import { useLocation, type RouteObject } from 'react-router';
3
+ import { config } from 'virtual:seemore/config';
3
4
  import { decodePath } from '../shared/base.js';
4
5
  import type { RouteEntry } from '../shared/types.js';
5
6
  import { DocPage, DocsLayout, NotFound, Overview, PageError } from './layout/DocsLayout.js';
@@ -15,6 +16,10 @@ export function useRouteUrl(): string {
15
16
  function Page() {
16
17
  const url = useRouteUrl();
17
18
  const entry = useRouteEntry(url);
19
+ useEffect(() => {
20
+ document.title =
21
+ entry === undefined || url === '/' ? config.title : `${entry.title} · ${config.title}`;
22
+ }, [url, entry?.title]);
18
23
  // Keyed by address, so navigating away from a page that threw starts clean rather than
19
24
  // carrying its error to every page after it. Reset by content version, so in dev an edit
20
25
  // that fixes the file gets to render — a boundary in its error state has unmounted the