diff --git a/archetypes/publication/index.md b/archetypes/publication/index.md index a62376fd..750c07df 100644 --- a/archetypes/publication/index.md +++ b/archetypes/publication/index.md @@ -30,8 +30,9 @@ selected = false # Projects (optional). # Associate this publication with one or more of your projects. -# Simply enter your project's filename without extension. -# E.g. `projects = ["deep-learning"]` references `content/project/deep-learning.md`. +# Simply enter your project's folder or file name without extension. +# E.g. `projects = ["deep-learning"]` references +# `content/project/deep-learning/index.md`. # Otherwise, set `projects = []`. projects = [] diff --git a/archetypes/talk/index.md b/archetypes/talk/index.md index dc411108..64a5a5fb 100644 --- a/archetypes/talk/index.md +++ b/archetypes/talk/index.md @@ -27,8 +27,9 @@ selected = false # Projects (optional). # Associate this talk with one or more of your projects. -# Simply enter your project's filename without extension. -# E.g. `projects = ["deep-learning"]` references `content/project/deep-learning.md`. +# Simply enter your project's folder or file name without extension. +# E.g. `projects = ["deep-learning"]` references +# `content/project/deep-learning/index.md`. # Otherwise, set `projects = []`. projects = [] diff --git a/exampleSite/config.toml b/exampleSite/config.toml index fb96bbdb..99228c38 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -217,7 +217,14 @@ enableGitInfo = false # 1 = Detailed # 2 = APA # 3 = MLA - publication_format = 3 + # 4 = Stream + publication_format = 4 + + # Talk list format. + # 0 = Simple + # 1 = Detailed + # 2 = Stream + talk_format = 2 # Social/Academic Networking # diff --git a/exampleSite/content/publication/clothing-search/index.md b/exampleSite/content/publication/clothing-search/index.md index 0dff5207..8d3857b2 100644 --- a/exampleSite/content/publication/clothing-search/index.md +++ b/exampleSite/content/publication/clothing-search/index.md @@ -30,10 +30,11 @@ selected = true # Projects (optional). # Associate this publication with one or more of your projects. -# Simply enter your project's filename without extension. -# E.g. `projects = ["deep-learning"]` references `content/project/deep-learning.md`. +# Simply enter your project's folder or file name without extension. +# E.g. `projects = ["deep-learning"]` references +# `content/project/deep-learning/index.md`. # Otherwise, set `projects = []`. -projects = ["example-external-project"] +projects = ["internal-project"] # Tags (optional). # Set `tags = []` for no tags, or use the form `tags = ["A Tag", "Another Tag"]` for one or more tags. diff --git a/exampleSite/content/publication/person-re-id/index.md b/exampleSite/content/publication/person-re-id/index.md index 685892d0..6b5841f8 100644 --- a/exampleSite/content/publication/person-re-id/index.md +++ b/exampleSite/content/publication/person-re-id/index.md @@ -30,8 +30,9 @@ selected = false # Projects (optional). # Associate this publication with one or more of your projects. -# Simply enter your project's filename without extension. -# E.g. `projects = ["deep-learning"]` references `content/project/deep-learning.md`. +# Simply enter your project's folder or file name without extension. +# E.g. `projects = ["deep-learning"]` references +# `content/project/deep-learning/index.md`. # Otherwise, set `projects = []`. projects = [] diff --git a/exampleSite/content/talk/example/index.md b/exampleSite/content/talk/example/index.md index b24ec657..431646ee 100644 --- a/exampleSite/content/talk/example/index.md +++ b/exampleSite/content/talk/example/index.md @@ -27,10 +27,11 @@ selected = false # Projects (optional). # Associate this talk with one or more of your projects. -# Simply enter your project's filename without extension. -# E.g. `projects = ["deep-learning"]` references `content/project/deep-learning.md`. +# Simply enter your project's folder or file name without extension. +# E.g. `projects = ["deep-learning"]` references +# `content/project/deep-learning/index.md`. # Otherwise, set `projects = []`. -projects = ["deep-learning"] +projects = ["internal-project"] # Tags (optional). # Set `tags = []` for no tags, or use the form `tags = ["A Tag", "Another Tag"]` for one or more tags. diff --git a/layouts/project/single.html b/layouts/project/single.html index f30be6a7..9259ceea 100644 --- a/layouts/project/single.html +++ b/layouts/project/single.html @@ -17,8 +17,14 @@ {{ partial "tags.html" . }} {{ $page := . }} - {{ $project := .File.TranslationBaseName }} - {{ $project_path := printf "%s/%s/" .Section $project }} + {{ $project := .Slug }} + {{ if not $project }}{{/* If user did not explicitly set `slug` in front matter. */}} + {{ $project = .File.TranslationBaseName }} + {{ end }} + {{ if eq $project "index" }}{{/* Check if using dir-based page bundles. */}} + {{ $project = delimit (last 1 (split (substr .Dir 0 -1) "/")) "" }} + {{ end }} + {{ $project_path := .RelPermalink }} {{ if (.Site.Params.projects.list_children | default true) }} {{ $items := where (where .Site.RegularPages "Type" "publication") ".Params.projects" "intersect" (slice $project) }} @@ -33,6 +39,8 @@ {{ partial "publication_li_apa" . }} {{ else if eq $page.Site.Params.projects.publication_format 3 }} {{ partial "publication_li_mla" . }} + {{ else if eq $page.Site.Params.projects.publication_format 4 }} + {{ partial "publication_li_stream" . }} {{ else }} {{ partial "publication_li_simple" . }} {{ end }} @@ -45,7 +53,13 @@ {{ if ge $talks_len 1 }}

{{ (i18n "talks") }}

{{ range sort $items ".Params.time_start" "desc" }} - {{ partial "talk_li_simple" . }} + {{ if eq $page.Site.Params.projects.talk_format 1 }} + {{ partial "talk_li_detailed" . }} + {{ else if eq $page.Site.Params.projects.talk_format 2 }} + {{ partial "talk_li_stream" . }} + {{ else }} + {{ partial "talk_li_simple" . }} + {{ end }} {{ end }} {{ end }} {{ end }}