From 400c937e57dd99b1ae47ddff27b547936987475d Mon Sep 17 00:00:00 2001 From: BlueFox Date: Tue, 8 Apr 2025 18:16:55 +0200 Subject: [PATCH] Improved reading speed values (made them more realistic); for this, a new (partially) ai-generated article has been added --- content/posts/one-word.de.md | 4 +- content/posts/one-word.en.md | 2 +- content/posts/random-story.de.md | 21 ++ content/posts/random-story.en.md | 20 ++ hugo.toml | 4 +- layouts/_default/single.html | 4 +- public/de/about/index.html | 2 +- public/de/index.html | 31 ++- public/de/index.xml | 31 ++- public/de/posts/index.html | 30 ++- public/de/posts/index.xml | 31 ++- public/de/posts/one-word/index.html | 17 +- public/de/posts/random-story/index.html | 299 ++++++++++++++++++++++++ public/de/posts/test-post/index.html | 4 +- public/de/sitemap.xml | 67 +++--- public/en/about/index.html | 2 +- public/en/index.html | 31 ++- public/en/index.xml | 29 ++- public/en/posts/index.html | 30 ++- public/en/posts/index.xml | 29 ++- public/en/posts/one-word/index.html | 15 +- public/en/posts/random-story/index.html | 299 ++++++++++++++++++++++++ public/en/posts/test-post/index.html | 4 +- public/en/sitemap.xml | 25 +- public/sitemap.xml | 4 +- 25 files changed, 965 insertions(+), 70 deletions(-) create mode 100644 content/posts/random-story.de.md create mode 100644 content/posts/random-story.en.md create mode 100644 public/de/posts/random-story/index.html create mode 100644 public/en/posts/random-story/index.html diff --git a/content/posts/one-word.de.md b/content/posts/one-word.de.md index 5237866..a6efb48 100644 --- a/content/posts/one-word.de.md +++ b/content/posts/one-word.de.md @@ -1,6 +1,6 @@ +++ -title = 'Deutscher Test Post' -date = 2025-04-05T20:14:29+02:00 +title = 'Ein Wort!' +date = 2025-04-05T22:48:12+02:00 draft = false toc = false +++ diff --git a/content/posts/one-word.en.md b/content/posts/one-word.en.md index b90f556..67188ad 100644 --- a/content/posts/one-word.en.md +++ b/content/posts/one-word.en.md @@ -1,5 +1,5 @@ +++ -title = 'English Test Post' +title = 'One Word!' date = 2025-04-05T22:48:12+02:00 draft = false toc = false diff --git a/content/posts/random-story.de.md b/content/posts/random-story.de.md new file mode 100644 index 0000000..32ce88d --- /dev/null +++ b/content/posts/random-story.de.md @@ -0,0 +1,21 @@ ++++ +title = 'Eine beliebige Geschichte' +date = 2025-04-08T17:55:25+02:00 +toc = true +description = "Kleine Geschichte von ChatGPT, um die Lesezeiten einzustellen" +draft = false ++++ + + +Dies ist eine beliebige Story, die von ChatGPT zum Testen und Einstellen der Lesezeit auf diesem Blog generiert wurde. + +## Prompt + +Erzähle eine Geschichte mit ca. 200 Wörtern. + +## Antwort + +Es war einmal in einem kleinen Dorf, umgeben von dichten Wäldern und sanften Hügeln. Dort lebte ein neugieriger Junge namens Leo, der von Abenteuern träumte. Eines Tages entdeckte er beim Spielen am Fluss einen geheimnisvollen, glitzernden Stein. Als er ihn aufhob, begann der Stein zu leuchten und eine sanfte Stimme flüsterte: „Folge dem Licht, und du wirst das Unbekannte entdecken.“ +Neugierig und aufgeregt folgte Leo dem strahlenden Licht, das ihn tief in den Wald führte. Nach einer Weile erreichte er eine versteckte Lichtung, auf der ein wunderschöner, schimmernder Baum stand. Die Blätter funkelten wie Diamanten, und in der Mitte des Baumes hockte ein kleiner, freundlicher Drache namens Fuego. +Fuego erzählte Leo von einem magischen Reich, das nur durch Mut und Freundschaft betreten werden konnte. Gemeinsam erlebten sie aufregende Abenteuer, kämpften gegen Schattenwesen und halfen den Waldbewohnern. Leo lernte, dass wahre Stärke im Herzen liegt und dass Freundschaft die größte Magie von allen ist. +Als Leo schließlich nach Hause zurückkehrte, wusste er, dass er nie wieder der gleiche Junge sein würde. Der glitzernde Stein blieb bei ihm, ein ständiger Erinnerungsanker an seine unvergesslichen Abenteuer. diff --git a/content/posts/random-story.en.md b/content/posts/random-story.en.md new file mode 100644 index 0000000..26ce469 --- /dev/null +++ b/content/posts/random-story.en.md @@ -0,0 +1,20 @@ ++++ +title = 'A random story' +date = 2025-04-08T17:55:25+02:00 +toc = true +description = "Random story by ChatGPT to test out the perfect reading speed value" +draft = false ++++ + +This is just a random story, generated by ChatGPT, used to test the reading speed and adjust it to a comfortable value. + +## German prompt + +Tell a story with around 200 words. + +## Answer, translated to english + +Once upon a time, in a small village surrounded by dense forests and gentle hills, there lived a curious boy named Leo, who dreamed of adventures. One day, while playing by the river, he discovered a mysterious, glittering stone. As he picked it up, the stone began to glow, and a gentle voice whispered, “Follow the light, and you will discover the unknown.” +Curious and excited, Leo followed the shining light, which led him deep into the woods. After a while, he reached a hidden clearing where a beautiful, shimmering tree stood. Its leaves sparkled like diamonds, and in the center of the tree sat a small, friendly dragon named Fuego. +Fuego told Leo about a magical realm that could only be entered through courage and friendship. Together, they experienced thrilling adventures, fought against shadow creatures, and helped the forest inhabitants. Leo learned that true strength lies in the heart and that friendship is the greatest magic of all. +When Leo finally returned home, he knew he would never be the same boy again. The glittering stone remained with him, a constant reminder of his unforgettable adventures. diff --git a/hugo.toml b/hugo.toml index ea3d611..9cf43a3 100644 --- a/hugo.toml +++ b/hugo.toml @@ -48,7 +48,7 @@ pagination.pagerSize = 5 # oneHeadingSize = true # default # whether to show a page's estimated reading time - readingTime = true # (default: false) + showReadingTime = true # (default: false) # whether to show a table of contents # can be overridden in a page's front-matter @@ -74,6 +74,7 @@ pagination.pagerSize = 5 languageName = "English" weight = 1 [languages.en.params] + readingSpeed = 108 subtitle = "Blog of privacynerd" owner = "" keywords = "" @@ -129,6 +130,7 @@ pagination.pagerSize = 5 languageName = "Deutsch" weight = 2 [languages.de.params] + readingSpeed = 111 subtitle = "Blog von privacynerd" owner = "" keywords = "" diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 739bca5..c896524 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -15,8 +15,8 @@ {{- with .Params.Author -}} {{ . }} {{- end -}} - {{- if and (.Param "readingTime") (eq (.Param "readingTime") true) -}} - {{ .ReadingTime }} {{ if eq .ReadingTime 1 }}{{ $.Site.Params._minute | default "minute" }}{{ else }}{{ $.Site.Params._minutes | default "minutes" }}{{ end }} {{$.Site.Params._readingTime | default "to read" }} ({{ .WordCount }} {{ if eq .WordCount 1 }}{{ $.Site.Params._word | default "word" }}{{ else }}{{ $.Site.Params._words | default "words" }}{{ end }}) + {{- if and (.Param "ShowReadingTime") (eq (.Param "ShowReadingTime") true) -}}{{ $customReadingTime := div (float .WordCount) .Site.Params.readingSpeed }}{{ $customReadingTime = math.Ceil $customReadingTime }}{{ $customReadingTime }} {{ if eq $customReadingTime 1 }}{{ $.Site.Params._minute | default "minute" }}{{ else }}{{ $.Site.Params._minutes | default "minutes" }}{{ end }} {{$.Site.Params._readingTime | default "to read" }} ({{ .WordCount }} {{ if eq .WordCount 1 }}{{ $.Site.Params._word | default "word" }}{{ else }}{{ $.Site.Params._words | default "words" }}{{ end }}) {{- end -}} {{ partial "comments_counter.html" . }} diff --git a/public/de/about/index.html b/public/de/about/index.html index e04ea7d..472cc86 100644 --- a/public/de/about/index.html +++ b/public/de/about/index.html @@ -199,7 +199,7 @@ Below you can read the original about from Radek

Über

-
1 Minute Lesezeit (190 Wörter) + diff --git a/public/de/index.html b/public/de/index.html index ad9473c..2c2f75d 100644 --- a/public/de/index.html +++ b/public/de/index.html @@ -204,7 +204,36 @@ + +
+

+ Ein Wort!