Stack documentation

Stack homepage

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.

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

  1. Sign in to your Ghost admin (yoursite.com/ghost).
  2. Go to Settings → Design & branding → Customize → Change theme.
  3. Click Upload theme and choose stack.zip from the stack_1.0.0_for_ghost_6.0.0_or_later folder. Do not upload the whole download.
  4. Click Activate.
Ghost(Pro) customers: custom themes need the Creator plan or higher. Self-hosted Ghost: any version from 6.0.0 works.

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.

  1. Brand: Settings → Design & branding → set the Accent colour, upload a logo and a site icon.
  2. Navigation: Settings → Navigation → add your main links (see Navigation).
  3. Pages: create the pages in Pages and templates and pick the matching template.
  4. Membership: Settings → Membership → turn on signups; add paid tiers and connect Stripe (see Membership).
  5. Theme settings: Design & branding → Theme tab (see Theme settings).
  6. Series: add the same internal tag to each part, for example #series Rust from zero. Create a page with the Series template (slug series).
  7. 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.

  1. Use a new or test site — the import adds posts next to anything you already have.
  2. Go to Settings → Advanced → Import/Export → Import content.
  3. Choose stack-sample-content.json and confirm.
  4. Set up Navigation, page templates and theme settings as described below. Ghost does not import these from a content file.
Photos, audio and video from the demo are not included: they are stock media used for the preview only (see third-party materials). Add your own feature images to the posts. Imported writers can be removed in Settings → Staff when you no longer need them.

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:

SettingGroupTypeDefaultWhat it does
Color schemeSite wideselectDark (Light / Dark / System)Readers can still switch with the sun/moon button.
Logo for dark modeSite wideimage—Optional light version of your logo for dark mode.
Show command paletteSite widebooleanOnQuick jump box that opens with Ctrl/Cmd + K.
Newsletter titleSite widetextgit pull the newsletterTitle of the newsletter box.
Newsletter textSite widetextemptyText of the newsletter box. Empty = site description.
Footer textSite widetextemptySmall footer line. Empty = site description.
Hero titleHomepagetextNotes on building software that lastsLarge headline on the homepage.
Show terminalHomepagebooleanOnTerminal window beside the headline.
Show pinnedHomepagebooleanOnFeatured posts as cards.
Show seriesHomepagebooleanOnYour post series (internal tags that start with #series).
Posts titleHomepagetextAll posts
Show share buttonsPostbooleanOnShare buttons (X, Facebook, LinkedIn, copy link) under posts.
Show author boxPostbooleanOnAuthor photo and bio under posts.
Show related postsPostbooleanOnThree posts from the same tag under each post.
Show reading progressPostbooleanOnProgress bar at the top of the screen while reading a post.
Show tocPostbooleanOnContents list beside long posts.
Show line numbersPostbooleanOnLine 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.

  1. 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.
  2. Shell commands: start each command with $ in a bash block. The prompt is shown in the accent colour and is not copied.
  3. Changes: use the language diff. Lines that start with + are green, lines that start with - are red.
  4. 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

  1. Create an internal tag whose name starts with #series, for example #series Postgres in practice. Add a description: it shows on the Series page.
  2. Add that tag to every part. Parts are listed by publish date, oldest first.
  3. Each part shows a series box above the text with all parts, the current one marked, and Part 2 of 3.
  4. 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

  1. Headline and terminal — Hero title, your site description, a signup form and the terminal window (Show terminal).
  2. Pinned — up to three featured posts as cards (Show pinned).
  3. Series — every series with its parts (Show series).
  4. 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.

TemplateSuggested URLUse
Series
custom-series.hbs
/series/Every series (internal tag that starts with #series) with its parts in reading order.
Topics
custom-topics.hbs
/topics/Every public tag with its description and post count.
Writers
custom-writers.hbs
/writers/Every staff user with at least one post: photo, location, bio and post count.
Membership
custom-membership.hbs
/membership/Your tiers with a monthly/yearly switch. The page body (for example a FAQ made of toggle cards) appears below.
Signin
custom-signin.hbs
/signin/Email sign-in form (magic link) with the page's feature image.
Signup
custom-signup.hbs
/signup/Free signup form with name and email and the page's feature image.
Account
custom-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.

TemplateUse
Note
custom-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.

Emails (sign-in links, receipts) need working email. On Ghost(Pro) it works out of the box. Self-hosted sites must configure Mailgun or SMTP in config.production.json.

Newsletters, comments and search

Newsletters: Settings → Newsletters. Posts can be sent by email when you publish. The theme's subscribe forms subscribe readers to your default newsletters.

Comments: Settings → Membership → Commenting. When on, comments appear under every post that the reader has access to.

Search: works out of the box. The search icon in the header opens Ghost's search; readers can also press Ctrl/⌘ + K.

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.

  1. In the unzipped theme folder, copy locales/en.json to a new file named after your language code, for example locales/fr.json.
  2. Translate the values (the text on the right). Keep the keys (the text on the left) and anything in {curly braces} unchanged.
  3. Zip the theme folder and upload it.
  4. 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.