From ce317022809745cb4b0612adf2ded90ec4b9b9c9 Mon Sep 17 00:00:00 2001 From: andrzej Date: Fri, 15 Nov 2024 16:12:36 +0100 Subject: [PATCH] tags --- .../{hard-problem.md => cache-busting.md} | 9 +- content/posts/permissions-strike-again.md | 1 + deploy | 8 ++ hugo.toml | 5 +- public/categories/index.html | 25 +++- public/categories/index.xml | 4 +- public/css/main.css | 22 +++- public/index.html | 30 +++-- public/index.xml | 29 +---- ...d9ccfa2969daa3fa00fa1c1fe8701a9b87251a1.js | 1 + public/posts/cache-busting/index.html | 108 ++++++++++++++++++ public/posts/index.html | 55 +++++---- public/posts/index.xml | 29 +---- .../posts/permissions-strike-again/index.html | 28 ++++- public/posts/post-1/index.html | 22 +++- public/posts/post-2/index.html | 22 +++- public/posts/post-3/index.html | 22 +++- public/sitemap.xml | 35 +++--- public/tags/blue/index.html | 29 +++-- public/tags/blue/index.xml | 12 +- public/tags/css/index.html | 75 ++++++++++++ public/tags/css/index.xml | 19 +++ public/tags/green/index.html | 31 +++-- public/tags/green/index.xml | 4 +- public/tags/html/index.html | 75 ++++++++++++ public/tags/html/index.xml | 19 +++ public/tags/index.html | 38 ++++-- public/tags/index.xml | 30 ++--- public/tags/linux/index.html | 85 ++++++++++++++ public/tags/linux/index.xml | 26 +++++ public/tags/red/index.html | 35 ++++-- public/tags/red/index.xml | 4 +- themes/cuqui/assets/css/main.css | 22 +++- themes/cuqui/content/_index.md | 1 + themes/cuqui/content/posts/post-1.md | 10 -- themes/cuqui/content/posts/post-2.md | 10 -- .../content/posts/post-3/bryce-canyon.jpg | Bin 19224 -> 0 bytes themes/cuqui/content/posts/post-3/index.md | 12 -- themes/cuqui/layouts/_default/home.html | 1 + themes/cuqui/layouts/_default/list.html | 6 +- themes/cuqui/layouts/partials/head/css.html | 28 ++--- 41 files changed, 759 insertions(+), 268 deletions(-) rename content/posts/{hard-problem.md => cache-busting.md} (91%) create mode 100755 deploy create mode 100644 public/js/main.23cd0c7d837263b9eaeb96ee2d9ccfa2969daa3fa00fa1c1fe8701a9b87251a1.js create mode 100644 public/posts/cache-busting/index.html create mode 100644 public/tags/css/index.html create mode 100644 public/tags/css/index.xml create mode 100644 public/tags/html/index.html create mode 100644 public/tags/html/index.xml create mode 100644 public/tags/linux/index.html create mode 100644 public/tags/linux/index.xml delete mode 100644 themes/cuqui/content/posts/post-1.md delete mode 100644 themes/cuqui/content/posts/post-2.md delete mode 100644 themes/cuqui/content/posts/post-3/bryce-canyon.jpg delete mode 100644 themes/cuqui/content/posts/post-3/index.md diff --git a/content/posts/hard-problem.md b/content/posts/cache-busting.md similarity index 91% rename from content/posts/hard-problem.md rename to content/posts/cache-busting.md index f00015a..10581a0 100644 --- a/content/posts/hard-problem.md +++ b/content/posts/cache-busting.md @@ -1,7 +1,8 @@ +++ date = '2024-11-13T14:24:21+01:00' -draft = true +draft = false title = 'Invalidating the browser cache' +tags = ['css','html','linux'] +++ **I had a bit of an issue with my [website](https://demos.ajstepien.xyz) recently.** @@ -10,7 +11,7 @@ I pushed some changes incorporating images for the first time (I know -- very sw The experienced computer touchers amongst you will be saying "this is obviously a cache problem", and you're right, it is obviously a cache problem. Pressing `CTR + SHIFT + R` (which forces Firefox to clear the cache and do a full reload) proved this thesis, and solved the immediate problem for me, on my machine. But what about other people's machines? **I needed to cache-bust.** -Post-processors such as Tailwind use fancy 'fingerprinting' techniques for this, but I want something simpler than that for this project. Something I can code myself, without losing sight of what's happening under the hood. +Post-processors such as Tailwind have built-in methods for this, but I want something simpler than that for this project: something I can code myself, without losing sight of what's happening under the hood. ## Invalidating cached HTML @@ -19,7 +20,7 @@ The best way to deal with the caching problem is to tell the browser not to cach I can stop HTML files from getting cached by adding the following meta tag. In this case, I'm adding it to `index.html`. ```html - + ``` ## Invalidating cached CSS @@ -68,7 +69,7 @@ Now I just need to add the build script to my Jenkinsfile... } ``` -and the problem is solved. +... and the problem is solved. Pretty neat, huh? diff --git a/content/posts/permissions-strike-again.md b/content/posts/permissions-strike-again.md index 51b12ac..2d72eac 100644 --- a/content/posts/permissions-strike-again.md +++ b/content/posts/permissions-strike-again.md @@ -2,6 +2,7 @@ date = '2024-11-13T11:53:13+01:00' draft = false title = 'Permissions Strike Again' +tags = ['linux'] +++ Configuring Apache really isn't rocket science. There are a wealth of great tutorials online, the documentation is very well documented, and the defaults work more or less out of the box. But it's one of those jobs that I do just infrequently enough that I always forget things in the interim, and end up making the same old mistakes. diff --git a/deploy b/deploy new file mode 100755 index 0000000..e1f6787 --- /dev/null +++ b/deploy @@ -0,0 +1,8 @@ +#!/bin/sh +USER=andrzej +HOST=192.168.0.70 +DIR=site # the directory where your website files should go + +hugo && rsync -avz --delete public/ ${USER}@${HOST}:~/${DIR} # this will delete everything on the server that's not in the local public folder + +exit 0 diff --git a/hugo.toml b/hugo.toml index f475d10..dc7e481 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,7 +1,8 @@ -baseURL = 'https://example.org/' +baseURL = 'http://192.168.70/' languageCode = 'en-us' -title = 'CODING WITH ANDRZEJ' +title = 'Coding with Andrzej' theme = "cuqui" +tags = ["css","html","javascript"] [markup] [markup.highlight] noClasses = false diff --git a/public/categories/index.html b/public/categories/index.html index 01c012f..69fc9c4 100644 --- a/public/categories/index.html +++ b/public/categories/index.html @@ -4,12 +4,24 @@ - Categories | CODING WITH ANDRZEJ + Categories | Coding with Andrzej - - - + + + + + + + + + + + + + + + @@ -17,7 +29,7 @@
-

CODING WITH ANDRZEJ

+

Coding with Andrzej