Pretty easy way to do linked list posts (e.g. Daring Fireball-style link posts)

This may be old news to some of you but I didn’t see it documented so thought I’d share.

I managed to build in “linked list” style posts (e.g. Daring Fireball-style link posts) using the canonical URL override and a simple #has statement on my main content template (content.hbs in my case). Quick how-to:

  1. Choose a tag to denote link posts. This can be internal (I used #link).

  2. Use {{#has}} to change the formatting only for link posts and link to the canonical URL. In my case, I also added an SVG symbol to the title. The canonical URL can be called using the {{canonical_url}} tag.

        {{#has tag="#link"}}
            <a href="{{canonical_url}}"><h1 class="single-title">{{title}} <svg class="icon-title single-icon"><use xlink:href="#title-link"></use></svg></h1></a>
            <h1 class="single-title">{{title}}</h1>
  1. Update the canonical URL under “post settings” and “meta data”. As seen here:

  1. (Optional) You can also use {{#has}} in the loop, if you want to denote link posts in your list of posts.

You can see this in action in the loop on my website — click “load more” if you don’t see one at the top. Here is an example of a link post directly.

Hope this is helpful!