mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-17 06:14:22 +01:00
use tailwind bundle url with ?t compile-time variable.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package main
|
||||
|
||||
var compileTimeTs string
|
||||
|
||||
templ headCommonTemplate(params HeadParams) {
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
if params.Oembed != "" {
|
||||
@@ -19,7 +21,7 @@ templ headCommonTemplate(params HeadParams) {
|
||||
if tailwindDebugStuff != "" {
|
||||
@templ.Raw(tailwindDebugStuff)
|
||||
} else {
|
||||
<link rel="stylesheet" type="text/css" href="/njump/static/tailwind-bundle.min.css"/>
|
||||
<link rel="stylesheet" type="text/css" href={ "/njump/static/tailwind-bundle.min.css?t=" + compileTimeTs }/>
|
||||
}
|
||||
<style> @media print { @page { margin: 2cm 3cm; } } </style>
|
||||
<meta name="theme-color" content="#e42a6d"/>
|
||||
|
||||
4
justfile
4
justfile
@@ -7,9 +7,7 @@ build: templ tailwind
|
||||
go build -o ./njump
|
||||
|
||||
deploy: templ tailwind
|
||||
sed -i.bak "s#/tailwind-bundle.min.css#/tailwind-bundle.min.css?$(date +'%Y%m%d%H%M')#g" templates/head_common.html
|
||||
GOOS=linux GOARCH=amd64 go build -o ./njump
|
||||
mv -f templates/head_common.html.bak templates/head_common.html
|
||||
GOOS=linux GOARCH=amd64 go build -ldflags="-X main.compileTimeTs=$(date '+%s')" -o ./njump
|
||||
rsync --progress njump njump:njump/njump-new
|
||||
ssh njump 'systemctl stop njump'
|
||||
ssh njump 'mv njump/njump-new njump/njump'
|
||||
|
||||
Reference in New Issue
Block a user