1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-12-19 00:52:19 +01:00

Merge pull request #84 from fte378/add_keywords

Add keywords
This commit is contained in:
Alan Orth 2018-02-04 10:16:05 +02:00 committed by GitHub
commit e2dd434e07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 2 deletions

View File

@ -18,6 +18,7 @@ See [picturingjordan.com](https://picturingjordan.com) for an example of this th
- Can show a message about cookie usage to the user, see [`exampleSite/config.toml`](https://github.com/alanorth/hugo-theme-bootstrap4-blog/blob/master/exampleSite/config.toml) - Can show a message about cookie usage to the user, see [`exampleSite/config.toml`](https://github.com/alanorth/hugo-theme-bootstrap4-blog/blob/master/exampleSite/config.toml)
- Allow addition of custom `<head>` code in site's `layouts/partial/head-custom.html` (see [#17](https://github.com/alanorth/hugo-theme-bootstrap4-blog/pull/17)) - Allow addition of custom `<head>` code in site's `layouts/partial/head-custom.html` (see [#17](https://github.com/alanorth/hugo-theme-bootstrap4-blog/pull/17))
- Configurable display of summaries of content in list templates. - Configurable display of summaries of content in list templates.
- configurable keywords for every post
## Usage ## Usage
Clone the repository to your site's `themes` directory. Refer to [`exampleSite/config.toml`](https://github.com/alanorth/hugo-theme-bootstrap4-blog/blob/master/exampleSite/config.toml) for recommended configuration values. Clone the repository to your site's `themes` directory. Refer to [`exampleSite/config.toml`](https://github.com/alanorth/hugo-theme-bootstrap4-blog/blob/master/exampleSite/config.toml) for recommended configuration values.

View File

@ -13,6 +13,11 @@ categories = [
"Development", "Development",
"golang", "golang",
] ]
keywords = [
"Hugo",
"static",
"generator",
]
menu = "main" menu = "main"
+++ +++

View File

@ -12,6 +12,11 @@ categories = [
"Development", "Development",
"golang", "golang",
] ]
keywords = [
"Hugo",
"static",
"generator",
]
menu = "main" menu = "main"
+++ +++

View File

@ -39,9 +39,9 @@
"@type": "Person", "@type": "Person",
"name": "{{ .Params.author | default .Site.Params.author }}" "name": "{{ .Params.author | default .Site.Params.author }}"
} }
{{- if or (.Params.categories) (.Params.tags) -}} {{- if or (.Params.keywords) (or (.Params.categories) (.Params.tags)) -}}
, ,
"keywords": "{{ delimit (union .Params.categories .Params.tags) ", " }}" "keywords": "{{ delimit (union .Params.keywords (union .Params.categories .Params.tags)) ", " }}"
{{- end }} {{- end }}
{{- with .Params.description -}} {{- with .Params.description -}}