Ghost

Listing Tags on Home Page in Ghost CMS 1.0

As a disclaimer, this feature utilizes the experimental Ghost public API.  The public API allows access to your blog’s public data, such as listing of all tags.

This feature is still in Beta, so please use at your own discretion.  For more information on the API, please take a look here.

1. Enable Public API

Login to the Ghost admin console and go to the Labs option.  At the bottom of the Labs screen, you will see a checkbox for Public API.  Check it to enable.

2. Use the #get Helper

With the public API enabled, you may now use the #get helper in your views.  For example, the following code loops through all tags in your blog and prints out its meta data.

{{#get "tags"}}
    {{#foreach tags}}
        id:{{id}}<br/>
        name:{{name}}<br/>
        description:{{description}}<br/>
        image:{{image}}<br/>
        url:{{url}}<br/>
    {{/foreach}}
{{/get}}