From 42e847ac25fb98ca1f942d5cc99031d6911182e8 Mon Sep 17 00:00:00 2001 From: Christian Mahnke Date: Tue, 20 Apr 2021 18:45:59 +0200 Subject: [PATCH] Updated submodules --- .atomignore | 1 + blogs/backsteinexpressionismus | 2 +- blogs/blaufusstoelpel | 2 +- blogs/kinderbuecher | 2 +- blogs/labs.projektemacher.org | 2 +- blogs/schriftmuster | 2 +- blogs/vorsatzpapier | 2 +- config.toml | 4 +- content/archive/_index.en.md | 1 + content/archive/_index.md | 1 + content/blog/_index.en.html | 1 + content/blog/_index.html | 3 +- layouts/_default/archive.html | 197 +++++++++++++++++++++++++++++ layouts/_default/baseof.html | 20 +-- layouts/_default/portfolio.html | 82 ++++++++++++ layouts/shortcodes/post-count.html | 7 +- scripts/git-checkout.sh | 10 +- themes/projektemacher-base | 2 +- 18 files changed, 303 insertions(+), 38 deletions(-) create mode 100644 .atomignore create mode 100644 layouts/_default/archive.html create mode 100644 layouts/_default/portfolio.html diff --git a/.atomignore b/.atomignore new file mode 100644 index 00000000000..3c3629e647f --- /dev/null +++ b/.atomignore @@ -0,0 +1 @@ +node_modules diff --git a/blogs/backsteinexpressionismus b/blogs/backsteinexpressionismus index a2719ac393d..4c74223d238 160000 --- a/blogs/backsteinexpressionismus +++ b/blogs/backsteinexpressionismus @@ -1 +1 @@ -Subproject commit a2719ac393d3566e422e240f390d49c827d3833a +Subproject commit 4c74223d238b23ac87dfc7054e52508d517c3488 diff --git a/blogs/blaufusstoelpel b/blogs/blaufusstoelpel index b6d020d6c1d..a9d6b1a2a57 160000 --- a/blogs/blaufusstoelpel +++ b/blogs/blaufusstoelpel @@ -1 +1 @@ -Subproject commit b6d020d6c1d13731f60b38f98980009c49d0b6b0 +Subproject commit a9d6b1a2a5722ade7784228209333d7f5a8e8d20 diff --git a/blogs/kinderbuecher b/blogs/kinderbuecher index b297c5c4e44..f9044400792 160000 --- a/blogs/kinderbuecher +++ b/blogs/kinderbuecher @@ -1 +1 @@ -Subproject commit b297c5c4e445753843b2de7dc52eb01fbbc9586c +Subproject commit f9044400792f856edafeaf195d66683d126438f8 diff --git a/blogs/labs.projektemacher.org b/blogs/labs.projektemacher.org index d5a7fdd3d98..c959ee18610 160000 --- a/blogs/labs.projektemacher.org +++ b/blogs/labs.projektemacher.org @@ -1 +1 @@ -Subproject commit d5a7fdd3d98b64739573191a49c292bb4939e213 +Subproject commit c959ee18610c234ab0a0a51f82881bbd9d62ec0f diff --git a/blogs/schriftmuster b/blogs/schriftmuster index 4ad660a5049..a95e4d9ef79 160000 --- a/blogs/schriftmuster +++ b/blogs/schriftmuster @@ -1 +1 @@ -Subproject commit 4ad660a504900d5bc44f3abe5c18363457e14055 +Subproject commit a95e4d9ef79b9f6724ce61cc4967a9a35e38111e diff --git a/blogs/vorsatzpapier b/blogs/vorsatzpapier index 827710d5f00..cd2de53f081 160000 --- a/blogs/vorsatzpapier +++ b/blogs/vorsatzpapier @@ -1 +1 @@ -Subproject commit 827710d5f007b032997b417a404adb3097428656 +Subproject commit cd2de53f081455ae946008678d7760ab789935d2 diff --git a/config.toml b/config.toml index 69558ff4761..e6cb6220515 100644 --- a/config.toml +++ b/config.toml @@ -178,14 +178,14 @@ defaultcontentlanguage = "de" suffixes = ["geojson", "gjson"] [outputFormats] - [outputFormats.GEOJSON] + [outputFormats.geojson] mediaType = "application/json" isPlainText = true isHTML = false baseName = "map" notAlternative = true - [outputFormats.IIIF] + [outputFormats.iiif] mediaType = "application/json" isPlainText = true isHTML = false diff --git a/content/archive/_index.en.md b/content/archive/_index.en.md index 39c54078e39..3163e001340 100644 --- a/content/archive/_index.en.md +++ b/content/archive/_index.en.md @@ -2,5 +2,6 @@ title: Archive displayinlist: false metaPage: true +layout: archive --- This page chronologically lists all contributions from the Projektemacher.org blogs. diff --git a/content/archive/_index.md b/content/archive/_index.md index 7e035272dd8..3f2885a0d52 100644 --- a/content/archive/_index.md +++ b/content/archive/_index.md @@ -2,5 +2,6 @@ title: Archiv displayinlist: false metaPage: true +layout: archive --- Diese Seite listet chronologisch alle Beiträge der Projektemacher.org Blogs. diff --git a/content/blog/_index.en.html b/content/blog/_index.en.html index 41e0365a953..109c3fb8739 100644 --- a/content/blog/_index.en.html +++ b/content/blog/_index.en.html @@ -1,5 +1,6 @@ --- url: blogs title: Blogs +layout: portfolio --- External links will open in a new window. The flags indicate the languages ​​available, the ribbons the status of the blog. diff --git a/content/blog/_index.html b/content/blog/_index.html index e5f38217410..a432e6751cd 100644 --- a/content/blog/_index.html +++ b/content/blog/_index.html @@ -1,5 +1,6 @@ --- url: blogs title: Blogs +layout: portfolio --- -Externe Links werden in einem neuen Fenster geöffnet. Die Flaggen kennzeichnen die verfügbaren Sprachen, die Bändchen den Status des Blogs. +Externe Links werden in einem neuen Fenster geöffnet. Die Flaggen kennzeichnen die verfügbaren Sprachen, die Bändchen den Status des Blogs. diff --git a/layouts/_default/archive.html b/layouts/_default/archive.html new file mode 100644 index 00000000000..dd15386f2e6 --- /dev/null +++ b/layouts/_default/archive.html @@ -0,0 +1,197 @@ +{{ define "title" }} + {{- if eq .Kind "term" -}} + {{- i18n .Data.Singular | title -}} + {{- print ": " -}} + {{- end -}} + + {{- .Title }} · {{ .Site.Title -}} +{{ end }} +{{ define "content" }} +
+
+
+
+

