diff --git a/content/posts/hard-problem.md b/content/posts/cache-busting.md similarity index 92% rename from content/posts/hard-problem.md rename to content/posts/cache-busting.md index f00015a..f0eab5e 100644 --- a/content/posts/hard-problem.md +++ b/content/posts/cache-busting.md @@ -1,6 +1,6 @@ +++ date = '2024-11-13T14:24:21+01:00' -draft = true +draft = false title = 'Invalidating the browser cache' +++ @@ -10,7 +10,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 +19,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 +68,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 @@