I’m putting together a publication for a colleague who has been published on many external websites. Along with including the regular posts of this colleague in the regular blog feed, I’ve also integrated the following code into the routes.yaml
file
collections:
/:
permalink: /{slug}/
template: index
filter: tags:-[hash-external]
data:
external:
resource: posts
type: browse
filter: tags:[hash-external]
limit: 3
/external/:
permalink: /404/
template: index
filter: tags:[hash-external]
controller: channel
so that in the footer I can display the title and feature image of a few of those posts, both of which link to those articles on the external sites via usage of the Canonical URL helper:
{{#has tag='#external' }}
<a href='{{ canonical_url }}' target ='_blank'>{{ title }}</a>
{{else}}
<a href='{{ url }}'>{{ title }}</a>
{{/has}}
I currently have two staff accounts (for the same author) set up for these internal and #external
posts, the reader thus being able to visit either .../author/author-name
or .../author/author-name-external-posts
to see a listing of those two separate accounts.
What I’d like to do though is combine the two author accounts into one. I figure I can pull it off with some custom page work, but the only issue I envision is the post count (which the theme I’m using utilizes). That is, while I think I’ll be able to separate the internal and #external
posts on two different pages, they’ll both display the cumulative total of posts: instead of displaying, say “200 posts” and “100 posts”, they’ll both display “300 posts”.
Long story short, might there be a way to exclude the #external
tag from {{plural ../pagination.total}}
in the same way that I’ve done for the Canonical URL above?