diff options
author | Emiel Hollander <EmielH@users.noreply.github.com> | 2018-10-07 11:32:34 +0300 |
---|---|---|
committer | Emiel Hollander <EmielH@users.noreply.github.com> | 2018-10-07 11:32:34 +0300 |
commit | b22abdc7f43ef26a63e28e67c7045d73b1ec6a8a (patch) | |
tree | bdf73e4d65f0609b6fc07070a9ff09536576f199 | |
parent | 5d20e1cae14ed1c025c536ecfbbb21cc2d7efbe6 (diff) |
Add manually setting the summary in page frontmatter
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | layouts/index.html | 2 |
2 files changed, 6 insertions, 2 deletions
@@ -52,7 +52,7 @@ If you have cloned the theme, you can run `git pull` inside the theme folder. ### Internationalisation (i18n) -Tale supports using other languages than English. Language files for the texts Tale uses are provided in the `i18n` directory. The default language is English. To swith languages, add the key `defaultContentLanguage` to your `config.toml` file. For example: +Tale supports using other languages than English. Language files for the texts Tale uses are provided in the `i18n` directory. The default language is English. To switch languages, add the key `defaultContentLanguage` to your `config.toml` file. For example: ``` defaultContentLanguage = "nl" @@ -64,6 +64,10 @@ Feel free to submit pull requests for other translations of Tale's texts. [Hugo documentation for multilingual sites](//gohugo.io/content-management/multilingual/) +### Custom summaries + +Tale allows for writing the summary of your posts manually by setting the `summary` variable in the page frontmatter. If this variable is not set, the summary that Hugo automatically generates will be used. + ## Acknowledgments Thanks diff --git a/layouts/index.html b/layouts/index.html index 5d946f5..918ca5c 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -10,7 +10,7 @@ <div class="catalogue-line"></div> <p> - {{ .Summary }} + {{ if isset .Params "summary" }}{{ .Params.Summary }}{{ else }}{{ .Summary }}{{ end }} </p> </div> |