mirror of
https://github.com/Vimux/Binario.git
synced 2024-11-11 01:38:28 +00:00
Merge pull request #62 from bugok/tags_meta
Add tags to entry/meta/tags
This commit is contained in:
commit
8bd2f6f17f
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
|
hideNoPostsWarning = false # Don't show no posts empty state warning in main page, if true
|
||||||
|
|
||||||
[Params.Entry]
|
[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
|
toc = true # Enable Table of Contents
|
||||||
tocOpen = true # Open Table of Contents block. Optional
|
tocOpen = true # Open Table of Contents block. Optional
|
||||||
|
|
||||||
|
@ -247,6 +247,7 @@ related: true # Enable/disable Related content for specific page
|
||||||
meta:
|
meta:
|
||||||
- date
|
- date
|
||||||
- categories
|
- categories
|
||||||
|
- tags
|
||||||
featured:
|
featured:
|
||||||
url: image.jpg # relative path of the image
|
url: image.jpg # relative path of the image
|
||||||
alt: A scale model of the Eiffel tower # alternate text for 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
|
```toml
|
||||||
[Params.Entry]
|
[Params.Entry]
|
||||||
meta = ["date", "categories"]
|
meta = ["date", "categories", "tags"]
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Related Content
|
#### Related Content
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
- id: meta_categories
|
- id: meta_categories
|
||||||
translation: "Categories"
|
translation: "Categories"
|
||||||
|
|
||||||
|
- id: meta_tags
|
||||||
|
translation: "Tags"
|
||||||
|
|
||||||
# Share
|
# Share
|
||||||
- id: share-caption
|
- id: share-caption
|
||||||
translation: "Share on"
|
translation: "Share on"
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
- id: meta_categories
|
- id: meta_categories
|
||||||
translation: "Catégories"
|
translation: "Catégories"
|
||||||
|
|
||||||
|
- id: meta_tags
|
||||||
|
translation: "Mots-clefs"
|
||||||
|
|
||||||
# Share
|
# Share
|
||||||
- id: share-caption
|
- id: share-caption
|
||||||
translation: "Partager sur"
|
translation: "Partager sur"
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
- id: meta_categories
|
- id: meta_categories
|
||||||
translation: "Categorie"
|
translation: "Categorie"
|
||||||
|
|
||||||
|
- id: meta_tags
|
||||||
|
translation: "Tag"
|
||||||
|
|
||||||
# Share
|
# Share
|
||||||
- id: share-caption
|
- id: share-caption
|
||||||
translation: "Condividi su"
|
translation: "Condividi su"
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
- id: meta_categories
|
- id: meta_categories
|
||||||
translation: "Categorias"
|
translation: "Categorias"
|
||||||
|
|
||||||
|
- id: meta_tags
|
||||||
|
translation: "Tags"
|
||||||
|
|
||||||
# Share
|
# Share
|
||||||
- id: share-caption
|
- id: share-caption
|
||||||
translation: "Campartilhar no"
|
translation: "Campartilhar no"
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
- id: meta_categories
|
- id: meta_categories
|
||||||
translation: "Categorias"
|
translation: "Categorias"
|
||||||
|
|
||||||
|
- id: meta_tags
|
||||||
|
translation: "Tags"
|
||||||
|
|
||||||
# Share
|
# Share
|
||||||
- id: share-caption
|
- id: share-caption
|
||||||
translation: "Campartilhar"
|
translation: "Campartilhar"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{- if .Params.categories }}
|
{{- 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" }}:
|
<span class="meta-categories__list">{{ T "meta_categories" }}:
|
||||||
{{- range $index, $category := .Params.categories }}{{ if gt $index 0 }}, {{ end }}
|
{{- range $index, $category := .Params.categories }}{{ if gt $index 0 }}, {{ end }}
|
||||||
<a class="meta-categories__link" href="{{ "categories/" | relLangURL }}{{ . | urlize | lower }}/" rel="category">
|
<a class="meta-categories__link" href="{{ "categories/" | relLangURL }}{{ . | urlize | lower }}/" rel="category">
|
||||||
|
@ -7,5 +7,5 @@
|
||||||
</a>
|
</a>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</div>
|
||||||
{{- end }}
|
{{- 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