Last active
June 14, 2020 12:31
-
-
Save damien1/f0f310e5fad3db571a6d597736cfbb07 to your computer and use it in GitHub Desktop.
Hugo Featured Posts Shortcode example {{< featured count=6 >}}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ $count := .Get "count" | default 3 }} | |
<h3>Featured Posts</h3> | |
<ul> | |
{{ range first $count .Site.Taxonomies.tags.featured }} | |
<li><a href="{{ .Page.RelPermalink }}">{{ .Page.Title }}</a> | |
</li> | |
{{ end }} | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment