Navigation in the admin: header and footer links, page titles, hidden pages, Shop
Pages -> Navigation (migration 075) edits the header's pages and buttons and the footer's links; navConfig.ts is now only the defaults. Page titles and intros move there from Site settings. A hidden page answers Not found below viewer (server and app) and is out of the menus and sitemap; signed in, it shows with a bar. Adds a /shop page of sections, hidden, with its header button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b49497cc59
commit
0cc2a3f721
30 changed files with 716 additions and 216 deletions
|
|
@ -7,7 +7,8 @@
|
|||
can say no while production says yes
|
||||
GET /anything the built index.html, its title, description,
|
||||
preview image, canonical link and structured
|
||||
data filled in for that path (pageMeta.js)
|
||||
data filled in for that path (pageMeta.js),
|
||||
and this visitor's menus (siteNav.js)
|
||||
|
||||
In production nginx serves files that exist (the JS, CSS,
|
||||
uploads) itself and sends everything else here, so a shared link
|
||||
|
|
@ -35,6 +36,7 @@ import { fileURLToPath } from "node:url";
|
|||
|
||||
import { Hono } from "hono";
|
||||
|
||||
import { currentUser } from "../auth.js";
|
||||
import { metaFor, renderPage, robotsTxt, siteFor, sitemap } from "../pageMeta.js";
|
||||
import { CACHE, NO_STORE } from "../shape.js";
|
||||
|
||||
|
|
@ -109,7 +111,8 @@ pages.get("*", (c, next) => {
|
|||
let meta;
|
||||
let page;
|
||||
try {
|
||||
meta = metaFor(c.get("db"), pathname);
|
||||
// Who's asking decides whether a hidden page is there (siteNav.js).
|
||||
meta = metaFor(c.get("db"), pathname, currentUser(c.get("db"), c));
|
||||
page = renderPage(html, meta);
|
||||
} catch (err) {
|
||||
warnOnce(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue