mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-14 08:17:37 +00:00
projects: Fix new folder-based projects breaking talk/publication links
This commit is contained in:
1 parent
0b343e4599
commit
5e223515a2
7 files changed
+42
-16
No files matched your search
@@ -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 = []
|
||||
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
|
||||
@@ -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
|
||||
#
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 }}
|
||||
<h2>{{ (i18n "talks") }}</h2>
|
||||
{{ 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 }}
|
||||
|
||||
Reference in new issue
Block a user