Skip to content

Commit

Permalink
chore: cache bust css
Browse files Browse the repository at this point in the history
  • Loading branch information
neurosnap committed Nov 18, 2024
1 parent 8cc044f commit c10a5a7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ssg:
cp ./static/* ./public
.PHONY: ssg

local: ssg
dev: ssg
rsync -vr ./public/ [email protected]:/starfx-local
.PHONY: dev

Expand Down
2 changes: 1 addition & 1 deletion docs/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.22

// replace github.com/picosh/pdocs => /home/erock/dev/pico/pdocs

require github.com/picosh/pdocs v0.0.0-20240621181009-3827cd3af2d3
require github.com/picosh/pdocs v0.0.0-20241118044720-1a43b70d33b7

require (
github.com/alecthomas/chroma v0.10.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions docs/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
github.com/dlclark/regexp2 v1.10.0 h1:+/GIL799phkJqYW+3YbOd8LCcbHzT0Pbo8zl70MHsq0=
github.com/dlclark/regexp2 v1.10.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/picosh/pdocs v0.0.0-20240621181009-3827cd3af2d3 h1:+/rt+j32CsEh49LAMKnX4GTVaIVlOLAcDX6SsYWKt+4=
github.com/picosh/pdocs v0.0.0-20240621181009-3827cd3af2d3/go.mod h1:KXO3Z0EVdA811AX6mlK4lwFDT+KgmegRVrEmZU5uLXU=
github.com/picosh/pdocs v0.0.0-20241118044720-1a43b70d33b7 h1:bFTqN2+VzAvv3+///We9tgKsZt84lcEAi9Jp9YmDV20=
github.com/picosh/pdocs v0.0.0-20241118044720-1a43b70d33b7/go.mod h1:KXO3Z0EVdA811AX6mlK4lwFDT+KgmegRVrEmZU5uLXU=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
3 changes: 3 additions & 0 deletions docs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package main

import (
"log/slog"
"math/rand"
"strconv"

"github.com/picosh/pdocs"
)
Expand Down Expand Up @@ -150,6 +152,7 @@ func main() {
Out: "./public",
Tmpl: "./tmpl",
PageTmpl: "post.page.tmpl",
CacheId: strconv.Itoa(rand.Intn(10000)),
}

err := config.GenSite()
Expand Down
2 changes: 1 addition & 1 deletion docs/tmpl/base.layout.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<link href="/logo.png" rel="icon" sizes="any" type="image/png"/>
<link rel="stylesheet" href="https://pico.sh/syntax.css" />
<link rel="stylesheet" href="https://pico.sh/smol.css" />
<link rel="stylesheet" href="/main.css" />
<link rel="stylesheet" href="/main.css?v={{.CacheId}}" />
{{template "meta" .}}
</head>

Expand Down

0 comments on commit c10a5a7

Please sign in to comment.