惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

SecWiki News
SecWiki News
H
Help Net Security
罗磊的独立博客
Stack Overflow Blog
Stack Overflow Blog
M
MIT News - Artificial intelligence
Jina AI
Jina AI
L
LangChain Blog
K
Kaspersky official blog
I
Intezer
Martin Fowler
Martin Fowler
爱范儿
爱范儿
AWS News Blog
AWS News Blog
The Hacker News
The Hacker News
Recorded Future
Recorded Future
人人都是产品经理
人人都是产品经理
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
CXSECURITY Database RSS Feed - CXSecurity.com
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
U
Unit 42
N
News and Events Feed by Topic
A
Arctic Wolf
G
GRAHAM CLULEY
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 聂微东
F
Fortinet All Blogs
C
Cisco Blogs
美团技术团队
Vercel News
Vercel News
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
H
Hacker News: Front Page
T
Tailwind CSS Blog
I
InfoQ
宝玉的分享
宝玉的分享
Google DeepMind News
Google DeepMind News
博客园 - 司徒正美
P
Palo Alto Networks Blog
A
About on SuperTechFans
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
云风的 BLOG
云风的 BLOG
TaoSecurity Blog
TaoSecurity Blog
Google Online Security Blog
Google Online Security Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Privacy & Cybersecurity Law Blog
H
Heimdal Security Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hacker News: Ask HN
Hacker News: Ask HN
O
OpenAI News
博客园 - Franky
Scott Helme
Scott Helme

Example blog

Ghost routing explained with routes.yaml examples — routes, collections & taxonomies Ghost redirects explained with practical redirects.yaml examples How to Serve JSON or XML Data in Ghost How to Change Your Default Post Template in Ghost Ghost Custom Theme Settings How to add Google Fonts to Ghost Themes How to Configure Ghost with Mailgun Ghost Theme Structure & Organization How to Make Custom Templates in Ghost Themes How to Install Ghost CMS via Ghost-CLI How to Add Syntax Highlighting to Ghost The best Ghost CMS hosting platforms Ghost 6.0 — Social Web and Native Ghost Analytics Ghost CMS Social web beta, email 2FA and more author social links How to keep custom design settings when updating your Ghost theme How to use the public preview card in Ghost How to add members-specific sections in Ghost How to customize the default content CTA in Ghost How to build a custom homepage in Ghost An overview of Ghost editor cards and and how they work Ghost CMS News: One-time payments & collecting sales tax How to customize the private site access template in Ghost How to add custom fonts in Ghost themes Ghost CMS News: Additional payment methods & internal linking How to use Code Injection in Ghost Ghost CMS News: TK reminders, ActivityPub and improvements How to format dates and use the date helper in Ghost Ghost CMS internationalization, custom fonts & spam protection Understanding and optimizing post and page settings in Ghost CMS Trigger the Ghost Portal popup based on page scroll progress How to Deploy Your Ghost Theme with GitHub Actions How to create a custom recommendations page for your Ghost CMS theme Ghost CMS News: New editor, refreshed settings & recommendations Ghost CMS News: Source - the new default theme and native image editing How to Add Different Logos for Dark & Light Themes in Ghost Upgrade to Node v18 for Ghost CMS & common errors Ghost Snippets: Adding Schema markup in Ghost How to add a scroll-based progress bar to your Ghost CMS site How to Create a Custom Navigation Template in Ghost How to Segment Subscribers with Member Labels in Ghost The best way to create a contact page in Ghost How to Use the Ghost Subscription Forms in Your Theme & Posts How to update your Ghost site URL when self-hosting Ghost CMS News: Signup cards and better landing pages How to Add Breadcrumbs to Your Ghost Theme How to integrate the Applause Button into your Ghost theme How to Hide a Post From the Home Page in Ghost CMS Ghost CMS block and contentFor helper overview & tips How to add Image Lightbox to Ghost Themes Ghost CMS News: Signup form embed, new editor and bulk actions. Biron Themes becomes Bright Themes 🎉 How to Audit & Test a Ghost Theme How to Create Related Posts Section in Ghost How to Use Ghost Filter Expressions Ghost CMS newsletter settings and post analytics How to Update Your Ghost Theme When We Release New Versions Ghost CMS News: Automatic list cleaning & email troubleshooting How to Create a Featured Post Slider in Ghost How to Add Reading Time to Ghost Blog Posts How to Create a Post Archive for Your Ghost Theme Ghost CMS Price Helper Overview & Tips Self-Hosted Ghost CMS with DigitalOcean Ghost CMS News: Member Growth Sources & Audience Feedback How to Open External Links in a New Tab in Ghost How to Integrate Google Analytics with Ghost Ghost CMS News: History Log & Newsletter Analytics How to Automatically Add Member Labels From Referral Traffic in Ghost? Ghost CMS News: Free trials & email notifications Ghost CMS Match Helper Usage & Tips Ghost CMS News: Native Comments Ghost CMS News: Ghost Explore & Premium Newsletter Previews Ghost Snippets: Custom Progress Cards & Steps Ghost CMS News: Native Search The Best Ghost CMS Search Plugins & Libraries Ghost Snippets: Custom Stylish Tables How to Add a Scroll Top & Progress Indicator Button in Ghost Ghost Snippets: Accordions How to Add Tag Dropdown to Your Ghost Theme Ghost 5.0 released 🎉 Ghost Snippets: Custom Subscribe Forms Ghost Snippets: Custom Alert Boxes How to Show Post or Newsletter Issue Number in Ghost How to Self-Host Google Fonts in Ghost CMS Ghost CMS News: Membership, Tiers & Activity Feed Custom Pages in Ghost CMS Themes Ghost CMS Search Using Fuse.js Ghost CMS News: Offers and Discounts & New Cards Ghost CMS News: Membership tiers, email CTA & filters Ghost CMS News: Grammarly Support & Feature Image Captions. Ghost CMS News: Improved Member Accounts & Personalized Newsletter. Ghost 4.0 Launched With Native Newsletters & Membership Ghost CMS News: Cancellation Feedback & Newsletter Stats. Ghost CMS News: Improved Member Dashboard & Sidebar Views. Ghost CMS News: Google Pay support, email newsletters & secondary navigation Ghost CMS News: Member Support, Portal & Content Snippets. Ghost CMS News: Referral Programs & Responsive Images. Ghost Themes as Progressive Web Apps Ghost 3.0 is here with brand new features Ghost 2.0 is here with new features How to Add Search to Ghost Using ghostHunter
How to set meta data of your custom routes & collections in Ghost
Bright Themes · 2024-06-16 · via Example blog

