Compare commits

..

No commits in common. "1ce60da9cf407b8fd38aa96d50598591726466ba" and "0344d646f812d0e6f6268e42150f1cb6e2456638" have entirely different histories.

3 changed files with 8 additions and 10 deletions

View File

@ -53,7 +53,6 @@ vars = {
'tmp_dir': '/tmp',
'force': False,
'branch': None,
'preview_branch': None,
}
# logging time
@ -157,19 +156,19 @@ published = False
refs = cmd([GIT_PATH, 'diff-tree', '--no-commit-id', '--name-only', REF], cwd=GIT_REPO).split("\n")
for r in refs:
if FORCE or r == "PUBLISH.trigger.md":
build_site(WEBSITE, TMP_WEBSITE, branch=BRANCH)
build_site(WEBSITE, TMP_WEBSITE)
published = True
# Check if there is a !publish!
if not published:
refs = cmd([GIT_PATH, 'show', '--format="%s"', '-s'], cwd=GIT_REPO).split(' ')
for r in refs:
if r == "!publish!":
build_site(WEBSITE, TMP_WEBSITE, branch=BRANCH)
build_site(WEBSITE, TMP_WEBSITE)
published = True
# Let the world know if there hasn't been a publish
if not published:
print("The site wasn't build because there was no publish trigger, nor was it forced.")
# create preview version
build_site(WEBSITE_PREVIEW, TMP_WEBSITE_PREVIEW, branch=PREVIEW_BRANCH, hugo_environment='preview')
build_site(WEBSITE_PREVIEW, TMP_WEBSITE_PREVIEW, branch=BRANCH, hugo_environment='preview')
# @TODO: link the library

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
{{ if (or (eq hugo.Environment "gitea") (eq hugo.Environment "preview") ) }}
{{ if eq hugo.Environment "gitea" }}
<link rel="stylesheet" href="/css/site.css">
{{ else if .Site.IsServer }}
{{ $style := resources.Get "css/site.css" | postCSS (dict "config" "./assets/css/postcss.config.js") | minify }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
{{ $style := resources.Get "css/site.css" | postCSS (dict "config" "./assets/css/postcss.config.js") | minify | fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
{{ else }}
{{ $flist := newScratch }}
{{ $flist.Set "initial" "nop" }}
@ -21,7 +21,7 @@
{{ if in $css "css" }}
<link rel="stylesheet" href="{{ "/css/" }}{{ $css }}">
{{ else }}
{{ $style := resources.Get "css/site.css" | postCSS (dict "config" "./assets/css/postcss.config.js") | minify }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
{{ $style := resources.Get "css/site.css" | postCSS (dict "config" "./assets/css/postcss.config.js") | minify | fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
{{ end }}
{{ end }}