Add tiles to homepage that redirect to external content

Hi everyone,

I was not able to find this information so I thought I’d ask. I have a blog powered by ghost (https://blog.stonly.com/) and I would like to add tiles on the homepage that would redirect to external content (loading another URL) rather than opening an article in the blog. Do you know whether this is possible?

Thanks a lot in advance.

This sounds like a job for canonical URLs. In post settings you can set a canonical URL, which provides a reference to the original source of a post. Not only will this add the appropriate metadata to the post, but it’ll allow us to hook into that URL in the handlebars code. In the post loop change the {{url}} variable to the following:

{{# if canonical_url}}{{canonical_url}}{{else}}{{url}}{{/if}}

From looking at your site can I assume you’re using Casper? If so then you’ll need to change the following lines of code in your copy of the theme:

Hope this helps! Let us know how you get on :slightly_smiling_face:

2 Likes

Wow thanks a lot for the fast answer. At first sight, that should totally do the trick, I’ll try it and let you know.

Thanks again.

1 Like

thanks for sharing the code, it was helpful ! shareit app vidmate app

1 Like

i’m getting Getting PostCSS plugin error, can anyone help ?