From b96c31000872b2d7a144f71f39d7c2b8d04e6b6e Mon Sep 17 00:00:00 2001 From: zzossig Date: Wed, 1 Jan 2020 14:23:11 +0900 Subject: [PATCH] add support upcoming talks --- README.ko.md | 2 ++ README.md | 2 ++ exampleSite/config/_default/config.toml | 1 + exampleSite/config/_default/params.toml | 2 ++ layouts/archive/list.html | 2 +- layouts/talks/list.html | 4 ++-- 6 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.ko.md b/README.ko.md index ad4b3ff..c5f207b 100644 --- a/README.ko.md +++ b/README.ko.md @@ -116,6 +116,7 @@ defaultContentLanguageInSubdir = true # baseURL/en/, baseURL/kr/ ... hasCJKLanguage = true # Set `true` for Chinese/Japanese/Korean languages. summaryLength = 70 # The length of a post description on a list page. +buildFuture = true # if true, we can use future date for talks page copyright = "©{year}, All Rights Reserved" # copyright symbol: $copy; current year: {year} timeout = 10000 @@ -514,6 +515,7 @@ root/content/talks/myLinks.md --- title: "My Awesome links" date: 2019-12-31T00:04:50+09:00 +publishDate: 2222-12-31 description: tags: - diff --git a/README.md b/README.md index 54beeeb..50323e7 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,7 @@ defaultContentLanguageInSubdir = true # baseURL/en/, baseURL/kr/ ... hasCJKLanguage = true # Set `true` for Chinese/Japanese/Korean languages. summaryLength = 70 # The length of a post description on a list page. +buildFuture = true # if true, we can use future date for talks page copyright = "©{year}, All Rights Reserved" # copyright symbol: $copy; current year: {year} timeout = 10000 @@ -508,6 +509,7 @@ root/content/talks/myLinks.md --- title: "My Awesome links" date: 2019-12-31T00:04:50+09:00 +publishDate: 2222-12-31 description: tags: - diff --git a/exampleSite/config/_default/config.toml b/exampleSite/config/_default/config.toml index 553aaee..b5f7c14 100644 --- a/exampleSite/config/_default/config.toml +++ b/exampleSite/config/_default/config.toml @@ -7,6 +7,7 @@ defaultContentLanguageInSubdir = true hasCJKLanguage = true summaryLength = 70 +buildFuture = false copyright = "©{year}, All Rights Reserved" timeout = 10000 diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 76de98b..44ed2b7 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -16,6 +16,7 @@ summaryShape = "classic" # card, classic, compact archiveGroupByDate = "2006" # "2006-01": group by month, "2006": group by year archivePaginate = 13 paginateWindow = 1 +talksGroupByDate = "2006" # whoami myname = "zzossig" @@ -33,6 +34,7 @@ enableSidebarTags = true enableSidebarSeries = true enableSidebarCategories = true enableToc = true +hideToc = false enableTocSwitch = true itemsPerCategory = 5 diff --git a/layouts/archive/list.html b/layouts/archive/list.html index e355ea5..eab6c30 100644 --- a/layouts/archive/list.html +++ b/layouts/archive/list.html @@ -11,7 +11,7 @@
{{ $pages := (where .Site.RegularPages "Section" "!=" "talks") }} - {{ $paginator := .Paginate ($pages.GroupByDate (.Site.Params.talksGroupByDate | default "2006")) .Site.Params.archivePaginate }} + {{ $paginator := .Paginate ($pages.GroupByDate (.Site.Params.archiveGroupByDate | default "2006")) .Site.Params.archivePaginate }} {{ range ($paginator).PageGroups }} {{ .Key }} diff --git a/layouts/talks/list.html b/layouts/talks/list.html index a0d7541..b9234ee 100644 --- a/layouts/talks/list.html +++ b/layouts/talks/list.html @@ -11,7 +11,7 @@
{{ $pages := (where .Site.RegularPages "Section" "talks") }} - {{ $paginator := .Paginate ($pages.GroupByDate (.Site.Params.archiveGroupByDate | default "2006")) .Site.Params.archivePaginate }} + {{ $paginator := .Paginate ($pages.GroupByPublishDate (.Site.Params.talksGroupByDate | default "2006")) .Site.Params.archivePaginate }} {{ range ($paginator).PageGroups }} {{ .Key }} @@ -19,7 +19,7 @@ {{ range .Pages }}
  • - {{ .Date.Format (i18n "talks-dateformat") }} + {{ .PublishDate.Format (i18n "talks-dateformat") }}