Stack documentation

A dark, terminal-inspired Ghost theme for developer blogs, with code blocks that highlight and copy, a command palette and post series.
Thank you for choosing Stack. This guide covers everything from uploading the theme to setting up paid memberships. If something is not covered here, write to support@codememory.com — we answer within one working day.
- Version1.0.0
- Ghost6.0.0 or later
- Live demostack.ghostcms.templates.codememory.com
- AuthorCode Memory
Highlights
- Code blocks with a title bar: language label, optional file name, line numbers and a Copy button
- Built-in syntax highlighting for JavaScript, TypeScript, Python, Rust, Go, SQL, shell, Dockerfile, YAML, JSON, CSS, HTML and diff, with no extra scripts to load
- Shell blocks mark the $ prompt and leave it out when readers copy
- Command palette (Ctrl/Cmd + K or the / key): jump to any post, topic or page, switch the colour mode, subscribe
- Post series from internal tags (#series Name): a series box on each part with "Part 2 of 4", and a Series page
- Homepage terminal window that types your site description, post count and newest posts
- Posts listed as compact rows, grouped by year
- Pinned cards for your featured posts
- A # link on every heading, and a contents list beside long posts that follows the reader
- Two post layouts: the full post with contents list, and Note for short posts
- Dark by default, with light and system modes and a reader toggle
- Topics and Authors page templates
- Membership page with tiers and a monthly/yearly switch; styled paywall for members and paid posts
- Sign in, sign up and account pages
- Reading progress bar, image lightbox, tables, callouts and toggle cards
- Self-hosted fonts (JetBrains Mono, Hanken Grotesk)
- Fully translatable, 17 theme settings, no jQuery
What is in the download
themeforest-stack-ghost-theme/ ├── documentation/ │ ├── index.html ← you are here (open in any browser) │ └── stack-documentation.pdf ← the same guide as a PDF ├── sample-content/stack-sample-content.json ← optional demo posts (see Sample content) └── stack_1.0.0_for_ghost_6.0.0_or_later/ ├── stack.zip ← upload this file to Ghost └── stack/ ← the same theme, unzipped, with source files
You only need stack.zip to use the theme. The unzipped folder is there for developers who
want to change the code (see Development).
Installation
- Sign in to your Ghost admin (
yoursite.com/ghost). - Go to Settings → Design & branding → Customize → Change theme.
- Click Upload theme and choose
stack.zipfrom thestack_1.0.0_for_ghost_6.0.0_or_laterfolder. Do not upload the whole download. - Click Activate.
Updating
When a new version is released, download it from your ThemeForest Downloads page and upload the new
stack.zip the same way. Ghost asks whether to overwrite the existing theme — choose
Overwrite. Your content, navigation and theme settings are kept.
If you edited the theme files yourself, keep a copy of your changes first: an update replaces every file.
Quick setup (10 minutes)
To make your site look like the demo, do these steps in order. Each one is explained in detail further down.
- Brand: Settings → Design & branding → set the Accent colour, upload a logo and a site icon.
- Navigation: Settings → Navigation → add your main links (see Navigation).
- Pages: create the pages in Pages and templates and pick the matching template.
- Membership: Settings → Membership → turn on signups; add paid tiers and connect Stripe (see Membership).
- Theme settings: Design & branding → Theme tab (see Theme settings).
- Series: add the same internal tag to each part, for example
#series Rust from zero. Create a page with the Series template (slugseries). - Pinned cards: mark up to three posts as Featured.
Sample content
The download includes the demo's text as a Ghost import file:
sample-content/stack-sample-content.json. It holds 30 posts, 9 pages, 8 tags
and the demo writers, with the same templates and settings per post as the live demo. Use it to see how
Stack looks with real content, or as a starting point you edit.
- Use a new or test site — the import adds posts next to anything you already have.
- Go to Settings → Advanced → Import/Export → Import content.
- Choose
stack-sample-content.jsonand confirm. - Set up Navigation, page templates and theme settings as described below. Ghost does not import these from a content file.
Logo, colours and fonts
Accent colour
Settings → Design & branding → Accent colour. Stack uses it for buttons, links, highlights and the reading-progress bar. Stack uses your accent colour (mint #3DDC97 by default) for buttons, the logo prompt and cursor, links, list markers and the code block labels. Button text turns black or white automatically so any accent stays readable. In light mode the accent is darkened for small text so it stays easy to read. Each topic's accent colour is used for its # sign.
Logo
Upload a logo in Design & branding → Brand. Without a logo, Stack shows the site title in the theme's display font. A transparent PNG or SVG around 400 × 100 px works best. If your logo is dark, upload a light version in the Theme tab under Logo for dark mode.
Fonts
Stack ships its own fonts (Hanken Grotesk, JetBrains Mono), hosted inside the theme — no requests to Google. To use different fonts, pick a Heading font and Body font in Design & branding → Brand. The theme follows your choice everywhere. Choose Theme default to go back.
Light and dark mode
In the Theme tab, Color scheme sets the default: Light, Dark or System (follows the reader's device). Readers can switch with the moon/sun button in the header or the switch in the menu; their choice is remembered on that device.
Theme settings
Settings → Design & branding → Customize. Theme settings are split between the Site wide, Homepage and Post tabs. Every setting:
| Setting | Group | Type | Default | What it does |
|---|---|---|---|---|
| Color scheme | Site wide | select | Dark (Light / Dark / System) | Readers can still switch with the sun/moon button. |
| Logo for dark mode | Site wide | image | — | Optional light version of your logo for dark mode. |
| Show command palette | Site wide | boolean | On | Quick jump box that opens with Ctrl/Cmd + K. |
| Newsletter title | Site wide | text | git pull the newsletter | Title of the newsletter box. |
| Newsletter text | Site wide | text | empty | Text of the newsletter box. Empty = site description. |
| Footer text | Site wide | text | empty | Small footer line. Empty = site description. |
| Hero title | Homepage | text | Notes on building software that lasts | Large headline on the homepage. |
| Show terminal | Homepage | boolean | On | Terminal window beside the headline. |
| Show pinned | Homepage | boolean | On | Featured posts as cards. |
| Show series | Homepage | boolean | On | Your post series (internal tags that start with #series). |
| Posts title | Homepage | text | All posts | |
| Show share buttons | Post | boolean | On | Share buttons (X, Facebook, LinkedIn, copy link) under posts. |
| Show author box | Post | boolean | On | Author photo and bio under posts. |
| Show related posts | Post | boolean | On | Three posts from the same tag under each post. |
| Show reading progress | Post | boolean | On | Progress bar at the top of the screen while reading a post. |
| Show toc | Post | boolean | On | Contents list beside long posts. |
| Show line numbers | Post | boolean | On | Line numbers in code blocks. |
Code blocks
Add code with the editor's code card (type ```rust and press Enter, or /code) and set the language. Stack adds the title bar, the language label, line numbers and the Copy button.
- File name: make the first line a comment that starts with
file:, for example// file: src/main.rs(or# file: …,-- file: …). Stack moves it into the title bar and removes it from the code. - Shell commands: start each command with
$in abashblock. The prompt is shown in the accent colour and is not copied. - Changes: use the language
diff. Lines that start with+are green, lines that start with-are red. - Line numbers: shown on blocks of three lines or more. Turn them off with Show line numbers.
Highlighted languages: js, ts, python, rust, go, sql, bash, dockerfile, yaml, json, css, html and diff. Other languages get the title bar and Copy button with plain text.
Post series
- Create an internal tag whose name starts with
#series, for example#series Postgres in practice. Add a description: it shows on the Series page. - Add that tag to every part. Parts are listed by publish date, oldest first.
- Each part shows a series box above the text with all parts, the current one marked, and Part 2 of 3.
- Create a page with the Series template for the full list. The homepage shows the same list (Show series).
Command palette
Readers press Ctrl/Cmd + K or /, or click Jump to… in the header. They can type part of a post title, a topic or a page name, move with the arrow keys and press Enter. Commands switch the colour mode, open sign up or sign in, and open the RSS feed. The last row opens Ghost's full search.
The palette lists your navigation, your topics and your 60 newest posts. Turn it off with Show command palette; the header then shows the normal search button.
Homepage
- Headline and terminal — Hero title, your site description, a signup form and the terminal window (Show terminal).
- Pinned — up to three featured posts as cards (Show pinned).
- Series — every series with its parts (Show series).
- All posts — rows grouped by year with a Load more button (Posts title). Stack shows 9 per page.
Pages and templates
Stack includes page templates for the pages every membership site needs. Create a page in Ghost (Pages → New page), set its URL in the page settings, then choose the Template in the same panel.
| Template | Suggested URL | Use |
|---|---|---|
Seriescustom-series.hbs | /series/ | Every series (internal tag that starts with #series) with its parts in reading order. |
Topicscustom-topics.hbs | /topics/ | Every public tag with its description and post count. |
Writerscustom-writers.hbs | /writers/ | Every staff user with at least one post: photo, location, bio and post count. |
Membershipcustom-membership.hbs | /membership/ | Your tiers with a monthly/yearly switch. The page body (for example a FAQ made of toggle cards) appears below. |
Signincustom-signin.hbs | /signin/ | Email sign-in form (magic link) with the page's feature image. |
Signupcustom-signup.hbs | /signup/ | Free signup form with name and email and the page's feature image. |
Accountcustom-account.hbs | /account/ | Signed-in members see their plan, renewal date, card and links to manage billing and newsletters. |
Tip: the membership page shows your tiers automatically. Anything you write in the page body appears underneath — the demo uses toggle cards for a FAQ.
Post templates
Choose a template per post in the post settings panel → Template.
| Template | Use | |
|---|---|---|
Notecustom-note.hbs | A short post: no feature image, no contents list, a narrow column. |
Membership, tiers and payments
Stack is built for Ghost's members features: free and paid signups, tiers, a paywall and the Portal popup.
1. Turn on signups
Settings → Membership → Access → Who should be able to subscribe? → Anyone can sign up.
2. Connect Stripe
Settings → Membership → Tiers → Connect with Stripe. Use test mode first, then switch to live mode when you are ready to take real payments.
3. Create tiers
Settings → Membership → Tiers. Add a name, monthly and yearly prices, a description and benefits. Stack shows every public tier on the membership page with a monthly/yearly switch, and marks the second tier as Most popular.
4. Members-only content
In a post's settings set Post access to Members only, Paid-members only or
specific tiers. Readers without access see the start of the post and a paywall box that invites them to join
or upgrade. To choose where the preview stops, add a Public preview divider in the editor
(type /public).
5. Sign-up forms and buttons
Subscribe forms in the theme create free members and send a confirmation email. Every Subscribe, Sign in and Account button opens Ghost's Portal popup, so members can change plans, update cards and cancel without leaving your site.
config.production.json.Reading features
- Reading progress bar on posts, in the post's topic colour (can be turned off in the Post tab).
- Image lightbox: click any image or gallery photo in a post to see it full screen; use the arrow keys to move through a gallery.
- Every editor card is styled: images (regular, wide, full), galleries, quotes, callouts, toggles, bookmarks, buttons, videos, audio, files, products, headers and signups. Create a page with every card to check your brand — the demo's style guide shows them all.
Posts per page
The home, tag and author pages load 9 posts, then a
Load more button fetches the next set without reloading the page. To change the number, edit
"posts_per_page" in package.json, zip the theme folder and upload it again.
Translation
Every word in the theme can be translated.
- In the unzipped theme folder, copy
locales/en.jsonto a new file named after your language code, for examplelocales/fr.json. - Translate the values (the text on the right). Keep the keys (the text on the left) and anything in
{curly braces}unchanged. - Zip the theme folder and upload it.
- Settings → General → Publication language → enter the same code (
fr).
Custom CSS
Small style changes do not need a new theme upload. Settings → Code injection → Site header:
<style>
.tk-k { color: #ff9ecb; }
.term { box-shadow: none; }
</style>
Development
For larger changes, work on the unzipped stack/ folder. You need Node.js 20 or later.
cd stack npm install # once npm run dev # rebuild CSS/JS on every change npm run build # one-off build npm test # check the theme with gscan npm run zip # dist/stack.zip, ready to upload
CSS lives in src/css (one file per area, joined by main.css); JavaScript in
src/js. Built files go to assets/built. Templates are Handlebars files in the theme root
and in partials/.
Questions
The homepage looks empty after I activated the theme.
The home sections use your posts, featured posts and tags. Publish a few posts, mark some as Featured and add tags. The Pinned cards need featured posts; the Series list needs posts with a #series internal tag.
The membership page shows no prices.
Paid tiers only appear once Stripe is connected and the tiers are public (Settings → Membership → Tiers).
Sign-in emails do not arrive.
Check your email settings (self-hosted: Mailgun or SMTP in the config file). Ask readers to look in their spam folder.
How do I remove "Published with Ghost" from the footer?
Delete the link from partials/footer.hbs in the unzipped theme, zip the folder and upload it again.
Can I use the theme on more than one site?
A Regular licence covers one site (one end product). Buy one licence per site.
Are the demo images included?
No. Demo photos come from Pixabay and are only used on the demo site. The theme itself contains no stock photos.
Support
Support is included with your purchase and covers: answering questions about the theme's features, and fixing bugs. It does not cover custom changes or problems with third-party code.
Email support@codememory.com with your purchase code and your site address. See the changelog for what changed in each version and third-party materials for credits.