inukshuk / jekyll-scholar

jekyll extensions for the blogging scholar
MIT License
1.13k stars 101 forks source link

Suggestion: details link tag #291

Closed nickswalker closed 4 years ago

nickswalker commented 4 years ago

Jekyll's recommended internal linking style now looks like this now:

[Link to a post]({% link _posts/2016-07-26-name-of-post.md %})

It would be nice to have a tag similar to cite_details but which simply produces the URL to the details page, so that detail links could be written in a similar way

[Link to a details page]({% link_details author2020key %})
inukshuk commented 4 years ago

Good idea! So this link_details tag would just produce the link, right? This should be easy to do, because we already have the details_link_for(entry) utility method -- the tag would only have to fetch the corresponding entry and use that method to get the URL.

nickswalker commented 4 years ago

Yes, it'll just output the link. I'll draft a PR for this the next time I work on my site.