diff --git a/archetypes/post/index.md b/archetypes/post/index.md index a981655c..98ae9829 100644 --- a/archetypes/post/index.md +++ b/archetypes/post/index.md @@ -11,6 +11,14 @@ authors = [] tags = [] categories = [] +# Projects (optional). +# Associate this post with one or more of your projects. +# 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 = ["internal-project"] + # Featured image # To use, add an image named `featured.jpg/png` to your page's folder. [image] diff --git a/exampleSite/config.toml b/exampleSite/config.toml index e818a779..bc60c145 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -212,6 +212,12 @@ enableGitInfo = false # List publications and talks related to the project? list_children = true + # Post list format. + # 0 = Simple + # 1 = Detailed + # 2 = Stream + post_format = 2 + # Publication list format. # 0 = Simple # 1 = Detailed diff --git a/exampleSite/content/post/getting-started/index.md b/exampleSite/content/post/getting-started/index.md index 4047aa40..58f184ae 100644 --- a/exampleSite/content/post/getting-started/index.md +++ b/exampleSite/content/post/getting-started/index.md @@ -12,6 +12,14 @@ authors = [] tags = ["Academic"] summary = "Create a beautifully simple website or blog in under 10 minutes." +# Projects (optional). +# Associate this post with one or more of your projects. +# 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 = ["internal-project"] + # Featured image # To use, add an image named `featured.jpg/png` to your project's folder. [image] diff --git a/layouts/partials/page_metadata.html b/layouts/partials/page_metadata.html index 884ed99e..effc7237 100644 --- a/layouts/partials/page_metadata.html +++ b/layouts/partials/page_metadata.html @@ -45,7 +45,7 @@ {{ end}} - {{ if isset $.Params "categories" }} + {{ if $.Params.categories }} {{ $categoriesLen := len $.Params.categories }} {{ if gt $categoriesLen 0 }} diff --git a/layouts/partials/post_li_detailed.html b/layouts/partials/post_li_detailed.html index bf8dd070..c9455386 100644 --- a/layouts/partials/post_li_detailed.html +++ b/layouts/partials/post_li_detailed.html @@ -1,4 +1,4 @@ -{{ $post := .post }} +{{ $post := . }}