diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 8671de3..e0012d4 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -11,7 +11,7 @@ DRAFTS="" # Add drafts for preview if [ "$BRANCH" = "preview" ]; then echo "- Adding draft pages to be generated" - DRAFTS="--buildDrafts" + DRAFTS="--buildDrafts --buildFuture" fi # Clone repo @@ -20,7 +20,7 @@ git clone --recurse-submodules --branch "$BRANCH" "$REPO_URL" "$CLONE_DIR" # Generate static files with hugo 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 echo "- Starting Nginx..." diff --git a/layouts/partials/article/components/details.html b/layouts/partials/article/components/details.html index b337ab1..97d7597 100644 --- a/layouts/partials/article/components/details.html +++ b/layouts/partials/article/components/details.html @@ -45,9 +45,9 @@ {{ end }} - {{- $date := .Date.Format "2006-01-02" -}} - {{- $lastmod := .Lastmod.Format "2006-01-02" -}} - {{- if ne $lastmod $date -}} + {{- $date := .Date.Format "20060102" | int -}} + {{- $lastmod := .Lastmod.Format "20060102" | int -}} + {{- if gt $lastmod $date -}}