When click a tag, How the url jump? Which page to show the tag list? #5057
Replies: 2 comments 4 replies
-
How about this? // EJS template
<% site.tags.sort('name').each((tag) => { %>
<a href="<%- url_for('/tags/' + tag.slug) %>">
<%= tag.name %>
</a>
<% }); %> // Example of result
<a href="/tags/NET-Core">.NET Core </a>
<a href="/tags/AWS">AWS </a>
<a href="/tags/AWS-Aurora">AWS Aurora </a>
<a href="/tags/AWS-CDK">AWS CDK </a>
... |
Beta Was this translation helpful? Give feedback.
-
Have you created the Inside that file you should have markdown like this: ---
title: Tags
type: "tags"
layout: "tags"
--- Tags page shows the list of tags... the |
Beta Was this translation helpful? Give feedback.
-
Like this
<a href="<%- url_for(
/tags/${tag.name}) %>">
How could i known which page the url used layout? I just want to custom the tag-list page
Beta Was this translation helpful? Give feedback.
All reactions