diff --git a/config.yaml b/config.yaml index 95fa85e..2ca9237 100644 --- a/config.yaml +++ b/config.yaml @@ -36,87 +36,6 @@ params: enabled: false default: Licensed under CC BY-NC-SA 4.0 - comments: - enabled: false - provider: disqus - - disqusjs: - shortname: - apiUrl: - apiKey: - admin: - adminLabel: - - utterances: - repo: - issueTerm: pathname - label: - - beaudar: - repo: - issueTerm: pathname - label: - theme: - - remark42: - host: - site: - locale: - - vssue: - platform: - owner: - repo: - clientId: - clientSecret: - autoCreateIssue: false - - # Waline client configuration see: https://waline.js.org/en/reference/client/props.html - waline: - serverURL: - lang: - visitor: - avatar: - emoji: - - https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo - requiredMeta: - - nick - - mail - locale: - admin: Admin - placeholder: - - twikoo: - envId: - region: - path: - lang: - - giscus: - repo: - repoID: - category: - categoryID: - mapping: - strict: - lightTheme: - darkTheme: - reactionsEnabled: 1 - emitMetadata: 0 - inputPosition: - lang: - - gitalk: - owner: - admin: - repo: - clientID: - clientSecret: - - cusdis: - host: - id: - widgets: homepage: [] # - type: categories diff --git a/layouts/categories/list.html b/layouts/categories/list.html new file mode 100644 index 0000000..2d55f51 --- /dev/null +++ b/layouts/categories/list.html @@ -0,0 +1,93 @@ +{{ define "main" }} +
+
+
+

{{ .Title }}

+

{{ T "list.page" (len .Pages) }}

+ {{ with .Params.description }} +

{{ . }}

+ {{ end }} +
+ + {{- $image := partialCached "helper/image" (dict "Context" . "Type" "section") .RelPermalink "section" -}} + {{ if $image.exists }} +
+ {{ if $image.resource }} + {{- $Permalink := $image.resource.RelPermalink -}} + {{- $Width := $image.resource.Width -}} + {{- $Height := $image.resource.Height -}} + + {{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}} + {{- $thumbnail := $image.resource.Fill "120x120" -}} + {{- $Permalink = $thumbnail.RelPermalink -}} + {{- $Width = $thumbnail.Width -}} + {{- $Height = $thumbnail.Height -}} + {{- end -}} + + + {{ else }} + + {{ end }} +
+ {{ end }} +
+
+ + {{- $subsections := .Sections -}} + {{- $pages := where .Pages "Section" "post" | complement $subsections -}} + + + {{- if eq (len $pages) 0 -}} + {{/* If there are no normal pages, display subsections in list style, with pagination */}} + {{/* This happens with taxonomies like categories or tags */}} + {{- $pages = $subsections -}} + + {{- $subsections = slice -}} + {{- end -}} + + {{- with $subsections -}} + + {{- end -}} + + + {{ $pages := where .Pages "Section" "pinned-post" }} + {{ $pages = $pages.ByTitle }} +
+ {{ range $pages.ByTitle }} + {{ partial "article/article" . }} + {{ end }} + + + + + + {{/* List only pages that are not a subsection */}} + {{ $pages := where .Pages "Section" "post" }} + {{ $pages = $pages.ByTitle }} + +
+ {{ range $pages.ByTitle }} + {{ partial "article-list/compact" . }} + {{ end }} +
+ + {{- partial "pagination.html" . -}} + + {{ partialCached "footer/footer" . }} +{{ end }} + +{{ define "right-sidebar" }} + {{ partial "sidebar/right.html" (dict "Context" . "Scope" "homepage") }} +{{ end }} \ No newline at end of file