From 2220cd5d95c7abe95c5aa92322f632ed58b3ed6b Mon Sep 17 00:00:00 2001 From: George Cushen Date: Fri, 20 Jan 2017 00:57:16 +0000 Subject: [PATCH] Require Hugo v0.18 and support section nodes as pages * Post, Publication, and Talk nodes can now have a `_index.md` file with title and content. * Example `_index.md` content files added to Example Site. * Hugo v0.18+ required. --- exampleSite/content/post/_index.md | 3 +++ exampleSite/content/publication/_index.md | 3 +++ exampleSite/content/talk/_index.md | 3 +++ i18n/en.yaml | 11 ----------- layouts/section/post.html | 6 +++++- layouts/section/publication.html | 6 +++++- layouts/section/talk.html | 8 ++++++-- theme.toml | 2 +- 8 files changed, 26 insertions(+), 16 deletions(-) create mode 100644 exampleSite/content/post/_index.md create mode 100644 exampleSite/content/publication/_index.md create mode 100644 exampleSite/content/talk/_index.md diff --git a/exampleSite/content/post/_index.md b/exampleSite/content/post/_index.md new file mode 100644 index 00000000..c22710ff --- /dev/null +++ b/exampleSite/content/post/_index.md @@ -0,0 +1,3 @@ ++++ +title = "Posts" ++++ diff --git a/exampleSite/content/publication/_index.md b/exampleSite/content/publication/_index.md new file mode 100644 index 00000000..e16f0c27 --- /dev/null +++ b/exampleSite/content/publication/_index.md @@ -0,0 +1,3 @@ ++++ +title = "Publications" ++++ diff --git a/exampleSite/content/talk/_index.md b/exampleSite/content/talk/_index.md new file mode 100644 index 00000000..95869c27 --- /dev/null +++ b/exampleSite/content/talk/_index.md @@ -0,0 +1,3 @@ ++++ +title = "Recent & Upcoming Talks" ++++ diff --git a/i18n/en.yaml b/i18n/en.yaml index a9624e2c..80e206c0 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -87,14 +87,3 @@ - id: open_project_site translation: Go to Project Site - -# Section titles - -- id: posts - translation: Posts - -- id: publications - translation: Publications - -- id: talks - translation: Talks diff --git a/layouts/section/post.html b/layouts/section/post.html index a0785987..538f6f77 100644 --- a/layouts/section/post.html +++ b/layouts/section/post.html @@ -2,7 +2,11 @@ {{ partial "navbar.html" . }}
-

{{ i18n "posts" }}

+

{{ .Title | default "Posts" }}

+ + {{ with .Content }} +
{{ . }}
+ {{ end }} {{ $paginator := .Paginate .Data.Pages }} {{ range $paginator.Pages }} diff --git a/layouts/section/publication.html b/layouts/section/publication.html index ccdd9e2a..3352dfa7 100644 --- a/layouts/section/publication.html +++ b/layouts/section/publication.html @@ -3,7 +3,11 @@
-

{{ i18n "publications" }}

+

{{ .Title | default "Publications" }}

+ + {{ with .Content }} +
{{ . }}
+ {{ end }}

{{ i18n "filter_by_type" }}: diff --git a/layouts/section/talk.html b/layouts/section/talk.html index 0510181d..0a84d9bf 100644 --- a/layouts/section/talk.html +++ b/layouts/section/talk.html @@ -3,7 +3,11 @@

-

{{ i18n "talks" }}

+

{{ .Title | default "Talks" }}

+ + {{ with .Content }} +
{{ . }}
+ {{ end }} {{ range .Data.Pages.GroupByDate "2006" }}
@@ -15,7 +19,7 @@ {{ range .Pages.ByDate.Reverse }}
  • - {{ .Title }}

    {{ partial "talk_links" (dict "content" . "is_list" 1) }}

    diff --git a/theme.toml b/theme.toml index 7d08d9af..9f55e1d7 100644 --- a/theme.toml +++ b/theme.toml @@ -3,7 +3,7 @@ license = "MIT" licenselink = "https://github.com/gcushen/hugo-academic/blob/master/LICENSE.md" description = "Easily create beautifully simple academic or personal sites" homepage = "https://github.com/gcushen/hugo-academic" -min_version = 0.17 +min_version = 0.18 tags = ["academic", "portfolio", "responsive",