Custom Pages URLs
The OnFlow theme includes several types of built-in pages. This guide explains how to customize these pages and manage their navigation links throughout your site.
Built-in Pages Overview
The theme includes two types of built-in pages:
Pages with Custom Routes
These pages are defined in routes.yaml
:
- Sign-in (
/signin/
) - Sign-up (
/signup/
) - Writings (
/writings/
) - Projects (
/projects/
)
Pages with Predefined Templates
These pages use custom templates and require creation in Ghost admin:
- Authors (
/authors/
) - Membership (
/membership/
) - Recommendations (
/recommendations/
) - Tags (
/tags/
)
Customizing Page URLs
Pages with Custom Routes
To modify signin, signup, or writings pages, you need to update the Ghost routes configuration:
- Download your current
routes.yaml
file from Ghost admin - Modify the routes to your desired URLs:
routes: # Original /signup/: template: signup /signin/: template: signin # Example of custom URLs /login/: template: signin /join/: template: signup collections: # Original /writings/: permalink: /{slug}/ filter: 'tag:-hash-project' template: writings /projects/: permalink: /{slug}/ filter: 'tag:hash-project' template: projects # Example of custom URLs /posts/: permalink: /{slug}/ filter: 'tag:-hash-project' template: writings /works/: permalink: /{slug}/ filter: 'tag:hash-project' template: projects
- Save the file and upload it back to Ghost admin
Pages with Predefined Templates
For pages using predefined templates (authors, membership, recommendations, and tags), follow these steps:
- Rename the respective template file in your theme folder:
page-authors.hbs
βpage-your-new-slug.hbs
page-membership.hbs
βpage-your-new-slug.hbs
page-recommendations.hbs
βpage-your-new-slug.hbs
page-tags.hbs
βpage-your-new-slug.hbs
- Update the page URL in Ghost admin to match your new slug
Managing Navigation Links
The theme includes built-in links to some pages in various templates. You can manage these links through the locales file, but the behavior differs depending on the page type.
Completely Removing Links
Some links can be completely removed from theme templates by setting them to "false"
in /locales/en.json
:
{
"/recommendations/": "false",
"/projects/": "false",
"/writings/": "false"
}
Links That Fall Back to Ghost Portal
Authentication and membership-related links cannot be completely removed. When set to "false"
, they fall back to Ghostβs default Portal links:
{
"/signin/": "false", // Falls back to #/portal/signin
"/signup/": "false", // Falls back to #/portal/signup
"/membership/": "false" // Falls back to #/portal/account
}
This ensures users can still access essential authentication features even when custom pages are disabled.
Changing Link URLs
To update the URLs of these links, modify /locales/en.json
:
{
"/signin/": "/login/",
"/signup/": "/join/",
"/recommendations/": "/my-picks/",
"/projects/": "/works/",
"/writings/": "/posts/",
"/membership/": "/subscribe/"
}
Removing Pages
Pages with Custom Routes
- Remove the corresponding route from the
routes.yaml
file - Note: Authentication links (
/signin/
,/signup/
) will fall back to Ghost Portal even when removed from locales
Pages with Predefined Templates
- Delete the corresponding page in Ghost admin
- For non-authentication pages, you can completely remove links using the locales file