fix: avoid having lastmod inferior than date
All checks were successful
Blog Deployment / Check-Rebuild (push) Successful in 5s
Blog Deployment / Build (push) Successful in 8s
Blog Deployment / Deploy-Staging (push) Successful in 9s
Blog Deployment / Test-Staging (push) Successful in 3s
Blog Deployment / Merge (push) Successful in 5s
Blog Deployment / Deploy-Production (push) Successful in 9s
Blog Deployment / Test-Production (push) Successful in 3s
Blog Deployment / Clean (push) Successful in 2s
All checks were successful
Blog Deployment / Check-Rebuild (push) Successful in 5s
Blog Deployment / Build (push) Successful in 8s
Blog Deployment / Deploy-Staging (push) Successful in 9s
Blog Deployment / Test-Staging (push) Successful in 3s
Blog Deployment / Merge (push) Successful in 5s
Blog Deployment / Deploy-Production (push) Successful in 9s
Blog Deployment / Test-Production (push) Successful in 3s
Blog Deployment / Clean (push) Successful in 2s
This commit is contained in:
@@ -11,7 +11,7 @@ DRAFTS=""
|
|||||||
# Add drafts for preview
|
# Add drafts for preview
|
||||||
if [ "$BRANCH" = "preview" ]; then
|
if [ "$BRANCH" = "preview" ]; then
|
||||||
echo "- Adding draft pages to be generated"
|
echo "- Adding draft pages to be generated"
|
||||||
DRAFTS="--buildDrafts"
|
DRAFTS="--buildDrafts --buildFuture"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Clone repo
|
# Clone repo
|
||||||
@@ -20,7 +20,7 @@ git clone --recurse-submodules --branch "$BRANCH" "$REPO_URL" "$CLONE_DIR"
|
|||||||
|
|
||||||
# Generate static files with hugo
|
# Generate static files with hugo
|
||||||
echo "- Building site with Hugo v$HUGO_VERSION in $HUGO_DEST..."
|
echo "- Building site with Hugo v$HUGO_VERSION in $HUGO_DEST..."
|
||||||
hugo --source "$CLONE_DIR" --destination "$HUGO_DEST" --baseURL="https://${URL}" "$DRAFTS" --logLevel info --cleanDestinationDir --gc --panicOnWarning --printI18nWarnings
|
hugo --source "$CLONE_DIR" --destination "$HUGO_DEST" --baseURL="https://${URL}" ${DRAFTS} --logLevel info --cleanDestinationDir --gc --panicOnWarning --printI18nWarnings
|
||||||
|
|
||||||
# Start nginx
|
# Start nginx
|
||||||
echo "- Starting Nginx..."
|
echo "- Starting Nginx..."
|
||||||
|
@@ -45,9 +45,9 @@
|
|||||||
</time>
|
</time>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{- $date := .Date.Format "2006-01-02" -}}
|
{{- $date := .Date.Format "20060102" | int -}}
|
||||||
{{- $lastmod := .Lastmod.Format "2006-01-02" -}}
|
{{- $lastmod := .Lastmod.Format "20060102" | int -}}
|
||||||
{{- if ne $lastmod $date -}}
|
{{- if gt $lastmod $date -}}
|
||||||
<div class="article-lastmod">
|
<div class="article-lastmod">
|
||||||
{{ partial "helper/icon" "refresh" }}
|
{{ partial "helper/icon" "refresh" }}
|
||||||
<time>
|
<time>
|
||||||
|
Reference in New Issue
Block a user