+ {{- if eq .Kind "term" -}} + {{- i18n .Data.Singular | title -}} + {{- print ": " -}} + {{- end -}} + + {{- .Title -}} +

+
+
{{ .Content }}
+ +
+

{{ i18n "filter" }}

+
+ {{- $pages := where .Data.Pages "Section" "blog" -}} + {{- $pages = ($pages | lang.Merge (where .Sites.First.RegularPages "Section" "blog") ) -}} + {{- $pages = where $pages "Params.status" "ne" "planned" }} + {{- range $pages -}} + {{- $dir := split (string (path.Dir .Path)) "/" -}} + {{- $prefix := index $dir 1 -}} +
+ + {{ .Title }} +
+ {{- end -}} + +
+
+
+
+ {{- $pages := where .Site.Pages "Section" "post" -}} + + {{- .Scratch.Set "pages" $pages -}} + {{- $mainSite := .Sites.First -}} + {{- if ne $mainSite .Site -}} + {{- .Scratch.Set "pages" ($pages | lang.Merge (where $mainSite.Pages "Section" "post") ) -}} + {{- end -}} + {{- $pages = (.Scratch.Get "pages").Reverse -}} + {{/* Filter non post pages */}} + {{- $pages = where $pages "Params.displayinlist" "!=" false -}} + {{- $pages = where $pages "Params.displayInList" "!=" false -}} + {{- $pages = where $pages "Params.metaPage" "!=" true -}} + {{- $pages = where $pages "Date.IsZero" "==" false -}} + + {{- $firstYear := (index (first 1 $pages) 0).Date.Year -}} + {{- $lastYear := (index (last 1 $pages) 0).Date.Year -}} + {{- if eq $firstYear 1 -}} + {{ warnf "%s" (index (first 1 $pages) 0) -}} + {{- warnf "Building archive for years %d to %d" $firstYear $lastYear -}} + {{- end -}} + + {{- range (seq $firstYear $lastYear) -}} + {{ $year := . }} + {{- if len (where $pages ".Date.Year" "==" $year) -}} + +
    + {{- $yearPages := where $pages ".Date.Year" "==" . -}} + {{- range (seq 1 12 ) -}} + {{- $month := . -}} + {{- if len (where $yearPages ".Date.Month" "==" $month) -}} +
  • +
      + {{- $monthName := "" -}} + {{ if eq "de" $.Site.Language.Lang }} + {{ $monthName = (index $.Site.Data.months (printf "%d" $month)) }} + {{- else -}} + {{- $monthName = (dateFormat "January" (printf "2001-%02d-01" $month)) -}} + {{- end -}} + + {{ $monthName }} + {{- range (where $yearPages ".Date.Month" "==" $month) -}} + + {{- $dir := split (string (path.Dir .Path)) "/" -}} + + {{- $displayName := "" -}} + {{- $postLink := "" -}} + {{- $linkPrefix := "" -}} + {{- $prefix := index $dir 1 -}} + {{- $sectionHeading := printf "/%s" (delimit (slice "blog" $prefix) "/") -}} + {{- $blogPage := .Site.GetPage $sectionHeading -}} + {{- $displayName = printf "%s: " $blogPage.Title -}} + {{- if ($blogPage.Param "linkPrefix") -}} + {{ $linkPrefix = $blogPage.Param "linkPrefix" -}} + {{- else -}} + {{ $linkPrefix = $blogPage.Param "link" -}} + {{- end -}} + {{- $postLink = split (string .Path) "/" -}} + + {{- if eq (len $dir) 2 -}} + {{- $postLink = last (sub (len $postLink) 0) $postLink -}} + {{ else }} + {{- $postLink = last (sub (len $postLink) 2) $postLink -}} + {{- end -}} + {{- $postLink = delimit $postLink "/" -}} + {{- $postLink = replaceRE "^(.*/)\\w*\\..*$" "$1" $postLink -}} + {{- $postLink = printf "%s%s" $linkPrefix $postLink -}} + + {{- $openExternal := true -}} + + + {{ end }} +
    +
  • + {{end }} + {{ end }} +
