How to serve JSON, XML or text files in Ghost
Serve a static JSON, XML or plain-text file at its own URL on your Ghost site, with one route in routes.yaml and one template in your theme.
RoutingCelebrating our new site: 30% off everything with code , until Dec 1.
Step-by-step tutorials, explainers on how Ghost works, what changed in each Ghost release, and short tips, from the person who makes Bright Themes. Kept current with Ghost 6.
Serve a static JSON, XML or plain-text file at its own URL on your Ghost site, with one route in routes.yaml and one template in your theme.
RoutingRename the template you want to post.hbs, and the old post.hbs to custom-<name>.hbs, then zip and upload the theme. For a few posts only, pick a custom template in post settings instead.
TemplatesThe {{price}} helper turns a tier or subscription amount into a formatted price, such as $9. Use it to show your membership prices on a custom pricing or account page.
HelpersMembersGhost opens every link in the same tab. A short script in the site footer code injection adds target="_blank" to links to other sites; for a single link, write it in an HTML card.
EditorThe {{#match}} helper compares two values in a Ghost theme and shows a block when the test passes. It is the way to act on custom theme settings, counts and text.
HelpersGhost's native comments, start to finish: who can comment, what members can do, notifications, moderation, adding comments to a theme, and getting readers to talk.
CommentsWhere to run a Ghost site: Ghost(Pro), managed hosts such as Magic Pages and Synaps Media, or your own server. What each includes, so you can pick the one that fits your budget and skills.
HostingGhost 5.0 brought multiple newsletters, membership tiers and offers, a new publishing flow and theme design settings, plus breaking changes for custom themes.
ThemesShow the opening of a members-only or paid post to everyone, then ask them to sign up or upgrade to read the rest, with a soft fade where the preview ends.
EditorMembersGive a Ghost page its own layout, such as an About or Contact page, with a page-slug template, a custom template or a route in routes.yaml.
TemplatesGive site owners colors, fonts, images and toggles they can change in Ghost Admin, defined once in your theme's package.json.
ThemesDesignRun Ghost on your own server: what it costs, what you take care of yourself, what Ghost 6 needs, and how DigitalOcean's Ghost 1-Click App sets it up.
HostingKeep your logo readable when your Ghost site switches to dark mode: recolor it with CSS, style an SVG logo, or upload a second logo with a theme setting.
DesignOverride Ghost's navigation template in your theme to change the menu's markup, style the secondary menu differently, or add an icon to each item.
NavigationLabel members as they sign up, from a fixed list of topics, from a post's tags or authors, or from the link that brought them, then filter and email each segment.
MembersBuild your own member sign-up form, with a name field and success and error messages, and place it in your Ghost theme or inside any post.
MembersNewslettersShow readers where a post sits on your site, Home / Tag / Post, with a small partial in your Ghost theme and a few lines of CSS.
NavigationGive the post an internal tag such as #hide, then filter that tag out of the home collection in routes.yaml. The post stays published and reachable at its URL.
RoutingEditorroutes.yaml decides your Ghost site's URLs: which template a URL uses and how posts are grouped. How routes, collections, taxonomies and channels work, with examples you can copy.
RoutingUpdate one of our Ghost themes to its latest version without losing your changes or your design settings.
ThemesShow visitors, free members and paid members their own sections of your Ghost theme, from the header buttons to account and membership pages.
MembersNumber your posts or newsletter issues in an archive with a CSS counter, counting up or down, without putting the number in every title.
NewslettersHelpersGhost 4.0 made memberships and newsletters part of every site, with a redesigned Ghost Admin, a dashboard and Portal. What changed for themes, and what to check.
ThemesShow your featured posts in a slider at the top of your Ghost homepage, with the get helper and Embla Carousel.
TemplatesDesignFrom a solo newsletter to a busy newsroom, there is a theme that fits. No code needed.