diff --git a/exampleSite/content/home/talks.md b/exampleSite/content/home/talks.md index 487fdf29..ae290433 100644 --- a/exampleSite/content/home/talks.md +++ b/exampleSite/content/home/talks.md @@ -14,8 +14,10 @@ weight = 30 # Number of talks to list. count = 10 -# Show talk details (such as abstract)? (true/false) -detailed_list = false +# List format. +# 0 = Simple +# 1 = Detailed +list_format = 0 +++ diff --git a/exampleSite/content/post/managing-content.md b/exampleSite/content/post/managing-content.md index 392e4666..f5169742 100644 --- a/exampleSite/content/post/managing-content.md +++ b/exampleSite/content/post/managing-content.md @@ -66,7 +66,7 @@ You can also associate custom link buttons with the publication by adding the fo url = "http://www.example.org" ``` -If you enabled `detailed_list` for publications in `config.toml`, then there are a few more optional variables that you can include in the publication page preamble. You may use `abstract_short = "friendly summary of abstract"` and `publication_short = "abbreviated publication details"` to display a friendly summary of the abstract and abbreviate the publication details, respectively. Furthermore, there is the option to display a different image on the homepage to the publication detail page by setting `image_preview = "my-image.jpg"`. This can be useful if you wish to scale down the image for the homepage or simply if you just wish to show a different image for the preview. +If you set `list_format=2` to enable a detailed listing of publications in the Publication Widget (`home/publications.md`) or Publication Archive (`publication/_index.md`), then there are a few more optional variables that you can include in the publication page preamble. You may use `abstract_short = "friendly summary of abstract"` and `publication_short = "abbreviated publication details"` to display a friendly summary of the abstract and abbreviate the publication details, respectively. Furthermore, there is the option to display a different image on the homepage to the publication detail page by setting `image_preview = "my-image.jpg"`. This can be useful if you wish to scale down the image for the homepage or simply if you just wish to show a different image for the preview. {{% alert warning %}} Any double quotes (`"`) or backslashes (e.g. LaTeX `\times`) occurring within the value of any frontmatter parameter (such as the *abstract*) should be escaped with a backslash (`\`). For example, the symbol `"` and LaTeX text `\times` become `\"` and `\\times`, respectively. Refer to the [TOML documentation](https://github.com/toml-lang/toml#user-content-string) for more info. diff --git a/exampleSite/content/talk/_index.md b/exampleSite/content/talk/_index.md index 3be9f550..8cb2939e 100644 --- a/exampleSite/content/talk/_index.md +++ b/exampleSite/content/talk/_index.md @@ -4,9 +4,13 @@ date = "2017-01-01T00:00:00Z" math = false highlight = false +# List format. +# 0 = Simple +# 1 = Detailed +list_format = 0 + # Optional featured image (relative to `static/img/` folder). [header] image = "" caption = "" - +++ diff --git a/layouts/partials/talk_li_simple.html b/layouts/partials/talk_li_simple.html index f470f6a5..d05eb956 100644 --- a/layouts/partials/talk_li_simple.html +++ b/layouts/partials/talk_li_simple.html @@ -1,5 +1,5 @@ -
{{ .Date.Format $.Site.Params.date_format }}, @@ -9,4 +9,4 @@ {{ .Params.event | markdownify }} {{ end }}
- +{{ . | markdownify }}
{{ end }} - {{ if $page.Params.detailed_list }} {{ range first $page.Params.count (where $.Data.Pages "Type" "talk") }} - {{ partial "talk_li_detailed" . }} - {{ end }} - {{ else }} -{{ . | markdownify }}
{{ end }} - {{ if $page.Params.detailed_list }} {{ range (where (where $.Data.Pages "Type" "talk") ".Params.selected" true) }} - {{ partial "talk_li_detailed" . }} - {{ end }} - {{ else }} -{{ partial "talk_links" (dict "content" . "is_list" 1) }}
-