{{ i18n "archive" }}
+ {{ with .Site.GetPage "/archive" }} +{{ .Title }}
+ {{ end }}-
- {{ $dontRender := (slice "page" "quote" "link" "status") }}
+ {{ $dontRender := (slice "page" "quote" "link" "status" "archive") }}
{{ range (first (.Site.Params.amountLatestPostsInFooter | default 7) (where (where .Site.Pages.ByPublishDate.Reverse ".Kind" "page") ".Type" "not in" $dontRender )) }}
-
{{ .Title }}
@@ -19,7 +19,7 @@
{{ if and .Site.Taxonomies.categories (gt ( .Site.Params.amountCategoriesInFooter | default 7 ) 0 ) }}
{{ with .Site.GetPage "/categories" }} - {{ .Title }} + {{ i18n "categories" }} {{ end }}
-
@@ -38,7 +38,6 @@
{{ if .Site.Params.showSocialMedia | default true }}
{{ i18n "socialMedia" }} - {{ range .Site.Params.socialMediaLinks }} {{ end }} @@ -62,7 +61,7 @@ {{ if .Site.Params.showArchive | default true }}{{ with .Site.GetPage "/archive" }} - {{ .Title }} + {{ i18n "archive" }} {{ end }}{{ end }} diff --git a/testing/testing-example-site/config.toml b/testing/testing-example-site/config.toml index 40753d06a..5a497ab40 100644 --- a/testing/testing-example-site/config.toml +++ b/testing/testing-example-site/config.toml @@ -119,6 +119,12 @@ disqusShortname = "bilberry-hugo-theme" { link = "https://github.com/Lednerb", icon = "fab fa-github" }, ] + # show an archive link in the footer + showArchive = true + + # archive grouping: "2006" by year, "2006-01" by month + archiveDateGrouping = "2006-01" + # credits line configuration copyrightBy = "by Lednerb" copyrightUseCurrentYear = false # set to true to always display the current year in the copyright diff --git a/testing/testing-example-site/content/archive.de.md b/testing/testing-example-site/content/archive.de.md new file mode 100644 index 000000000..f47320892 --- /dev/null +++ b/testing/testing-example-site/content/archive.de.md @@ -0,0 +1,5 @@ +--- +title: "Archivseite" +type: archive +excludeFromIndex: true +--- diff --git a/testing/testing-example-site/content/archive.md b/testing/testing-example-site/content/archive.md new file mode 100644 index 000000000..4e3531029 --- /dev/null +++ b/testing/testing-example-site/content/archive.md @@ -0,0 +1,5 @@ +--- +title: "Archive Page" +type: archive +excludeFromIndex: true +--- diff --git a/testing/testing-example-site/test-theme.sh b/testing/testing-example-site/test-theme.sh index 3accf2162..0c7a5e675 100755 --- a/testing/testing-example-site/test-theme.sh +++ b/testing/testing-example-site/test-theme.sh @@ -86,6 +86,9 @@ testFolderAndContinue "$TARGET_DIR/de/tags/c++" testFolderAndContinue "$TARGET_DIR/tags/tästing++" testFolderAndContinue "$TARGET_DIR/de/tags/tästing++" +testFolderAndContinue "$TARGET_DIR/archive" +testFolderAndContinue "$TARGET_DIR/de/archive" + # article/täst [en] echo "## Testing article/täst [en]" testContentAndContinue 'Täst++' "$TARGET_DIR/article/täst/index.html" @@ -96,7 +99,7 @@ testContentAndContinue 'de testContentAndContinue 'Umlauts Täst++' "$TARGET_DIR/article/täst/index.html" testContentAndContinue 'This is a umlauts-test in Quotes äüöß++
' "$TARGET_DIR/quote/index.html" testContentAndContinue 'Täst++ (2)' "$TARGET_DIR/article/täst/index.html" - +testContentAndContinue 'Archive' "$TARGET_DIR/article/täst/index.html" # article/täst [de] echo "## Testing article/täst [de]" testContentAndContinue 'Täst++' "$TARGET_DIR/de/article/täst/index.html" @@ -107,6 +110,7 @@ testContentAndContinue 'en' testContentAndContinue 'de Umlauts Täst++' "$TARGET_DIR/de/article/täst/index.html" testContentAndContinue 'de This is a umlauts-test in quotes äüöß++
' "$TARGET_DIR/de/quote/index.html" testContentAndContinue 'Täst++ (2)' "$TARGET_DIR/de/article/täst/index.html" +testContentAndContinue 'Archiv' "$TARGET_DIR/de/article/täst/index.html" # quote/täst-quote [en] echo "## Testing quote/täst-quote [en]" @@ -120,6 +124,29 @@ testContentAndContinue ' ä ß+ ' "$TARGET_DIR/de/quote/täst-quote/index.html" +# archive [en] +echo "## Testing archive [en]" +testContentAndContinue '' "$TARGET_DIR/archive/index.html" +testContentAndContinue 'Archive Page
' "$TARGET_DIR/archive/index.html" +testContentAndContinue '2020-05
' "$TARGET_DIR/archive/index.html" +testContentAndContinue 'long text (2020-05-15)' "$TARGET_DIR/archive/index.html" +testContentAndContinue '2020-04
' "$TARGET_DIR/archive/index.html" +testContentAndContinue 'long text 1 (2020-04-15)' "$TARGET_DIR/archive/index.html" +testContentAndContinue '2020-03
' "$TARGET_DIR/archive/index.html" +testContentAndContinue 'long text manual readmore (2020-03-15)' "$TARGET_DIR/archive/index.html" +testContentAndContinue '2020-02
' "$TARGET_DIR/archive/index.html" +testContentAndContinue 'long text (2020-02-15)' "$TARGET_DIR/archive/index.html" +testContentAndContinue '2020-01
' "$TARGET_DIR/archive/index.html" +testContentAndContinue 'Umlauts Täst++ (2020-01-15)' "$TARGET_DIR/archive/index.html" +testContentAndContinue 'Quote Umlauts Täst++ (2020-01-14)' "$TARGET_DIR/archive/index.html" + +# archive [de] +echo "## Testing archive [de]" +testContentAndContinue '' "$TARGET_DIR/de/archive/index.html" +testContentAndContinue 'Archivseite
' "$TARGET_DIR/de/archive/index.html" +testContentAndContinue '2020-01
' "$TARGET_DIR/de/archive/index.html" +testContentAndContinue 'de Umlauts Täst++ (2020-01-15)' "$TARGET_DIR/de/archive/index.html" +testContentAndContinue 'de Quote Umlauts Täst++ (2020-01-14)' "$TARGET_DIR/de/archive/index.html" echo "# Build stability test"