Colophon docsCustomising and translation
Customising and translation
Small changes with CSS
Go to Settings → Code injection, open Site header, and add your CSS inside a <style></style> tag. Click Save. It stays when you update the theme.
Larger text
There is no text size setting. To make reading text 22px on desktop and 20px on phones, paste this into Site header:
<style>
html { --b: 2.25rem; --fs-body: 1.375rem; }
@media (max-width: 47.99rem) { html { --b: 1.875rem; --fs-body: 1.25rem; } }
</style>--b is the baseline (line height) and --fs-body is the body text size. Change both together, or lines drift off the grid. Check the result with ?grid on the address.
Bigger changes
Unzip a copy of the theme, edit the source files and rebuild. You need Node 22 or later. From the theme folder:
npm install # once
npm run dev # rebuild while you edit
npm run build # minified build
npm test # check with GScan
npm run zip # build, check and packageassets/css/: the source CSS.tokens.cssexplains the colours, sizes and baseline grid.assets/js/: the source JavaScript.assets/built/: generated files. Do not edit these.
Keep a note of your changes. Uploading a new version replaces the theme files.
Translation
- Copy
locales/en.jsonto your language code, for examplelocales/de.json. - Translate the values, not the keys. Keep the placeholders (
{name},{names},{Name},{count}) as they are. - Set Publication language in Settings → General to the same code (for example
de). - Zip the theme with your new file inside it and upload it again.
The post.word entry holds the singular, plural and lowercase forms of the word for a post (Issue, Post, Letter, Edition). Translate those for your language too. Theme setting names in Ghost Admin stay in English.
To change one word, such as the Subscribe button, edit its value in locales/en.json.
Right-to-left languages
Sites set to Arabic (ar), Hebrew (he), Persian (fa) or Urdu (ur) switch to right-to-left.
Icons
Icons are SVG files in partials/icons/. Add your own there and use them as {{> "icons/name"}}.