+ {{- end -}} + {{- end -}} +
+
+
+
+ +{{ end }} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 1a7dd51bf06..72becaa7797 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -4,7 +4,6 @@ - {{- if and (eq .Kind "page") (eq .Section "blog") -}} {{- if and (.Params.link) (.Params.private) -}} @@ -12,21 +11,10 @@ {{- end -}} {{- end -}} - {{ with .Site.Params.author }}{{ end }} - - - - {{- if hasPrefix .Page.Name "404" -}} - - {{- end -}} + {{ partial "html/head/meta.html" . }} {{- template "_internal/opengraph.html" . -}} -{{/* - {{- if .Permalink -}} - - {{- end -}} -*/}} {{ block "title" . }}{{ .Site.Title }}{{ end }} {{- if .Permalink -}} @@ -107,12 +95,6 @@ {{ partial "footer.html" . }} - {{ template "_internal/google_analytics.html" . }} - - {{ if and .Site.Params.fathomAnalytics .Site.Params.fathomAnalytics.siteID }} - {{- partial "analytics/fathom" . -}} - {{ end }} - diff --git a/layouts/_default/portfolio.html b/layouts/_default/portfolio.html new file mode 100644 index 00000000000..94a2a9555aa --- /dev/null +++ b/layouts/_default/portfolio.html @@ -0,0 +1,82 @@ +{{ define "title" }} + {{- if eq .Kind "term" -}} + {{- i18n .Data.Singular | title -}} + {{- print ": " -}} + {{- end -}} + + {{- .Title }} · {{ .Site.Title -}} +{{ end }} +{{ define "content" }} +
+
+
+
+

{{ .Title }}

+
+ +
+ {{ .Content }} +
+
+
+
+{{ end }} diff --git a/layouts/shortcodes/post-count.html b/layouts/shortcodes/post-count.html index abe83d349a9..5cedd65fbc9 100644 --- a/layouts/shortcodes/post-count.html +++ b/layouts/shortcodes/post-count.html @@ -1,6 +1 @@ -{{- $section := .Get "section" -}} -{{- $type := .Get "type" -}} - -{{- $hangers := (where (where .Site.Pages "Section" $section) "Params.type" $type).Reverse -}} - -{{- len $hangers -}} +{{/* This file is just a place holder, to avoid problems with mounted content from the 'blogs' directory */}} diff --git a/scripts/git-checkout.sh b/scripts/git-checkout.sh index c4cef7117a9..3dafc239bdf 100755 --- a/scripts/git-checkout.sh +++ b/scripts/git-checkout.sh @@ -1,9 +1,7 @@ #!/bin/bash SECTIONS=$(git config --file .gitmodules -l --name-only |sed -E 's/^[^\0][^\.]*\.([^\0]*)\.[^\0][^\.]*$/\1/g') - SECTIONS=`echo $SECTIONS | tr '\n' ':'` - CTX=`pwd` for SECTION in $SECTIONS @@ -16,9 +14,15 @@ do MODULE_PATH=$(git config --file .gitmodules --get "submodule.$SECTION.path") MODULE_URL=$(git config --file .gitmodules --get "submodule.$SECTION.url") + MODULE_REF=$(git submodule status $SECTION|sed -E 's/[-+ ]{1}((.|\n|\r){40})(.|\n|\r)*/\1/g') + mkdir -p $MODULE_PATH cd $MODULE_PATH echo "Checking out $MODULE_URL to $MODULE_PATH" - git clone $URL --filter=blob:limit=1m --depth 1 $MODULE_URL . + # See https://github.blog/2020-01-17-bring-your-monorepo-down-to-size-with-sparse-checkout/ + git clone $URL --sparse --filter=blob:none --no-checkout $MODULE_URL . + git sparse-checkout init --cone + git sparse-checkout set '!/* post/**/*.md' + git checkout $MODULE_REF cd $CTX done diff --git a/themes/projektemacher-base b/themes/projektemacher-base index 26ad4b8f897..5bb290f50b4 160000 --- a/themes/projektemacher-base +++ b/themes/projektemacher-base @@ -1 +1 @@ -Subproject commit 26ad4b8f897ea04c21e3c4114fbfc908e26abea5 +Subproject commit 5bb290f50b473cb7d730285f04c1320ba8ef9de3