mirror of
https://github.com/Vimux/Binario.git
synced 2024-12-21 20:19:06 +00:00
Add tags support to entry/meta
This commit adds support in having tags in entry.meta. This includes: - Updating the README - Adding values for tags across multiple languages (en, fr, it, pt-br, pt) - Moving from span to div in entry/meta/categories to make sure each one of 'tags' and 'categories' sections is in a separate line.
This commit is contained in:
parent
ee84631bbb
commit
69b90178c1
8 changed files with 31 additions and 4 deletions
|
@ -154,7 +154,7 @@ googleAnalytics = "" # Enable Google Analytics by entering your tracking id
|
|||
hideNoPostsWarning = false # Don't show no posts empty state warning in main page, if true
|
||||
|
||||
[Params.Entry]
|
||||
meta = ["date", "categories"] # Enable meta fields in given order
|
||||
meta = ["date", "categories", "tags"] # Enable meta fields in given order
|
||||
toc = true # Enable Table of Contents
|
||||
tocOpen = true # Open Table of Contents block. Optional
|
||||
|
||||
|
@ -247,6 +247,7 @@ related: true # Enable/disable Related content for specific page
|
|||
meta:
|
||||
- date
|
||||
- categories
|
||||
- tags
|
||||
featured:
|
||||
url: image.jpg # relative path of the image
|
||||
alt: A scale model of the Eiffel tower # alternate text for the image
|
||||
|
@ -316,7 +317,7 @@ may activate meta fields with `meta` parameter under the `[Params.Entry]` config
|
|||
|
||||
```toml
|
||||
[Params.Entry]
|
||||
meta = ["date", "categories"]
|
||||
meta = ["date", "categories", "tags"]
|
||||
```
|
||||
|
||||
#### Related Content
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
- id: meta_categories
|
||||
translation: "Categories"
|
||||
|
||||
- id: meta_tags
|
||||
translation: "Tags"
|
||||
|
||||
# Share
|
||||
- id: share-caption
|
||||
translation: "Share on"
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
- id: meta_categories
|
||||
translation: "Catégories"
|
||||
|
||||
- id: meta_tags
|
||||
translation: "Mots-clefs"
|
||||
|
||||
# Share
|
||||
- id: share-caption
|
||||
translation: "Partager sur"
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
- id: meta_categories
|
||||
translation: "Categorie"
|
||||
|
||||
- id: meta_tags
|
||||
translation: "Tag"
|
||||
|
||||
# Share
|
||||
- id: share-caption
|
||||
translation: "Condividi su"
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
- id: meta_categories
|
||||
translation: "Categorias"
|
||||
|
||||
- id: meta_tags
|
||||
translation: "Tags"
|
||||
|
||||
# Share
|
||||
- id: share-caption
|
||||
translation: "Campartilhar no"
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
- id: meta_categories
|
||||
translation: "Categorias"
|
||||
|
||||
- id: meta_tags
|
||||
translation: "Tags"
|
||||
|
||||
# Share
|
||||
- id: share-caption
|
||||
translation: "Campartilhar"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{- if .Params.categories }}
|
||||
<span class="entry__meta-categories meta-categories">
|
||||
<div class="entry__meta-categories meta-categories">
|
||||
<span class="meta-categories__list">{{ T "meta_categories" }}:
|
||||
{{- range $index, $category := .Params.categories }}{{ if gt $index 0 }}, {{ end }}
|
||||
<a class="meta-categories__link" href="{{ "categories/" | relLangURL }}{{ . | urlize | lower }}/" rel="category">
|
||||
|
@ -7,5 +7,5 @@
|
|||
</a>
|
||||
{{- end }}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
{{- end }}
|
11
layouts/partials/entry/meta/tags.html
Normal file
11
layouts/partials/entry/meta/tags.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{{- if .Params.tags }}
|
||||
<div class="entry__meta-tags meta-tags">
|
||||
<span class="meta-tags__list">{{ T "meta_tags" }}:
|
||||
{{- range $index, $category := .Params.tags }}{{ if gt $index 0 }}, {{ end }}
|
||||
<a class="meta-tags__link" href="{{ " tags/" | relLangURL }}{{ . | urlize | lower }}/" rel="tag">
|
||||
{{- . -}}
|
||||
</a>
|
||||
{{- end }}
|
||||
</span>
|
||||
</div>
|
||||
{{- end }}
|
Loading…
Reference in a new issue