Internal Tags Beta

In Ghost 0.9, we’ve released a new ‘beta’ feature called Internal Tags. Unlike regular tags, internal tags are only displayed within a blog’s theme. Internal tags do not have their own frontend archive page and will not be visible within the post along with other tags.

What does ‘Beta’ mean?

In this case, we’re using the word ‘Beta’ to indicate that this is early access to an incomplete feature. You should expect that it won’t always work correctly and that it may change in breaking ways. So please don’t use it in production or on a blog where you care that everything works correctly.

Enable Internal Tags

To enable the Internal Tags beta feature, head over to the Labs settings of your blog. Next, click on the checkbox next to Internal Tags to enable the feature.

Using Internal Tags

To use an internal tag, open up the Post Settings Menu from the Ghost Editor by clicking on the settings cog.

Next, click inside the Tags field.

Setting an internal tag is much like setting a regular tag, however internal tags are identified with #hash symbols before the text. For example, #myinternaltag would be an example internal tag, and non-internal would be an example of a regular tag.

You’ll notice on the frontend of a published post using internal tags, that the internal tag is not displayed (see example below).

Internal tags will appear with a label of internal on the Tag settings within Ghost for easy identification.

Using internal tags within themes

There are a few different ways you can work with internal tags within your theme. For example, you can use both the {{tags}} and {{#foreach tags}} helpers with internal tags. You can also use{{#has}} as well.

Below is an example of detecting an internal tag, using {{#foreach tags}}

{{#foreach tags visibility="internal"}}

For more information on visibility as it relates to the {{#foreach}} block with internal tags, view our theme documentation on {{#foreach}} here.

To detect internal tags using {{tags}} you would do something like this,

{{tags visibility="internal"}}

For more information on visibility as it relates to the {{tags}} helper, view our theme documentation on tags here.

The {{#has}} helper can also be used to return posts with a specific internal tag if need, for example {{#has tag="#myinternaltag"}}.