I’m using the latest version of Ghost and trying to implement the “Related” section as per this Turorial:
Specifically this part:
{{#get "posts" limit="5" filter="tags:[{{post.tags}}]+id:-{{post.id}}" include="tags" as |related|}}
Is there any documentation on the get helper around the filter and square brackets - it’s hard to know what it’s doing here - I’m guessing it’s returning posts in some sort of best matching order? It certainly is not restricting to ONLY posts with the same tags.
Secondly, how can I exclude any internal tags? Is there a way to build the tags array outside of the get helper perhaps?
Thirdly, if I add a specific order, it overrides the “best match” and then I get posts in date order that match at least one tag (AFAICT) - is there a way to order by match, then date?
And lastly - {{posts.tags}}
is a list of objects, whereas {{#post}}{{tags}}{{/post}}
is a helper - how might I write my get posts
helper above whilst within the post
context?
Thanks!