Commit graph

4 commits

Author SHA1 Message Date
Zaldimmar
47df7b1fe0 Add Site settings: name, description, icons, page titles, indexing
Panel → Site settings (migration 035, superadmins only) edits the
site's name, description, preview image, favicon and home-screen
icon, each static page's title and intro, and whether search engines
may list the site. Every value overrides site.json; a blank one falls
back to it. The indexing switch is per database, so the dev server
can be off while production is on from one build.

The server merges the two (siteFor in pageMeta.js) for page metadata,
the sitemap and a new /robots.txt route, and writes the merged
wording into each page as window.__NGU_SITE__, which site.ts reads so
headings match with no extra request. Entities can now require a
higher role to save (writeRole), checked on both sides. Panel is a
menu group with Accounts and server, and Site settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 00:36:58 -05:00
Zaldimmar
84e4e2acae Serve pages even when their metadata can't be built
With no site.json on the server, every page request threw and came
back as the API's JSON 500, so the site didn't load. The page route
now serves index.html as built, with the default tags, and logs the
cause once; the sitemap answers 503. The nginx snippet in docs/seo.md
also falls back to the plain page on a 500, sends the home page
through the API, and gives uploads their own body-size limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 22:15:38 -05:00
Zaldimmar
e932ee3007 Show Google sign-in even when site.json isn't deployed
/api/auth/providers read site.json to build Google's return address,
and the deploy copies server/ into /srv/ngu-api without site.json, so
it threw and the login page hid the button. Whether Google is on now
depends only on the client id and secret; a missing return address is
logged when a sign-in starts, naming GOOGLE_REDIRECT_URI and
SITE_CONFIG. The docs say how the server is actually deployed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 21:51:40 -05:00
Zaldimmar
64cb2ec56a Add per-page search metadata, link previews and a sitemap
Page requests now go through the API (routes/pages.js), which fills
the built index.html in for that path before the app loads: title,
description, preview image, canonical URL, and structured data
(Organization, Event, BlogPosting). Shared links preview the page
itself. Unlisted records are noindex; missing ones return 404.
/sitemap.xml lists every public, listed page.

site.json is the one place for the site's name, address, default
description and preview image, and each static page's title and
intro, which the pages now read too. Indexing is switched on:
robots.txt allows all but /admin and /api and names the sitemap. The
browser tab title follows the page.

nginx setup, with a fallback to the plain page if the API is down,
is in docs/seo.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 21:21:10 -05:00