From 0b8aed6be5ff5c2d0ccbe88b3a386af9a16233f5 Mon Sep 17 00:00:00 2001 From: Stephan Hadan Date: Tue, 28 Jan 2025 23:38:42 +0100 Subject: [PATCH 01/59] eliminated characters --- layouts/partials/site_header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/site_header.html b/layouts/partials/site_header.html index 27a212a..3c23ae0 100644 --- a/layouts/partials/site_header.html +++ b/layouts/partials/site_header.html @@ -13,7 +13,7 @@ {{ if .Param "feature" }}{{ end }} - + {{ end }} {{ hugo.Generator }} From 9e627007a4c8126aa74272a67d00ae71f7d5c289 Mon Sep 17 00:00:00 2001 From: "stephan.hadan" Date: Tue, 28 Jan 2025 23:58:34 +0100 Subject: [PATCH 02/59] Update LICENSE.md with enhancement copyright --- LICENSE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/LICENSE.md b/LICENSE.md index a463681..b791041 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,7 @@ The MIT License (MIT) Copyright (c) 2016 Josh Johnson +Enhancements: Copyright (c) 2025 Stephan Hadan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in From 031670726261335d1c9e85fd361b0d097e817db6 Mon Sep 17 00:00:00 2001 From: "stephan.hadan" Date: Wed, 29 Jan 2025 00:11:53 +0100 Subject: [PATCH 03/59] Renewed copyright notice, changed config.toml to hugo.toml, changed LICENSE-Link --- README.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index e92d250..75af441 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ The theme features a customizable bio-section and flickr-based photo stream in it's footer, unique layouts for displaying all posts sorted by year, and support for partials to customize style and javascript loaded. -To see more, [check out my blog which is rendered with this theme](http://jnjosh.com) and see it's [configuration on Github](https://github.com/jnjosh/jnjosh.com). +To see more, [check out my blog which is rendered with this theme](https://reaktionsfaehig.net) and see it's [configuration on my Forgejo instance](https://git.hadan-it.com/web/reaktionsfaehig.net). ![internet-weblog showing a Micropost.](https://git.hadan-it.com/stiebke/hugo-internet-weblog/raw/branch/main/images/screenshot.png) @@ -32,14 +32,13 @@ To see more, [check out my blog which is rendered with this theme](http://jnjosh Inside the folder of your Hugo site run: $ mkdir themes - $ cd themes - $ git clone https://github.com/jnjosh/internet-weblog.git + $ git submodule add https://git.hadan-it.com/web/reaktionsfaehig.net.git themes/internet-weblog -For more information read the official [setup guide](//gohugo.io/overview/installing/) for Hugo. +For more information read the official [setup guide](https://gohugo.io/installation/) for Hugo. ## Getting Started -There are a few concepts this theme employs to make a personal blog. It's important to read this as you may not see what you expect upon launching. Since this theme is built to be a personal blog it opts for some simplifications like using the ["Section Menu for the Lazy Blogger"](https://gohugo.io/extras/menus/#section-menu-for-the-lazy-blogger) option in Hugo for displaying a simple menu. It assumes you want to call your blog posts `posts` and organizes them as such. For example, creating a new post (or micropost, or photopost) with Hugo would require you typing: +There are a few concepts this theme employs to make a personal blog. It's important to read this as you may not see what you expect upon launching. Since this theme is built to be a personal blog it opts for some simplifications like using the ["Section Menu for the Lazy Blogger"](https://gohugo.io/content-management/menus/#section-menu-for-the-lazy-blogger) option in Hugo for displaying a simple menu. It assumes you want to call your blog posts `posts` and organizes them as such. For example, creating a new post (or micropost, or photopost) with Hugo would require you typing: ``` $ hugo new posts/my-new-post.md @@ -63,7 +62,7 @@ The theme works with other content types, but posts work best when grouped under #### How to configure the menu in the blog's navigation -As mentioned above, this theme takes a simplistic approach to menus. In fact, it doesn't really support custom menus opting to just use Hugo's `main` menu. Because it uses the ["Section Menu for the Lazy Blogger"](https://gohugo.io/extras/menus/#section-menu-for-the-lazy-blogger) you'll need to make one change to your `config.toml` file. Add **main** as the `SectionPagesMenu`. +As mentioned above, this theme takes a simplistic approach to menus. In fact, it doesn't really support custom menus opting to just use Hugo's `main` menu. Because it uses the ["Section Menu for the Lazy Blogger"](https://gohugo.io/content-management/menus/#section-menu-for-the-lazy-blogger) you'll need to make one change to your `hugo.toml` file. Add **main** as the `SectionPagesMenu`. ``` SectionPagesMenu = "main" @@ -71,14 +70,14 @@ SectionPagesMenu = "main" Because of this, your individual posts don't need to organize themselves into menu groupings. Everything is assumed to be grouped at the top level. One exception to this is if you want to add a custom page to the root of the menu. In this case you would want to add `menu: main` to your page's Front Matter. -You can control which menu items get an RSS icon and link by adding the `RSSSections` list to your Params section of your `config.toml`: +You can control which menu items get an RSS icon and link by adding the `RSSSections` list to your Params section of your `hugo.toml`: ``` [params] RSSSections = [ "Posts", "Microposts", "Photos" ] ``` -You can then control the name and weight of these menus in your `config.toml` by adding a section for each menu item you'd like to display: +You can then control the name and weight of these menus in your `hugo.toml` by adding a section for each menu item you'd like to display: ``` [[menu.main]] @@ -88,16 +87,16 @@ You can then control the name and weight of these menus in your `config.toml` by url = "/posts/" ``` -If you aren't sure of how this should look, see how [jnjosh.com uses this in it's config.toml](https://github.com/jnjosh/jnjosh.com/blob/main/config.toml). +If you aren't sure of how this should look, see how [reaktionsfaehig.net uses this in it's hugo.toml](https://git.hadan-it.com/web/reaktionsfaehig.net/src/branch/main/hugo.toml). -**Recommendation:** Add `SectionPagesMenu` to your `config.toml` file. +**Recommendation:** Add `SectionPagesMenu` to your `hugo.toml` file. **Recommendation:** Don't set a `menu` in your post's Front Matter unless you want it to display on the navigation. -**Recommendation:** Customize the menus that get an RSS icon by adding the `RSSSections` parameter to your `config.toml` file. -**Recommendation:** Configure the menu items by adding `menu.main` sections to your `config.toml` file. +**Recommendation:** Customize the menus that get an RSS icon by adding the `RSSSections` parameter to your `hugo.toml` file. +**Recommendation:** Configure the menu items by adding `menu.main` sections to your `hugo.toml` file. #### Defining yourself as the Author -It looks like most themes use the `author` variable to add something simple like your name. This theme uses more structured data about you and requires an `[params.author]` section. The details of what is affected by each property is defined below in the variables section, but you should add this section to your `config.toml`: +It looks like most themes use the `author` variable to add something simple like your name. This theme uses more structured data about you and requires an `[params.author]` section. The details of what is affected by each property is defined below in the variables section, but you should add this section to your `hugo.toml`: ``` [params.author] @@ -109,7 +108,7 @@ It looks like most themes use the `author` variable to add something simple like FlickrID = "" ``` -**Recommendation:** Don't use the `author` variable, use the above `[params.author]` section in your `config.toml`. +**Recommendation:** Don't use the `author` variable, use the above `[params.author]` section in your `hugo.toml`. #### Customizing the Bio Section, 404 page, javascript, or stylesheets @@ -141,7 +140,7 @@ feature: "assets/posts/20240219/image.jpg" #### Preferred Dark Appearance -If you want to enable a dark appearance, there is limited support for that. Currently, setting the `EnablePreferredDarkAppearance` param to true in your config.toml file will enable it in an automatic state—if the system is using dark mode. +If you want to enable a dark appearance, there is limited support for that. Currently, setting the `EnablePreferredDarkAppearance` param to true in your `hugo.toml` file will enable it in an automatic state—if the system is using dark mode. ### Variables @@ -165,7 +164,7 @@ If you want to enable a dark appearance, there is limited support for that. Curr | `[params]` - `YearlyMicroposts` | `true` or `false` | No. If true, Microposts will have a page with a yearly grouping just like the posts. If not present or false, the default of not having a micropost yearly grouping is applied. | | `[params]` - `SummarizeMicroposts` | `true` or `false` | No. If true, Microposts will be summarized in the main list just like posts with a continue reading link. If not present or false, the default of not summarizing microposts is applied. | -Here is an example `config.toml`: +Here is an example `hugo.toml`: ``` baseurl = "http://mysite.com/" @@ -240,13 +239,14 @@ This theme makes use of the following 3rd Party Libraries. ## License -This theme is released under MIT. For more information, please see the [License](http://jnjosh.mit-license.org). +This theme is released under MIT. For more information, please see the [License](https://git.hadan-it.com/stiebke/hugo-internet-weblog/src/branch/main/LICENSE.md). ## Contact This is the first theme I've made for Hugo, so I'm sure I've done some things wrong or assumed too much. If you have ideas or things that should be fixed, please let me know. - [Josh Johnson](http://jnjosh.com) [@jnjosh](https://mastodon.social/@jnjosh) +- Enhancements: [Stephan Hadan](https://stephan.hadan.de) [@stiebke](https://freiburg.social/@stiebke) --- From 7379768252c316372ac857723547b2164ad04a14 Mon Sep 17 00:00:00 2001 From: "stephan.hadan" Date: Wed, 29 Jan 2025 00:20:52 +0100 Subject: [PATCH 04/59] Changed filetype for license --- LICENSE.md => LICENSE | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename LICENSE.md => LICENSE (100%) diff --git a/LICENSE.md b/LICENSE similarity index 100% rename from LICENSE.md rename to LICENSE From 817a49850c5a70f4b9d98be1ba68930474d70e84 Mon Sep 17 00:00:00 2001 From: "stephan.hadan" Date: Wed, 29 Jan 2025 00:21:44 +0100 Subject: [PATCH 05/59] Fixed license link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 75af441..8042993 100644 --- a/README.md +++ b/README.md @@ -239,7 +239,7 @@ This theme makes use of the following 3rd Party Libraries. ## License -This theme is released under MIT. For more information, please see the [License](https://git.hadan-it.com/stiebke/hugo-internet-weblog/src/branch/main/LICENSE.md). +This theme is released under MIT. For more information, please see the [License](https://git.hadan-it.com/stiebke/hugo-internet-weblog/src/branch/main/LICENSE). ## Contact From 8e13216a1dd01fa273c7ec464a68ecbdc94201e0 Mon Sep 17 00:00:00 2001 From: Stephan Hadan Date: Wed, 29 Jan 2025 08:44:27 +0100 Subject: [PATCH 06/59] * added parametrized umami-integration * eliminated google analytics * added umami-integration to README.md --- README.md | 8 ++++++++ layouts/partials/site_footer.html | 1 - layouts/partials/site_header.html | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 916ed2c..a893c33 100644 --- a/README.md +++ b/README.md @@ -166,6 +166,10 @@ If you want to enable a dark appearance, there is limited support for that. Curr | `[params]` - `RSSMicropostTitles` | `true` or `false` | No. If false, Microposts RSS feeds will not have the title in included posts. If not present or true, nothing happens. | | `[params]` - `YearlyMicroposts` | `true` or `false` | No. If true, Microposts will have a page with a yearly grouping just like the posts. If not present or false, the default of not having a micropost yearly grouping is applied. | | `[params]` - `SummarizeMicroposts` | `true` or `false` | No. If true, Microposts will be summarized in the main list just like posts with a continue reading link. If not present or false, the default of not summarizing microposts is applied. | +| `[params]`- `umamienabled` | `true` or `false` | No. If true and the the following umami-parameters are set, activate umami website analytics. | +| `[params]`- `umamiurl` | `Your Umami-URL`| No. i.e. `https://analytics.example.com/`. Please add the trailing slash at the end. | +| `[params]`- `umamisrihash` | `SRI hash` | No. Generate your SRI hash for your complete Umami-URL (incl. script.js). You can do this here: [https://www.srihash.org/](https://www.srihash.org/). | +| `[params]`- `umamiid` | `Umami Website ID` | No. Add Your Umami-Website ID to this variable | Here is an example `hugo.toml`: @@ -190,6 +194,10 @@ SectionPagesMenu = "main" ShowCopyright = true RSSEnabled = true RSSSections = [ "Posts", "Microposts", "Photos" ] + umamienabled = true + umamiurl = "https://analytics.example.com" + umamisrihash = "xyz" + umamiid = "xxxxxxxxxxxxxxxxxxx-yyyyyyyyyy-zzzzzzzzzzzzz" [taxonomies] tag = "tags" diff --git a/layouts/partials/site_footer.html b/layouts/partials/site_footer.html index 370c2e0..ef497ea 100644 --- a/layouts/partials/site_footer.html +++ b/layouts/partials/site_footer.html @@ -3,6 +3,5 @@ {{ partial "custom_javascript.html" . }} {{ partial "custom_image_handler.html" . }} - {{ template "_internal/google_analytics.html" . }} diff --git a/layouts/partials/site_header.html b/layouts/partials/site_header.html index 7cd3cca..b6b3b58 100644 --- a/layouts/partials/site_header.html +++ b/layouts/partials/site_header.html @@ -39,6 +39,8 @@ {{ if .Site.Params.rssenabled }} {{ end }} - + {{ if .Site.Params.umamienabled }} + + {{ end }} From e9f068487f1d8c7dee4a4104714b69990eaf1eb9 Mon Sep 17 00:00:00 2001 From: "stephan.hadan" Date: Wed, 29 Jan 2025 09:34:18 +0100 Subject: [PATCH 07/59] Changed wrong url for installation of theme --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a893c33..87e56c8 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,8 @@ To see more, [check out my blog which is rendered with this theme](https://reakt Inside the folder of your Hugo site run: $ mkdir themes - $ git submodule add https://git.hadan-it.com/web/reaktionsfaehig.net.git themes/internet-weblog + $ git submodule add https://git.hadan-it.com/stiebke/hugo-internet-weblog.git themes/internet-weblog + $ echo "theme = 'internet-weblog'" >> hugo.toml For more information read the official [setup guide](https://gohugo.io/installation/) for Hugo. From b03825ded46470f88762c93e36ce0c42aa0390be Mon Sep 17 00:00:00 2001 From: "stephan.hadan" Date: Wed, 29 Jan 2025 10:12:44 +0100 Subject: [PATCH 08/59] Fixed missing "s" in layouts/partials/bio.html --- layouts/partials/bio.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/bio.html b/layouts/partials/bio.html index 775884c..a8a06b3 100644 --- a/layouts/partials/bio.html +++ b/layouts/partials/bio.html @@ -1,2 +1,2 @@ Here you can place a short bio about yourself. Place a `bio.html` file in your -project directory under `layout/partials`. That will override this message. +project directory under `layouts/partials`. That will override this message. From 78bac1a4a5fbbfa0a4d06bc942d247e9f2b86ac6 Mon Sep 17 00:00:00 2001 From: "stephan.hadan" Date: Wed, 29 Jan 2025 10:17:27 +0100 Subject: [PATCH 09/59] Fixed missing ! in page_footer.html --- layouts/partials/page_footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/page_footer.html b/layouts/partials/page_footer.html index 3b96ecc..e2d076b 100644 --- a/layouts/partials/page_footer.html +++ b/layouts/partials/page_footer.html @@ -1,7 +1,7 @@