Ghost is very practical and makes it easy to create custom routes and collections, allowing you to tailor your content and optimize it for search engines and social media platforms through meta data settings.

The main steps for setting the meta data for your custom routes and collections:

  1. Add the data property to the route or collection with the page slug.
  2. Create the page with the slug you specified earlier.
  3. Add the meta data in your page settings.
  4. Upload the new routes.yaml file.

Now, we'll go into more details and also give you some examples of how you can set meta data for custom routes and collections in Ghost.

The two main types of content relevant for setting meta data are pages and tags. In the context of Ghost, pages are the backbone of your website, acting as static elements that convey critical information. Tags in Ghost are a powerful organizational tool, grouping related content together.

For more details check out our detailed overview of page settings, going beyond meta data.

When talking about meta data in pages and tags, you can set the following extra context for search engines:

  • Meta title — set a different title for search engines. In Ghost, the recommended length is up to 60 characters for pages and 70 characters for tags
  • Meta description — set a different description for search engines. In Ghost, the recommended length is up to 145 characters for pages and 156 characters for tags
  • Canonical URL — To prevent search engines from indexing duplicate content, specify the canonical URL. This is crucial for maintaining a coherent and effective SEO strategy

Beyond these settings, you can set X (Twitter) and Facebook specific information like: title, description, and image.

Now that we have an understanding of the settings, let’s see how these can be applied when using custom routes.

Custom routes, collections, and channels

Before delving into the meta data settings, let's revisit the fundamentals of custom routes and collections in Ghost. Custom routes enable you to create unique URLs for specific pieces of content, offering a personalized navigation experience for your audience. Collections and channels, allow you to group related content, shaping the way it's presented on your site.

Creating custom routes and collections involves utilizing the routes.yaml file in your Ghost theme. This file acts as a configuration hub, letting you define the structure and organization of your content. Each route and collection can be tailored, giving you the option to set: permalink, template, filter, and data.

We won’t go into more details on all of that as we have covered it before, in our Dynamic routing and routes.yaml post, but next we will look into the data property.

Data property in routes and collections

Collections and routes accept a data property, which will pass in the data to the collection or route.

Let’s look at an example to understand this. You might have a portfolio and blog collection. here’s how you can set the title, description, and meta data for these collections. Here’s the routes setup:

collections:
	/blog/:
		permalink: /blog/{slug}/
		template: blog
		filter: tag:blog
		data: tag.blog
  /portfolio/:
    permalink: /portfolio/{slug}/
    template: portfolio
    filter: tags:[case-study,project]
    data: page.portfolio

Let’s look at each collection separately:

  1. The blog collection will have all posts with the blog tag, and the title, description as well as meta data will all come from the blog tag. With this setup, the blog tag will redirect to the /blog/ page. To control the meta settings go and edit them from the tag settings.
  2. The portfolio collection will have all posts with the case study or project tag. In this case, the meta data is sourced from the /portfolio/ page instead of the tag. To control the meta settings go and edit them from the page settings.

Too many redirects

As with all settings you have to be careful and look out for some common issues you might experience in case your settings and data don’t match.

If you face an ERR_TOO_MANY_REDIRECTS on a collection route that’s likely from one of your collections where you specified the data property but the corresponding page was not created.

For example, if I have the portfolio collection from the above example, I need to have a page with the /portfolio/ URL, otherwise, it will end up in a redirect loop.


Following this guide, you can create custom routes and collections and at the s ame time control the meta data either via pages or tags to have tighter control and optimize your SEO.