From 623ef06b1fbe19821e82d82a984bc4cbfaae0410 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Wed, 24 May 2023 08:49:38 +0200 Subject: Note: Cachebusting in Hugo --- content/notes/cachebusting-in-hugo.md | 17 +++++++++++++++++ themes/simple/layouts/_default/notes.html | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 content/notes/cachebusting-in-hugo.md diff --git a/content/notes/cachebusting-in-hugo.md b/content/notes/cachebusting-in-hugo.md new file mode 100644 index 0000000..65d7769 --- /dev/null +++ b/content/notes/cachebusting-in-hugo.md @@ -0,0 +1,17 @@ +--- +title: Cache busting in Hugo +url: cachebusting-in-hugo.html +date: 2023-05-01 +type: notes +draft: false +tags: [hugo, cachebusting] +--- + +```html +{{ $cachebuster := delimit (shuffle (split (md5 "6fab11c6669976d759d2992eff1dd5be") "" )) "" }} + + +``` + +This `6fab11c6669976d759d2992eff1dd5be` can be random string you generate use. +You can use whatever you want. diff --git a/themes/simple/layouts/_default/notes.html b/themes/simple/layouts/_default/notes.html index 1aab40f..ea42c32 100644 --- a/themes/simple/layouts/_default/notes.html +++ b/themes/simple/layouts/_default/notes.html @@ -6,7 +6,7 @@

Notes about things I learn, things I do, things I want to remember, but never do. You can subscribe to this - RSS feed + RSS feed which contains only the notes without the blog posts.

-- cgit v1.2.3