the editable demo site: astro + vendored sveltia CMS + actions pipeline
deploy / build-and-publish (push) Successful in 1m31s

This commit is contained in:
Keith committed 2026-11-20 21:47:35 +01:00
commit c83c3b528d
16 files changed
+6471

No files matched your search

+78
View File
@@ -0,0 +1,78 @@
---
const pages = [
{ href: "/", label: "Home" },
{ href: "/about", label: "About" },
];
// Markdown pages hand their frontmatter to the layout as `frontmatter`.
const { title } = Astro.props.frontmatter ?? Astro.props;
---
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{title}</title>
<style is:global>
:root {
--ink: #1f2937;
--muted: #6b7280;
--accent: #4f46e5;
--line: #e5e7eb;
}
* { box-sizing: border-box; }
body {
margin: 0;
font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
color: var(--ink);
line-height: 1.65;
}
nav {
display: flex;
gap: 1.25rem;
align-items: center;
padding: 0.9rem 2rem;
border-bottom: 1px solid var(--line);
}
nav .brand { font-weight: 700; margin-right: auto; }
nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent); }
main { max-width: 44rem; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
/* Rendered ancient-user content: readable prose defaults. */
main :is(h1, h2, h3) { line-height: 1.25; }
main h1 { font-size: 2.1rem; margin: 0 0 1.25rem; }
main h2 { font-size: 1.45rem; margin-top: 2.25rem; }
main img { max-width: 100%; height: auto; border-radius: 0.5rem; }
main blockquote {
margin: 1.5rem 0;
padding: 0.5rem 1.25rem;
border-left: 3px solid var(--accent);
color: var(--muted);
}
main ul, main ol { padding-inline-start: 1.5rem; }
footer {
border-top: 1px solid var(--line);
color: var(--muted);
font-size: 0.85rem;
padding: 1.25rem 2rem;
text-align: center;
}
</style>
</head>
<body>
<nav>
<span class="brand">I Wrote It — demo</span>
{pages.map((p) => (
<a href={p.href} aria-current={Astro.url.pathname === p.href ? "page" : undefined}>
{p.label}
</a>
))}
</nav>
<main>
<slot />
</main>
<footer>
This page is editable in the browser at
<a href="/admin/">/admin/</a> — no git knowledge required.
</footer>
</body>
</html>
+15
View File
@@ -0,0 +1,15 @@
---
layout: ../layouts/Site.astro
title: About
---
<h1>About this demo</h1>
<p>This site is the proof of the appz-toolkit self-hosted platform: an ordinary marketing-style front page whose content is edited by a <a href="/admin/">browser-based visual editor</a>, with <strong>no git knowledge needed</strong>.</p>
<blockquote>
Behind every save is a normal git commit in an auditable Gitea repository on this server — editors never see that part.
</blockquote>
<h2>The stack on this box</h2>
<ul>
<li>The site: static <a href="https://astro.build">Astro</a>, rebuilt by Gitea Actions on every save.</li>
<li>The editor: <a href="https://sveltiacms.app">Sveltia CMS</a>, served from the site itself at <a href="/admin/">/admin/</a> and signing in against Gitea.</li>
<li>The app: the app-factory demo application, running on the Convex backend also hosted here.</li>
</ul>
+12
View File
@@ -0,0 +1,12 @@
---
layout: ../layouts/Site.astro
title: Home
---
<h1>I Wrote It</h1>
<p><strong>A demo of the editable-site flow.</strong> This page is a plain static astro page — but everything below this line was written by a <em>non-technical person in a browser</em>, committed through the <a href="/admin/">site editor</a> and rebuilt by Gitea Actions on this server.</p>
<h2>How it works</h2>
<ol>
<li>Sign in at <a href="/admin/">iwrote.it/admin/</a>.</li>
<li>Edit the page in the visual editor and press Save.</li>
<li>The editor commits your change to the site's git repository behind the scenes — the rebuild runs, and about a minute later the change is live here.</li>
</ol>