diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..2bd5a0a --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +22 diff --git a/README.md b/README.md index f12bbba..90726e1 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A combination of the highly functional Ghost [Dawn](https://github.com/tryghost/ ![Chapter theme demonstration](assets/images/demo.png) -**Demo**: +**Demo**: — demo-only header/footer snippets (disabled buy CTA, GitHub links) live in [`docs/demo-site/`](docs/demo-site/), not in the theme zip. **Requires Ghost 6.0 or later**. @@ -38,9 +38,12 @@ Chapter 1.6.0 requires Ghost 6. Upgrade your instance before uploading this them ## Development -Styles are compiled using Gulp/PostCSS. You need **Node.js 22+** and [pnpm](https://pnpm.io/installation). +Styles are compiled using Gulp/PostCSS. Ghost 6 requires **Node.js 22** (not 24). This repo includes an `.nvmrc`; use [nvm](https://github.com/nvm-sh/nvm) so your shell matches before working on the theme or running Ghost locally. ```bash +# Use the Node version Ghost expects (run in this directory) +nvm use + # Install dependencies pnpm install @@ -51,10 +54,14 @@ pnpm dev For live preview against a local Ghost install, run these in separate terminals: ```bash +# Terminal 1 — theme assets (this directory) +nvm use pnpm dev -# From your Ghost install directory -ghost run -D +# Terminal 2 — Ghost (your install directory, e.g. ../.. from here) +nvm use 22 +ghost doctor # optional sanity check +ghost start # or: ghost run -D for theme development ``` Edit files under `assets/css/`; compiled output goes to `assets/built/`. diff --git a/docs/demo-site/README.md b/docs/demo-site/README.md new file mode 100644 index 0000000..89396c7 --- /dev/null +++ b/docs/demo-site/README.md @@ -0,0 +1,20 @@ +# Demo site code injection + +Snippets for [ghost-chapter.neveroff.dev](https://ghost-chapter.neveroff.dev/). These are **not** part of the theme — paste them into Ghost Admin on the demo instance only. + +**Settings → Code injection** + +| Field | File | +|-------|------| +| Site Header | [`code-injection-header.html`](code-injection-header.html) | +| Site Footer | [`code-injection-footer.html`](code-injection-footer.html) | + +Append any site-specific header tags (e.g. analytics) before the header snippet. The footer script replaces the old Stripe buy-button injection. + +What it does: + +- Shows a crossed-out “Buy Chapter for $39” label (no longer sold) +- Adds a GitHub download link beside the header CTA +- Adds a GitHub icon to the footer “Chapter” attribution link + +If the header GitHub icon is hard to see on a light header, change `.ch-demo-github-download { color: #fff; }` to `color: currentColor;` in the header snippet. diff --git a/docs/demo-site/code-injection-footer.html b/docs/demo-site/code-injection-footer.html new file mode 100644 index 0000000..c77ebb8 --- /dev/null +++ b/docs/demo-site/code-injection-footer.html @@ -0,0 +1,32 @@ + diff --git a/docs/demo-site/code-injection-header.html b/docs/demo-site/code-injection-header.html new file mode 100644 index 0000000..b56eed1 --- /dev/null +++ b/docs/demo-site/code-injection-header.html @@ -0,0 +1,64 @@ + diff --git a/gulpfile.js b/gulpfile.js index a820845..885ae52 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -66,6 +66,7 @@ function js(done) { const zipSrcGlobs = [ '**', + '!docs', '!docs/**', '!node_modules', '!node_modules/**', '!dist', '!dist/**', '!yarn-error.log',