Browse Source

shortcodes: Add `list_tags` and `list_categories`

To use:

`{{< list_tags >}}` to provide a list of linked tags.
`{{< list_categories >}}` to provide a list of linked categories.
George Cushen 7 năm trước cách đây
mục cha
commit
74b0b6f508

+ 5 - 0
layouts/shortcodes/list_categories.html

@@ -0,0 +1,5 @@
+<ul class="list-unstyled">
+  {{ range ($.Site.GetPage "taxonomyTerm" "categories").Pages }}
+  <li><a href="{{.Permalink}}">{{.Title}}</a></li>
+  {{ end }}
+</ul>

+ 5 - 0
layouts/shortcodes/list_tags.html

@@ -0,0 +1,5 @@
+<ul class="list-unstyled">
+  {{ range ($.Site.GetPage "taxonomyTerm" "tags").Pages }}
+  <li><a href="{{.Permalink}}">{{.Title}}</a></li>
+  {{ end }}
+</ul>