From aef5dfba684f61f3817a2a40104bad8dab7daa0b Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Thu, 14 Nov 2024 06:24:05 -0500 Subject: [PATCH 01/20] build: add static web server config --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 8d55407..b52fda9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,4 +31,6 @@ RUN python -m mkdocs build --strict --site-dir /site # production FROM joseluisq/static-web-server:2.33.1 +COPY deploy/sws.toml /config.toml + COPY --from=build /site /public From 1f180b080818c9fa258bda5eb06f91495957586d Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Sat, 16 Nov 2024 11:37:07 -0500 Subject: [PATCH 02/20] bring back macos category --- .../mac-os-airport-not-connecting-automatically-to-wi-fi.md | 4 ++-- .../2013/modifying-the-new-child-sub-menu-items-in-emf.md | 2 ++ docs/blog/posts/2013/reducing-file-size-of-a-pdf-on-mac-os.md | 4 ++-- docs/blog/posts/2017/airdrop-on-macos-working-unreliably.md | 4 ++-- mkdocs.yml | 1 + 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/blog/posts/2011/mac-os-airport-not-connecting-automatically-to-wi-fi.md b/docs/blog/posts/2011/mac-os-airport-not-connecting-automatically-to-wi-fi.md index 8cf8272..ede652d 100644 --- a/docs/blog/posts/2011/mac-os-airport-not-connecting-automatically-to-wi-fi.md +++ b/docs/blog/posts/2011/mac-os-airport-not-connecting-automatically-to-wi-fi.md @@ -3,8 +3,8 @@ migrated: true date: created: 2011-03-30 updated: 2011-03-30 -# categories: -# - macOS +categories: + - Mac OS slug: mac-os-airport-not-connecting-automatically-to-wi-fi --- # Mac OS: Airport not connecting automatically to Wi-Fi diff --git a/docs/blog/posts/2013/modifying-the-new-child-sub-menu-items-in-emf.md b/docs/blog/posts/2013/modifying-the-new-child-sub-menu-items-in-emf.md index 0ac9783..8dd20ee 100644 --- a/docs/blog/posts/2013/modifying-the-new-child-sub-menu-items-in-emf.md +++ b/docs/blog/posts/2013/modifying-the-new-child-sub-menu-items-in-emf.md @@ -22,6 +22,8 @@ The default case is implemented in `ItemProviderAdapter`. There seem to be two approaches, depending on what your goal is. + + ## General Approach If you want to change the text independent from the element, meaning for all elements, you should change the `_UI_CreateChild_text` key in `plugin.properties`. diff --git a/docs/blog/posts/2013/reducing-file-size-of-a-pdf-on-mac-os.md b/docs/blog/posts/2013/reducing-file-size-of-a-pdf-on-mac-os.md index 6592e9b..07ca788 100644 --- a/docs/blog/posts/2013/reducing-file-size-of-a-pdf-on-mac-os.md +++ b/docs/blog/posts/2013/reducing-file-size-of-a-pdf-on-mac-os.md @@ -3,9 +3,9 @@ migrated: true date: created: 2013-04-25 updated: 2017-12-12 -# categories: +categories: # - Howto -# - Mac OS + - Mac OS slug: reducing-file-size-of-a-pdf-on-mac-os --- # Reducing file size of a PDF on Mac OS diff --git a/docs/blog/posts/2017/airdrop-on-macos-working-unreliably.md b/docs/blog/posts/2017/airdrop-on-macos-working-unreliably.md index 1335ebf..26495ce 100644 --- a/docs/blog/posts/2017/airdrop-on-macos-working-unreliably.md +++ b/docs/blog/posts/2017/airdrop-on-macos-working-unreliably.md @@ -3,8 +3,8 @@ migrated: true date: created: 2017-12-08 updated: 2017-12-08 -# categories: -# - Mac OS +categories: + - Mac OS slug: airdrop-on-macos-working-unreliably --- # AirDrop on macOS working unreliably diff --git a/mkdocs.yml b/mkdocs.yml index 06ec3e1..2d59295 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -91,6 +91,7 @@ plugins: - Git - iOS - Linux + - Mac OS - Projects - Self-hosting - Thunderbird From 47f88aa826016bf54348e56ff07d9c6591054544 Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Sat, 16 Nov 2024 11:38:46 -0500 Subject: [PATCH 03/20] add SWS config with redirects --- deploy/sws.toml | 127 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 deploy/sws.toml diff --git a/deploy/sws.toml b/deploy/sws.toml new file mode 100644 index 0000000..59b94b6 --- /dev/null +++ b/deploy/sws.toml @@ -0,0 +1,127 @@ +[advanced] + +### URL Redirects + +# publications to research index +[[advanced.redirects]] +source = "/research/publications" +destination = "/research/" +kind = 301 + +# old legal notice +[[advanced.redirects]] +source = "/legal-notice" +destination = "/imprint/" +kind = 301 + +# old privacy policy +[[advanced.redirects]] +source = "/privacy-policy-2" +destination = "/privacy-policy/" +kind = 301 + +# image uploads +[[advanced.redirects]] +source = "/wp-content/*/*/*/{*}.jpg" +destination = "/assets/images/$1.jpg" +kind = 301 + +# video uploads +[[advanced.redirects]] +source = "/wp-content/*/*/*/{*}.{mp4,mov}" +destination = "/assets/videos/$1.$2" +kind = 301 + +# papers +[[advanced.redirects]] +source = "/wp-content/papercite-data/pdf/{*}.pdf" +destination = "/assets/papers/$1.pdf" +kind = 301 + +# blog posts +[[advanced.redirects]] +source = "/{*}/{*}/{*}/{*}" +destination = "/blog/$1/$2/$3/$4" +kind = 301 + +# blog archive: month not accessible anymore +[[advanced.redirects]] +source = "/{*}/{*}/" +destination = "/blog/archive/$1/" +kind = 301 + +# blog categories that don't exist anymore +[[advanced.redirects]] +source = "/category/{uncategorized,frameworks,hints,howto,office,tweaks,windows}/" +destination = "/blog/archive/" +kind = 301 + +[[advanced.redirects]] +source = "/category/java/" +destination = "/blog/category/eclipse-modeling-framework-emf/" +kind = 301 + +[[advanced.redirects]] +source = "/category/frameworks/struts/" +destination = "/blog/archive/" +kind = 301 + +[[advanced.redirects]] +source = "/category/windows/windows-7/" +destination = "/blog/archive/" +kind = 301 + +[[advanced.redirects]] +source = "/category/distributed-version-control/" +destination = "/blog/category/git/" +kind = 301 + +# blog categories that exist but under a different structure +[[advanced.redirects]] +source = "/category/frameworks/django/" +destination = "/blog/category/django/" +kind = 301 + +[[advanced.redirects]] +source = "/category/distributed-version-control/git/" +destination = "/blog/category/git/" +kind = 301 + +[[advanced.redirects]] +source = "/category/frameworks/emf/" +destination = "/blog/category/eclipse-modeling-framework-emf/" +kind = 301 + +[[advanced.redirects]] +source = "/category/{raspberry-pi,nextcloud}/" +destination = "/blog/category/self-hosting/" +kind = 301 + +# categories that still exist +[[advanced.redirects]] +source = "/category/{*}/" +destination = "/blog/category/$1/" +kind = 301 + +# old blog categories +[[advanced.redirects]] +source = "/category/{*}/" +destination = "/blog/category/$1/" +kind = 301 + +# portfolio pages +[[advanced.redirects]] +source = "/wp-portfolio/{*}/" +destination = "/projects/#{$1}" +kind = 301 + +# portfolio categories +[[advanced.redirects]] +source = "/portfolio-category/development/" +destination = "/projects/#software-engineering" +kind = 301 + +[[advanced.redirects]] +source = "/portfolio-category/{*}/" +destination = "/projects/" +kind = 301 From 09da9d5fcb30b3538d0de0a16e63b4254d202fe2 Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Sat, 16 Nov 2024 11:44:58 -0500 Subject: [PATCH 04/20] fix infinite redirects --- deploy/sws.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/sws.toml b/deploy/sws.toml index 59b94b6..72bbfaa 100644 --- a/deploy/sws.toml +++ b/deploy/sws.toml @@ -45,10 +45,10 @@ destination = "/blog/$1/$2/$3/$4" kind = 301 # blog archive: month not accessible anymore -[[advanced.redirects]] -source = "/{*}/{*}/" -destination = "/blog/archive/$1/" -kind = 301 +# [[advanced.redirects]] +# source = "/{*}/{*}/" +# destination = "/blog/archive/$1/" +# kind = 301 # blog categories that don't exist anymore [[advanced.redirects]] From 30dc8f434ee8d0872f28f93ff754860eda2467e0 Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Sun, 17 Nov 2024 08:30:43 -0500 Subject: [PATCH 05/20] test redirect with hostname --- deploy/sws.toml | 54 ++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/deploy/sws.toml b/deploy/sws.toml index 72bbfaa..2c1e506 100644 --- a/deploy/sws.toml +++ b/deploy/sws.toml @@ -4,124 +4,124 @@ # publications to research index [[advanced.redirects]] -source = "/research/publications" +source = "https://matthias.schoettle.me/research/publications/" destination = "/research/" kind = 301 # old legal notice [[advanced.redirects]] -source = "/legal-notice" +source = "https://matthias.schoettle.me/legal-notice/" destination = "/imprint/" kind = 301 # old privacy policy [[advanced.redirects]] -source = "/privacy-policy-2" +source = "https://matthias.schoettle.me/privacy-policy-2/" destination = "/privacy-policy/" kind = 301 # image uploads [[advanced.redirects]] -source = "/wp-content/*/*/*/{*}.jpg" +source = "https://matthias.schoettle.me/wp-content/*/*/*/{*}.jpg" destination = "/assets/images/$1.jpg" kind = 301 # video uploads [[advanced.redirects]] -source = "/wp-content/*/*/*/{*}.{mp4,mov}" +source = "https://matthias.schoettle.me/wp-content/*/*/*/{*}.{mp4,mov}" destination = "/assets/videos/$1.$2" kind = 301 # papers [[advanced.redirects]] -source = "/wp-content/papercite-data/pdf/{*}.pdf" +source = "https://matthias.schoettle.me/wp-content/papercite-data/pdf/{*}.pdf" destination = "/assets/papers/$1.pdf" kind = 301 # blog posts [[advanced.redirects]] -source = "/{*}/{*}/{*}/{*}" +source = "https://matthias.schoettle.me/{*}/{*}/{*}/{*}/" destination = "/blog/$1/$2/$3/$4" kind = 301 -# blog archive: month not accessible anymore -# [[advanced.redirects]] -# source = "/{*}/{*}/" -# destination = "/blog/archive/$1/" -# kind = 301 - # blog categories that don't exist anymore [[advanced.redirects]] -source = "/category/{uncategorized,frameworks,hints,howto,office,tweaks,windows}/" +source = "https://matthias.schoettle.me/category/{uncategorized,frameworks,hints,howto,office,tweaks,windows}/" destination = "/blog/archive/" kind = 301 [[advanced.redirects]] -source = "/category/java/" +source = "https://matthias.schoettle.me/category/java/" destination = "/blog/category/eclipse-modeling-framework-emf/" kind = 301 [[advanced.redirects]] -source = "/category/frameworks/struts/" +source = "https://matthias.schoettle.me/category/frameworks/struts/" destination = "/blog/archive/" kind = 301 [[advanced.redirects]] -source = "/category/windows/windows-7/" +source = "https://matthias.schoettle.me/category/windows/windows-7/" destination = "/blog/archive/" kind = 301 [[advanced.redirects]] -source = "/category/distributed-version-control/" +source = "https://matthias.schoettle.me/category/distributed-version-control/" destination = "/blog/category/git/" kind = 301 # blog categories that exist but under a different structure [[advanced.redirects]] -source = "/category/frameworks/django/" +source = "https://matthias.schoettle.me/category/frameworks/django/" destination = "/blog/category/django/" kind = 301 [[advanced.redirects]] -source = "/category/distributed-version-control/git/" +source = "https://matthias.schoettle.me/category/distributed-version-control/git/" destination = "/blog/category/git/" kind = 301 [[advanced.redirects]] -source = "/category/frameworks/emf/" +source = "https://matthias.schoettle.me/category/frameworks/emf/" destination = "/blog/category/eclipse-modeling-framework-emf/" kind = 301 [[advanced.redirects]] -source = "/category/{raspberry-pi,nextcloud}/" +source = "https://matthias.schoettle.me/category/{raspberry-pi,nextcloud}/" destination = "/blog/category/self-hosting/" kind = 301 # categories that still exist [[advanced.redirects]] -source = "/category/{*}/" +source = "https://matthias.schoettle.me/category/{*}/" destination = "/blog/category/$1/" kind = 301 # old blog categories [[advanced.redirects]] -source = "/category/{*}/" +source = "https://matthias.schoettle.me/category/{*}/" destination = "/blog/category/$1/" kind = 301 # portfolio pages [[advanced.redirects]] -source = "/wp-portfolio/{*}/" +source = "https://matthias.schoettle.me/wp-portfolio/{*}/" destination = "/projects/#{$1}" kind = 301 # portfolio categories [[advanced.redirects]] -source = "/portfolio-category/development/" +source = "https://matthias.schoettle.me/portfolio-category/development/" destination = "/projects/#software-engineering" kind = 301 [[advanced.redirects]] -source = "/portfolio-category/{*}/" +source = "https://matthias.schoettle.me/portfolio-category/{*}/" destination = "/projects/" kind = 301 + +# blog archive: month not accessible anymore +[[advanced.redirects]] +source = "https://matthias.schoettle.me/{*}/{*}/" +destination = "/blog/archive/$1/" +kind = 301 From cbef23d532d5b5f86817557174c6d981e7f9529e Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Mon, 18 Nov 2024 05:38:20 -0500 Subject: [PATCH 06/20] revert --- deploy/sws.toml | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/deploy/sws.toml b/deploy/sws.toml index 2c1e506..aee74a7 100644 --- a/deploy/sws.toml +++ b/deploy/sws.toml @@ -4,124 +4,124 @@ # publications to research index [[advanced.redirects]] -source = "https://matthias.schoettle.me/research/publications/" +source = "/research/publications/" destination = "/research/" kind = 301 # old legal notice [[advanced.redirects]] -source = "https://matthias.schoettle.me/legal-notice/" +source = "/legal-notice/" destination = "/imprint/" kind = 301 # old privacy policy [[advanced.redirects]] -source = "https://matthias.schoettle.me/privacy-policy-2/" +source = "/privacy-policy-2/" destination = "/privacy-policy/" kind = 301 # image uploads [[advanced.redirects]] -source = "https://matthias.schoettle.me/wp-content/*/*/*/{*}.jpg" +source = "/wp-content/*/*/*/{*}.jpg" destination = "/assets/images/$1.jpg" kind = 301 # video uploads [[advanced.redirects]] -source = "https://matthias.schoettle.me/wp-content/*/*/*/{*}.{mp4,mov}" +source = "/wp-content/*/*/*/{*}.{mp4,mov}" destination = "/assets/videos/$1.$2" kind = 301 # papers [[advanced.redirects]] -source = "https://matthias.schoettle.me/wp-content/papercite-data/pdf/{*}.pdf" +source = "/wp-content/papercite-data/pdf/{*}.pdf" destination = "/assets/papers/$1.pdf" kind = 301 # blog posts [[advanced.redirects]] -source = "https://matthias.schoettle.me/{*}/{*}/{*}/{*}/" +source = "/{*}/{*}/{*}/{*}/" destination = "/blog/$1/$2/$3/$4" kind = 301 # blog categories that don't exist anymore [[advanced.redirects]] -source = "https://matthias.schoettle.me/category/{uncategorized,frameworks,hints,howto,office,tweaks,windows}/" +source = "/category/{uncategorized,frameworks,hints,howto,office,tweaks,windows}/" destination = "/blog/archive/" kind = 301 [[advanced.redirects]] -source = "https://matthias.schoettle.me/category/java/" +source = "/category/java/" destination = "/blog/category/eclipse-modeling-framework-emf/" kind = 301 [[advanced.redirects]] -source = "https://matthias.schoettle.me/category/frameworks/struts/" +source = "/category/frameworks/struts/" destination = "/blog/archive/" kind = 301 [[advanced.redirects]] -source = "https://matthias.schoettle.me/category/windows/windows-7/" +source = "/category/windows/windows-7/" destination = "/blog/archive/" kind = 301 [[advanced.redirects]] -source = "https://matthias.schoettle.me/category/distributed-version-control/" +source = "/category/distributed-version-control/" destination = "/blog/category/git/" kind = 301 # blog categories that exist but under a different structure [[advanced.redirects]] -source = "https://matthias.schoettle.me/category/frameworks/django/" +source = "/category/frameworks/django/" destination = "/blog/category/django/" kind = 301 [[advanced.redirects]] -source = "https://matthias.schoettle.me/category/distributed-version-control/git/" +source = "/category/distributed-version-control/git/" destination = "/blog/category/git/" kind = 301 [[advanced.redirects]] -source = "https://matthias.schoettle.me/category/frameworks/emf/" +source = "/category/frameworks/emf/" destination = "/blog/category/eclipse-modeling-framework-emf/" kind = 301 [[advanced.redirects]] -source = "https://matthias.schoettle.me/category/{raspberry-pi,nextcloud}/" +source = "/category/{raspberry-pi,nextcloud}/" destination = "/blog/category/self-hosting/" kind = 301 # categories that still exist [[advanced.redirects]] -source = "https://matthias.schoettle.me/category/{*}/" +source = "/category/{*}/" destination = "/blog/category/$1/" kind = 301 # old blog categories [[advanced.redirects]] -source = "https://matthias.schoettle.me/category/{*}/" +source = "/category/{*}/" destination = "/blog/category/$1/" kind = 301 # portfolio pages [[advanced.redirects]] -source = "https://matthias.schoettle.me/wp-portfolio/{*}/" +source = "/wp-portfolio/{*}/" destination = "/projects/#{$1}" kind = 301 # portfolio categories [[advanced.redirects]] -source = "https://matthias.schoettle.me/portfolio-category/development/" +source = "/portfolio-category/development/" destination = "/projects/#software-engineering" kind = 301 [[advanced.redirects]] -source = "https://matthias.schoettle.me/portfolio-category/{*}/" +source = "/portfolio-category/{*}/" destination = "/projects/" kind = 301 # blog archive: month not accessible anymore [[advanced.redirects]] -source = "https://matthias.schoettle.me/{*}/{*}/" +source = "/{*}/{*}/" destination = "/blog/archive/$1/" kind = 301 From d7215b76592b1af034fc831540adac74b6839aae Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Mon, 18 Nov 2024 06:02:43 -0500 Subject: [PATCH 07/20] test redirects --- deploy/sws.toml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/deploy/sws.toml b/deploy/sws.toml index aee74a7..5b3c0bc 100644 --- a/deploy/sws.toml +++ b/deploy/sws.toml @@ -39,10 +39,10 @@ destination = "/assets/papers/$1.pdf" kind = 301 # blog posts -[[advanced.redirects]] -source = "/{*}/{*}/{*}/{*}/" -destination = "/blog/$1/$2/$3/$4" -kind = 301 +# [[advanced.redirects]] +# source = "/{*}/{*}/{*}/{*}/" +# destination = "/blog/$1/$2/$3/$4" +# kind = 301 # blog categories that don't exist anymore [[advanced.redirects]] @@ -121,7 +121,7 @@ destination = "/projects/" kind = 301 # blog archive: month not accessible anymore -[[advanced.redirects]] -source = "/{*}/{*}/" -destination = "/blog/archive/$1/" -kind = 301 +# [[advanced.redirects]] +# source = "/{*}/{*}/" +# destination = "/blog/archive/$1/" +# kind = 301 From 4935fb9196891db9550472723ed53be2e1d792fd Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Wed, 4 Dec 2024 06:14:43 -0500 Subject: [PATCH 08/20] update config --- deploy/sws.toml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/deploy/sws.toml b/deploy/sws.toml index 5b3c0bc..6d4613a 100644 --- a/deploy/sws.toml +++ b/deploy/sws.toml @@ -38,12 +38,6 @@ source = "/wp-content/papercite-data/pdf/{*}.pdf" destination = "/assets/papers/$1.pdf" kind = 301 -# blog posts -# [[advanced.redirects]] -# source = "/{*}/{*}/{*}/{*}/" -# destination = "/blog/$1/$2/$3/$4" -# kind = 301 - # blog categories that don't exist anymore [[advanced.redirects]] source = "/category/{uncategorized,frameworks,hints,howto,office,tweaks,windows}/" @@ -121,7 +115,13 @@ destination = "/projects/" kind = 301 # blog archive: month not accessible anymore -# [[advanced.redirects]] -# source = "/{*}/{*}/" -# destination = "/blog/archive/$1/" -# kind = 301 +[[advanced.redirects]] +source = "/{*}/{*}/" +destination = "/blog/archive/$1/" +kind = 301 + +# blog posts +[[advanced.redirects]] +source = "/{*}/{*}/{*}/{*}/" +destination = "/blog/$1/$2/$3/$4" +kind = 301 From 9817f40d0d56289e7f46d4e6ebbc7344ac488fb2 Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Thu, 5 Dec 2024 06:15:17 -0500 Subject: [PATCH 09/20] fix blog post dates and blog post uploads --- deploy/sws.toml | 50 ++++++++++++------- ...-besides-email-addresses-in-thunderbird.md | 4 +- ...lyx-installing-unknown-document-classes.md | 2 +- .../thunderbird-extension-toggle-headers.md | 4 +- .../blog/posts/2015/mt4j-with-processing-2.md | 4 +- .../thunderbird-extension-hide-badge-icon.md | 4 +- ...erbird-extension-toggle-headers-updated.md | 4 +- ...the-firefox-ui-for-the-tab-close-button.md | 2 +- .../2020/notes-on-traefik-v2-nextcloud-etc.md | 2 +- 9 files changed, 45 insertions(+), 31 deletions(-) diff --git a/deploy/sws.toml b/deploy/sws.toml index 6d4613a..4698e1f 100644 --- a/deploy/sws.toml +++ b/deploy/sws.toml @@ -20,18 +20,6 @@ source = "/privacy-policy-2/" destination = "/privacy-policy/" kind = 301 -# image uploads -[[advanced.redirects]] -source = "/wp-content/*/*/*/{*}.jpg" -destination = "/assets/images/$1.jpg" -kind = 301 - -# video uploads -[[advanced.redirects]] -source = "/wp-content/*/*/*/{*}.{mp4,mov}" -destination = "/assets/videos/$1.$2" -kind = 301 - # papers [[advanced.redirects]] source = "/wp-content/papercite-data/pdf/{*}.pdf" @@ -97,6 +85,32 @@ source = "/category/{*}/" destination = "/blog/category/$1/" kind = 301 +# blog archive: month not accessible anymore +[[advanced.redirects]] +source = "/{[0-9][0-9][0-9][0-9]}/{[0-9][0-9]}/" +destination = "/blog/archive/$1/" +kind = 301 + +# blog posts +[[advanced.redirects]] +source = "/{[0-9][0-9][0-9][0-9]}/{[0-9][0-9]}/{[0-9][0-9]}/{*}/" +destination = "/blog/$1/$2/$3/$4" +kind = 301 + +# uploads for blog posts + +# COVID-19 Montreal Dashboard +[[advanced.redirects]] +source = "/wp-content/uploads/2021/03/{*}" +destination = "/blog/2021/covid-19-montreal-dashboard/$1" +kind = 301 + +# Thunderbird titlebar +[[advanced.redirects]] +source = "/wp-content/uploads/2013/05/{*}" +destination = "/blog/2013/show-old-title-bar-in-thunderbird/$1" +kind = 301 + # portfolio pages [[advanced.redirects]] source = "/wp-portfolio/{*}/" @@ -114,14 +128,14 @@ source = "/portfolio-category/{*}/" destination = "/projects/" kind = 301 -# blog archive: month not accessible anymore +# image uploads [[advanced.redirects]] -source = "/{*}/{*}/" -destination = "/blog/archive/$1/" +source = "/wp-content/*/*/*/{*}.jpg" +destination = "/assets/images/$1.jpg" kind = 301 -# blog posts +# video uploads [[advanced.redirects]] -source = "/{*}/{*}/{*}/{*}/" -destination = "/blog/$1/$2/$3/$4" +source = "/wp-content/*/*/*/{*}.{mp4,mov}" +destination = "/assets/videos/$1.$2" kind = 301 diff --git a/docs/blog/posts/2012/hide-star-besides-email-addresses-in-thunderbird.md b/docs/blog/posts/2012/hide-star-besides-email-addresses-in-thunderbird.md index 0575684..cc57e38 100644 --- a/docs/blog/posts/2012/hide-star-besides-email-addresses-in-thunderbird.md +++ b/docs/blog/posts/2012/hide-star-besides-email-addresses-in-thunderbird.md @@ -1,8 +1,8 @@ --- migrated: true date: - created: 2012-02-06 - updated: 2012-02-06 + created: 2012-02-07 + updated: 2012-02-07 categories: - Thunderbird # - Tweaks diff --git a/docs/blog/posts/2012/lyx-installing-unknown-document-classes.md b/docs/blog/posts/2012/lyx-installing-unknown-document-classes.md index f8fdb93..de762a1 100644 --- a/docs/blog/posts/2012/lyx-installing-unknown-document-classes.md +++ b/docs/blog/posts/2012/lyx-installing-unknown-document-classes.md @@ -1,7 +1,7 @@ --- migrated: true date: - created: 2012-05-28 + created: 2012-05-29 updated: 2013-04-05 # categories: # - Mac OS diff --git a/docs/blog/posts/2012/thunderbird-extension-toggle-headers.md b/docs/blog/posts/2012/thunderbird-extension-toggle-headers.md index cf972d5..3517723 100644 --- a/docs/blog/posts/2012/thunderbird-extension-toggle-headers.md +++ b/docs/blog/posts/2012/thunderbird-extension-toggle-headers.md @@ -1,8 +1,8 @@ --- migrated: true date: - created: 2012-02-06 - updated: 2012-02-06 + created: 2012-02-07 + updated: 2012-02-07 categories: - Thunderbird slug: thunderbird-extension-toggle-headers diff --git a/docs/blog/posts/2015/mt4j-with-processing-2.md b/docs/blog/posts/2015/mt4j-with-processing-2.md index 2c48b78..868cbc8 100644 --- a/docs/blog/posts/2015/mt4j-with-processing-2.md +++ b/docs/blog/posts/2015/mt4j-with-processing-2.md @@ -1,8 +1,8 @@ --- migrated: true date: - created: 2015-08-18 - updated: 2015-08-18 + created: 2015-08-19 + updated: 2015-08-19 # categories: # - Java slug: mt4j-with-processing-2 diff --git a/docs/blog/posts/2015/thunderbird-extension-hide-badge-icon.md b/docs/blog/posts/2015/thunderbird-extension-hide-badge-icon.md index 0d9943a..b018a8d 100644 --- a/docs/blog/posts/2015/thunderbird-extension-hide-badge-icon.md +++ b/docs/blog/posts/2015/thunderbird-extension-hide-badge-icon.md @@ -1,8 +1,8 @@ --- migrated: true date: - created: 2015-11-09 - updated: 2015-11-09 + created: 2015-11-10 + updated: 2015-11-10 categories: # - Mac OS - Thunderbird diff --git a/docs/blog/posts/2015/thunderbird-extension-toggle-headers-updated.md b/docs/blog/posts/2015/thunderbird-extension-toggle-headers-updated.md index d860a93..6b97b7b 100644 --- a/docs/blog/posts/2015/thunderbird-extension-toggle-headers-updated.md +++ b/docs/blog/posts/2015/thunderbird-extension-toggle-headers-updated.md @@ -1,8 +1,8 @@ --- migrated: true date: - created: 2015-11-09 - updated: 2015-11-09 + created: 2015-11-10 + updated: 2015-11-10 categories: - Thunderbird slug: thunderbird-extension-toggle-headers-updated diff --git a/docs/blog/posts/2018/digging-into-the-firefox-ui-for-the-tab-close-button.md b/docs/blog/posts/2018/digging-into-the-firefox-ui-for-the-tab-close-button.md index fadc1d2..1056cc8 100644 --- a/docs/blog/posts/2018/digging-into-the-firefox-ui-for-the-tab-close-button.md +++ b/docs/blog/posts/2018/digging-into-the-firefox-ui-for-the-tab-close-button.md @@ -1,7 +1,7 @@ --- migrated: true date: - created: 2018-07-24 + created: 2018-07-25 updated: 2023-05-28 categories: - Firefox diff --git a/docs/blog/posts/2020/notes-on-traefik-v2-nextcloud-etc.md b/docs/blog/posts/2020/notes-on-traefik-v2-nextcloud-etc.md index 50ea56b..25ff975 100644 --- a/docs/blog/posts/2020/notes-on-traefik-v2-nextcloud-etc.md +++ b/docs/blog/posts/2020/notes-on-traefik-v2-nextcloud-etc.md @@ -1,7 +1,7 @@ --- migrated: true date: - created: 2020-01-15 + created: 2020-01-16 updated: 2022-12-17 categories: # - Docker From 65f1d8041591b2469129eb8377eabe066504fec6 Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Thu, 5 Dec 2024 06:22:04 -0500 Subject: [PATCH 10/20] fix blog post dates and blog archive redirect --- deploy/sws.toml | 8 ++++---- docs/blog/posts/2021/setting-up-msmtp.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deploy/sws.toml b/deploy/sws.toml index 4698e1f..dc4ce23 100644 --- a/deploy/sws.toml +++ b/deploy/sws.toml @@ -29,7 +29,7 @@ kind = 301 # blog categories that don't exist anymore [[advanced.redirects]] source = "/category/{uncategorized,frameworks,hints,howto,office,tweaks,windows}/" -destination = "/blog/archive/" +destination = "/blog/" kind = 301 [[advanced.redirects]] @@ -39,12 +39,12 @@ kind = 301 [[advanced.redirects]] source = "/category/frameworks/struts/" -destination = "/blog/archive/" +destination = "/blog/" kind = 301 [[advanced.redirects]] source = "/category/windows/windows-7/" -destination = "/blog/archive/" +destination = "/blog/" kind = 301 [[advanced.redirects]] @@ -101,7 +101,7 @@ kind = 301 # COVID-19 Montreal Dashboard [[advanced.redirects]] -source = "/wp-content/uploads/2021/03/{*}" +source = "/wp-content/uploads/2021/05/{*}" destination = "/blog/2021/covid-19-montreal-dashboard/$1" kind = 301 diff --git a/docs/blog/posts/2021/setting-up-msmtp.md b/docs/blog/posts/2021/setting-up-msmtp.md index 5f2864b..ef9d1cd 100644 --- a/docs/blog/posts/2021/setting-up-msmtp.md +++ b/docs/blog/posts/2021/setting-up-msmtp.md @@ -1,8 +1,8 @@ --- migrated: true date: - created: 2021-05-11 - updated: 2021-05-11 + created: 2021-05-12 + updated: 2021-05-12 categories: # - Howto - Linux From b7b441ccbbc8888138962d2be13e4b8f69b7447a Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Fri, 6 Dec 2024 07:03:31 -0500 Subject: [PATCH 11/20] ci: test --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae3bf07..c599ec9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,3 +55,9 @@ jobs: cat markdownlint-cli2-sarif.sarif | grep -q '"results": \[\]' - name: Build mkdocs site run: uv run mkdocs build --strict + - name: Run the production stack + run: docker compose -f compose.production.yaml up --build -d + - name: Check + run: docker ps + - name: Stop production stack + run: docker compose -f compose.production.yaml down From 2b6076190649ef2a8e67099b1140b10f8f7e9a3d Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Fri, 6 Dec 2024 07:10:14 -0500 Subject: [PATCH 12/20] ci: test --- compose.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 compose.yaml diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..bd5a01d --- /dev/null +++ b/compose.yaml @@ -0,0 +1,7 @@ +services: + app: + build: + context: . + restart: unless-stopped + ports: + - "80:80" From 53b152e30457f630ff2c40e36f64d6c8ef87d79b Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Fri, 6 Dec 2024 07:10:27 -0500 Subject: [PATCH 13/20] ci: test --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c599ec9..85c46ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,8 +56,8 @@ jobs: - name: Build mkdocs site run: uv run mkdocs build --strict - name: Run the production stack - run: docker compose -f compose.production.yaml up --build -d + run: docker compose up --build -d - name: Check run: docker ps - name: Stop production stack - run: docker compose -f compose.production.yaml down + run: docker compose down From 71bf832e2da6018332df099a8333b4d9bd096fad Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Fri, 6 Dec 2024 07:13:52 -0500 Subject: [PATCH 14/20] ci: test --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85c46ac..c6351ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,6 +58,6 @@ jobs: - name: Run the production stack run: docker compose up --build -d - name: Check - run: docker ps + run: uv run --script .github/redirects/check_redirects.py - name: Stop production stack run: docker compose down From 79acead6840cebf6fc10e0480bffc40d700b3332 Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Fri, 6 Dec 2024 07:19:59 -0500 Subject: [PATCH 15/20] add script --- .github/redirects/check_redirects.py | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/redirects/check_redirects.py diff --git a/.github/redirects/check_redirects.py b/.github/redirects/check_redirects.py new file mode 100644 index 0000000..e922cba --- /dev/null +++ b/.github/redirects/check_redirects.py @@ -0,0 +1,30 @@ +import json +import sys +from http import HTTPStatus +from pathlib import Path + +import requests + + +def check_redirect(url: str) -> bool: + url = f'http://localhost:8080{url}' + print(f'checking URL: {url}') + response = requests.get(url) + + if response.status_code != HTTPStatus.OK: + print(f'ERROR: URL {url} returned: {response.status_code}') + return False + + return True + + +with Path('.github/redirects/urls.json').open() as fd: + urls = json.load(fd) + +result = True + +for url in urls: + result &= check_redirect(url) + +if not result: + sys.exit(1) From 0b6a502452f7915fda9bfc891efff6e6e9276ce9 Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Fri, 6 Dec 2024 07:21:44 -0500 Subject: [PATCH 16/20] add urls --- .github/redirects/urls.json | 83 +++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .github/redirects/urls.json diff --git a/.github/redirects/urls.json b/.github/redirects/urls.json new file mode 100644 index 0000000..4ce81a4 --- /dev/null +++ b/.github/redirects/urls.json @@ -0,0 +1,83 @@ +[ + "/2021/05/28/django-django_tables2-and-bootstrap-table/", + "/2021/05/17/covid-19-montreal-dashboard/", + "/wp-content/uploads/2021/05/dashboard_before.jpg", + "/wp-content/uploads/2021/05/dashboard_relaunch.jpg", + "/2021/05/12/sepaq-availability-scraper/", + "/2021/05/12/setting-up-msmtp/", + "/2021/03/18/set-up-debian/", + "/2020/01/16/notes-on-traefik-v2-nextcloud-etc/", + "/2020/01/14/migrating-data-to-nextcloud/", + "/2020/01/08/notes-on-docker/", + "/2020/01/06/notes-on-setting-up-my-raspberry-pi/", + "/2019/12/12/making-emf-models-serialized-in-xmi-available-in-json-with-emfjson/", + "/2019/12/11/migrate-legacy-thunderbird-add-on-to-mailextension-for-thunderbird-68/", + "/2019/11/14/how-to-drag-music-and-videos-onto-iphone-ipad-using-itunes/", + "/2018/09/12/deploying-angular-application-on-apache-server/", + "/2018/07/25/digging-into-the-firefox-ui-for-the-tab-close-button/", + "/2017/12/08/airdrop-on-macos-working-unreliably/", + "/2016/01/04/ios-how-to-fix-or-change-voicemail-number/", + "/2016/01/04/firefox-close-tab-button-on-hover/", + "/2015/11/10/thunderbird-extension-hide-badge-icon/", + "/2015/11/10/thunderbird-extension-toggle-headers-updated/", + "/2015/08/19/mt4j-with-processing-2/", + "/2015/08/18/how-to-use-ocl-when-running-emf-standalone-with-eclipse-mars/", + "/2015/08/18/move-more-than-one-directory-into-a-new-repository/", + "/2015/06/19/move-directory-from-one-repository-to-another-preserving-history/", + "/2013/05/25/show-old-title-bar-in-thunderbird/", + "/wp-content/uploads/2013/05/thunderbird_17_titlebar.jpg", + "/wp-content/uploads/2013/05/thunderbird_17_titlebar_after.jpg", + "/2013/05/02/modifying-the-new-child-sub-menu-items-in-emf/", + "/2013/04/25/reducing-file-size-of-a-pdf-on-mac-os/", + "/2012/05/31/how-to-use-ocl-when-running-emf-standalone/", + "/2012/05/29/lyx-installing-unknown-document-classes/", + "/2012/05/19/postgresql-accepts-any-or-no-password-when-connecting/", + "/2012/05/10/using-multiple-svn-clients-with-the-svnssh-protocol-and-a-putty-profile/", + "/2012/02/07/thunderbird-extension-toggle-headers/", + "/2012/02/07/hide-star-besides-email-addresses-in-thunderbird/", + "/2011/04/14/things-discovered-in-struts-2/", + "/2011/03/30/mac-os-airport-not-connecting-automatically-to-wi-fi/", + "/2011/03/30/office-end-user-license-agreement-eula-has-to-be-accepted-every-time/", + "/2011/03/30/hide-the-network-icon-from-windows-7-explorer/", + "/2011/03/21/setting-up-apache-and-subversion-on-debian-wheezy/", + "/privacy-policy-2/", + "/projects/", + "/research/", + "/research/publications/", + "/", + "/blog/", + "/legal-notice/", + "/wp-portfolio/digital-printing-workflow/", + "/wp-portfolio/covid-19-montreal-dashboard/", + "/wp-portfolio/sepaq-availability-scraper/", + "/wp-portfolio/docker-monitor/", + "/wp-portfolio/concernification-study/", + "/wp-portfolio/touchcore/", + "/wp-portfolio/tippspiel/", + "/wp-portfolio/kinect-project/", + "/wp-portfolio/hochseilgarten-nagold/", + "/wp-portfolio/max-payne-zone/", + "/category/distributed-version-control/", + "/category/frameworks/django/", + "/category/docker/", + "/category/frameworks/emf/", + "/category/firefox/", + "/category/frameworks/", + "/category/distributed-version-control/git/", + "/category/hints/", + "/category/howto/", + "/category/java/", + "/category/mac-os/", + "/category/nextcloud/", + "/category/office/", + "/category/raspberry-pi/", + "/category/frameworks/struts/", + "/category/thunderbird/", + "/category/tweaks/", + "/category/uncategorized/", + "/category/windows/", + "/category/windows/windows-7/", + "/portfolio-category/archive/", + "/portfolio-category/development/", + "/portfolio-category/side-projects/" +] From 646458b3ae9be3d0324524822bcc2d8097568bac Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Fri, 6 Dec 2024 07:24:13 -0500 Subject: [PATCH 17/20] ci: test --- .github/redirects/check_redirects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/redirects/check_redirects.py b/.github/redirects/check_redirects.py index e922cba..f7d995b 100644 --- a/.github/redirects/check_redirects.py +++ b/.github/redirects/check_redirects.py @@ -7,7 +7,7 @@ def check_redirect(url: str) -> bool: - url = f'http://localhost:8080{url}' + url = f'http://localhost{url}' print(f'checking URL: {url}') response = requests.get(url) From 17b51645237c4546a562ee47bd04e6f8dea297b5 Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Fri, 6 Dec 2024 07:27:27 -0500 Subject: [PATCH 18/20] ci: test --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6351ef..d185eba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,8 +53,6 @@ jobs: - name: Check markdownlint results run: | cat markdownlint-cli2-sarif.sarif | grep -q '"results": \[\]' - - name: Build mkdocs site - run: uv run mkdocs build --strict - name: Run the production stack run: docker compose up --build -d - name: Check From b4ef77e8cebb875653b28e7be27cceaafd3223d0 Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Mon, 9 Dec 2024 06:33:46 -0500 Subject: [PATCH 19/20] test fail --- .github/redirects/urls.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/redirects/urls.json b/.github/redirects/urls.json index 4ce81a4..af7abb3 100644 --- a/.github/redirects/urls.json +++ b/.github/redirects/urls.json @@ -46,6 +46,8 @@ "/research/publications/", "/", "/blog/", + "/blog/page/2/", + "/sample-page/", "/legal-notice/", "/wp-portfolio/digital-printing-workflow/", "/wp-portfolio/covid-19-montreal-dashboard/", From 3612267fee871275bb035e1c268c97c7a87c6685 Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Mon, 9 Dec 2024 06:37:55 -0500 Subject: [PATCH 20/20] remove sample page --- .github/redirects/urls.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/redirects/urls.json b/.github/redirects/urls.json index af7abb3..abec50c 100644 --- a/.github/redirects/urls.json +++ b/.github/redirects/urls.json @@ -47,7 +47,6 @@ "/", "/blog/", "/blog/page/2/", - "/sample-page/", "/legal-notice/", "/wp-portfolio/digital-printing-workflow/", "/wp-portfolio/covid-19-montreal-dashboard/",