GHOST CMS - Handlebars Themes - Further Reading

Further Reading

Where you go from here is up to you, the world is your router1

Ghost‘s dynamic routing system is an extremely powerful way to build advanced structures for your site, and it‘s hard to document every possible example of what can be done with it in comprehensive detail.

Detailed tutorials

While these docs cover simple examples and broad use-cases, you‘ll find more detailed and specific use-cases of how to build different types of publication in these tutorials:

Head over to the Ghost tutorials section to find even more tutorials about how to build different types of theme and website with Ghost.


Limitations & troubleshooting

As you work further with dynamic routing it‘s worth keeping in mind that there are some limitations to what you‘re able to do with it. Here are a few of the most common areas where you‘ll find the edges of what‘s possible:

Slugs can conflict

Dynamic routing has no concept of what slugs are used in Ghost, and vice-versa. So if you create a route called /about/ and a page in Ghost called about then one of them is going to work, but not both. You‘ll need to manage this manually.

Collections must be unique

If you have a collection filtering for posts tagged with camera and another filtering for posts tagged with news - then you will run into problems if a post is tagged with both camera and news. You should either trust your authors to use the correct tags, or base collections on properties which are always unique, like primary_tag.

Trailing slashes are required

You probably noticed that all the examples here use trailing slashes on routes, which is because these are required for dynamic routing to function correctly.


FOOTNOTES

1: I‘m so sorry

原文地址:https://www.cnblogs.com/QDuck/p/12081564.html

时间: 2024-11-09 10:05:01

GHOST CMS - Handlebars Themes - Further Reading的相关文章

GHOST CMS - 创建自定义主页 Creating a custom home page

创建自定义主页 Creating a custom home page 为你的网站创建一个自定义的主页是一个让你从人群中脱颖而出的好方法,并把你自己独特的印记存放在你的网上.本教程向您展示了如何在Ghost中自定义和开发自己的自定义主页. Creating a custom home page for your site is a great way to set yourself apart from the crowd and put your own unique stamp on you

GHOST CMS - Utility Helpers公用事业帮手

Utility Helpers Utility helpers are used to perform minor, optional tasks. Use this reference list to discover what each handlebars helper can do when building a custom Ghost theme. Available utility helpers asset ghost_head/foot body_class post_clas

GHOST CMS - Data Helpers

Data Helpers Data helpers are used to output data from your site. Use this reference list to discover what each handlebars helper can do when building a custom Ghost theme. Available data helpers @config @site navigation post url title img_url excerp

GHOST CMS - 配置 Config

Config For self-hosted Ghost users, a custom configuration file can be used to override Ghost's default behaviour. This provides you with a range of options to configure your publication to suit your needs. 对于自承载的Ghost用户,可以使用自定义配置文件覆盖Ghost的默认行为.这为您提供

GHOST CMS - 索引Index

Index Use: {{#is "index"}}{{/is}} to detect this context. 使用:{{#is "index"}}{{/is}}来检测这个上下文. Description描述 index is the name for the main post list in your Ghost site, the index context includes the home page and subsequent pages of th

GHOST CMS - Properties

Properties This is a full list of all the available properties that can be used within your routes.yaml config file to manipulate your URL structure Index of all available properties Property Description template Determines which Handlebars template

GHOST CMS - Editor编辑器

Editor The open-source Ghost editor is robust and extensible. Overview More than just a formatting toolbar, the rich editing experience within Ghost allows authors to pull in dynamic blocks of content like photos, videos, tweets, embeds, code and mar

GHOST CMS -上下文概述 Context Overview

Context Overview上下文概述 Each page in a Ghost theme belongs to a context, which determines which template is used, what data will be available and what content is output by the {{body_class}} helper. Ghost主题中的每个页面都属于一个上下文,它决定使用哪个模板.哪些数据可用以及{{body_class}

GHOST CMS - Content Taxonomies

Content Taxonomies Taxonomies are groupings of posts based on a common relation. In Ghost, this is always defined by the post's author or tag Using taxonomies, Ghost will automatically generate post archives for tags and authors like /tag/getting-sta