Compare commits

..

4 commits

Author SHA1 Message Date
Martin Wurm ca515bc67d bump version 2024-04-03 03:04:50 +02:00
Martin Wurm 58bac8562b disable the blog for now 2024-04-03 03:03:46 +02:00
Martin Wurm ca4c75168a make homepage build deterministic :') 2024-04-03 03:01:10 +02:00
Martin Wurm f3f0112088 remove dummy blog entry 2024-04-03 03:00:44 +02:00
5 changed files with 48 additions and 6 deletions

View file

@ -5,4 +5,5 @@ menu:
weight: 2 weight: 2
params: params:
icon: archives icon: archives
draft: true
--- ---

View file

@ -1,5 +0,0 @@
---
title: Hello World
description: Shits happening
---
yeeeeeee

View file

@ -27,7 +27,7 @@ with pkgs; let
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "mart-w.de-${version}"; name = "mart-w.de-${version}";
version = "1.0.0"; version = "1.0.1";
src = ./.; src = ./.;

46
layouts/index.html Normal file
View file

@ -0,0 +1,46 @@
{{ define "body-class" }}
article-page
{{/*
Enable the right sidebar if
- Widget different from 'TOC' is enabled
- TOC is enabled and not empty
*/}}
{{- $HasWidgetNotTOC := false -}}
{{- $TOCWidgetEnabled := false -}}
{{- range .Site.Params.widgets.page -}}
{{- if ne .type "toc" -}}
{{ $HasWidgetNotTOC = true -}}
{{- else -}}
{{ $TOCWidgetEnabled = true -}}
{{- end -}}
{{- end -}}
{{- $TOCManuallyDisabled := eq .Params.toc false -}}
{{- $TOCEnabled := and (not $TOCManuallyDisabled) $TOCWidgetEnabled -}}
{{- $hasTOC := ge (len .TableOfContents) 100 -}}
{{- .Scratch.Set "TOCEnabled" (and $TOCEnabled $hasTOC) -}}
{{- .Scratch.Set "hasWidget" (or $HasWidgetNotTOC (and $TOCEnabled $hasTOC)) -}}
{{ end }}
{{ define "main" }}
{{ partial "article/article.html" . }}
{{ if .Params.links }}
{{ partial "article/components/links" . }}
{{ end }}
{{ partial "article/components/related-content" . }}
{{ if not (eq .Params.comments false) }}
{{ partial "comments/include" . }}
{{ end }}
{{ partialCached "footer/footer" . }}
{{ partialCached "article/components/photoswipe" . }}
{{ end }}
{{ define "right-sidebar" }}
{{ if .Scratch.Get "hasWidget" }}{{ partial "sidebar/right.html" (dict "Context" . "Scope" "page") }}{{ end}}
{{ end }}