From c23735f94d756cf6ce3c5166beaee5e8b38b5240 Mon Sep 17 00:00:00 2001 From: Vezpi Date: Fri, 3 Apr 2026 10:02:12 +0200 Subject: [PATCH 1/2] fix/not-deploying-hugo-v159 (#9) Reviewed-on: https://git.vezpi.com/Vezpi/Blog/pulls/9 --- .gitea/workflows/test.yml | 10 +-- assets/scss/custom.scss | 8 ++- docker/entrypoint.sh | 3 + .../partials/article/components/details.html | 70 ++++++++++--------- themes/stack | 2 +- 5 files changed, 51 insertions(+), 42 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index c2b25c9..c9c4ff1 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -23,10 +23,7 @@ jobs: docker_folder_changed: ${{ steps.docker_folder.outputs.changed }} steps: - name: Checkout Repository - uses: actions/checkout@v4 - with: - ref: ${{ gitea.ref_name }} - token: ${{ secrets.REPO_TOKEN }} + run: git clone --branch ${{ gitea.ref_name }} https://${{ secrets.REPO_TOKEN }}@git.vezpi.com/Vezpi/blog.git . - name: Check Latest Hugo Version id: get_latest @@ -81,10 +78,7 @@ jobs: shell: sh steps: - name: Checkout Repository - uses: actions/checkout@v4 - with: - ref: ${{ gitea.ref_name }} - token: ${{ secrets.REPO_TOKEN }} + run: git clone --branch ${{ gitea.ref_name }} https://${{ secrets.REPO_TOKEN }}@git.vezpi.com/Vezpi/blog.git . - name: Build Docker Image run: | diff --git a/assets/scss/custom.scss b/assets/scss/custom.scss index 3547a0f..319eba9 100644 --- a/assets/scss/custom.scss +++ b/assets/scss/custom.scss @@ -3,9 +3,15 @@ } .lang-toggle-icon { - margin-left: auto; + margin-left: 0; svg { width: 64px; height: 24px; } +} + +.container { + .left-sidebar { + width: unset; + } } \ No newline at end of file diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index f5478c7..2f4128d 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -21,6 +21,9 @@ rm -rf "$CLONE_DIR" echo "- Cloning $REPO_URL (branch: $BRANCH)..." git clone --recurse-submodules --branch "$BRANCH" "$REPO_URL" "$CLONE_DIR" +# Patch .Site.Data references not yet fixed in Stack theme +sed -i 's/\.Site\.Data/hugo.Data/g' "$CLONE_DIR/themes/stack/layouts/_partials/article/components/photoswipe.html" + # 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 diff --git a/layouts/partials/article/components/details.html b/layouts/partials/article/components/details.html index 97d7597..6f2d43a 100644 --- a/layouts/partials/article/components/details.html +++ b/layouts/partials/article/components/details.html @@ -1,8 +1,13 @@ +{{- $IsList := .IsList -}} +{{- $Page := .Page -}}
- {{ if .Params.categories }} + {{ if $Page.Params.categories }}
diff --git a/themes/stack b/themes/stack index 9e6b7b2..8e36874 160000 --- a/themes/stack +++ b/themes/stack @@ -1 +1 @@ -Subproject commit 9e6b7b22a9d47478a72287bcdc29e885dcd8f359 +Subproject commit 8e3687431f40f3367635f067b3be89bd3f95d36e From eea734f2fefcc1729a18ee627609ca425bb47960 Mon Sep 17 00:00:00 2001 From: Vezpi Date: Fri, 3 Apr 2026 13:33:18 +0200 Subject: [PATCH 2/2] feat: create a dedicated dev pipeline (#10) Reviewed-on: https://git.vezpi.com/Vezpi/Blog/pulls/10 --- .gitea/workflows/deployment.yml | 8 ++++---- .gitea/workflows/test.yml | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/deployment.yml b/.gitea/workflows/deployment.yml index 1f4c691..f07c144 100644 --- a/.gitea/workflows/deployment.yml +++ b/.gitea/workflows/deployment.yml @@ -24,7 +24,7 @@ jobs: docker_folder_changed: ${{ steps.docker_folder.outputs.changed }} steps: - name: Checkout Repository - run: git clone --branch preview https://${{ secrets.REPO_TOKEN }}@git.vezpi.com/Vezpi/blog.git . + run: git clone --branch ${{ gitea.ref_name }} https://${{ secrets.REPO_TOKEN }}@git.vezpi.com/Vezpi/blog.git . - name: Check Latest Hugo Version id: get_latest @@ -79,7 +79,7 @@ jobs: shell: sh steps: - name: Checkout Repository - run: git clone --branch preview https://${{ secrets.REPO_TOKEN }}@git.vezpi.com/Vezpi/blog.git . + run: git clone --branch ${{ gitea.ref_name }} https://${{ secrets.REPO_TOKEN }}@git.vezpi.com/Vezpi/blog.git . - name: Build Docker Image run: | @@ -116,7 +116,7 @@ jobs: needs: Deploy-Staging runs-on: ubuntu env: - URL: "https://blog-dev.vezpi.com/en/" + URL: "https://blog-staging.vezpi.com/en/" steps: - name: Check HTTP Response run: | @@ -143,7 +143,7 @@ jobs: - name: Merge preview Branch on main run: | - git merge --ff-only origin/preview + git merge --ff-only origin/${{ gitea.ref_name }} git push origin main Deploy-Production: diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index c9c4ff1..1ce54aa 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -87,7 +87,7 @@ jobs: --build-arg HUGO_VERSION=${{ needs.Check-Rebuild.outputs.latest_hugo_version }} \ --tag ${DOCKER_IMAGE}:${{ needs.Check-Rebuild.outputs.latest_hugo_version }} \ . - docker tag ${DOCKER_IMAGE}:${{ needs.Check-Rebuild.outputs.latest_hugo_version }} ${DOCKER_IMAGE}:test + docker tag ${DOCKER_IMAGE}:${{ needs.Check-Rebuild.outputs.latest_hugo_version }} ${DOCKER_IMAGE}:dev Deploy-Test: needs: @@ -102,7 +102,7 @@ jobs: run: shell: sh env: - CONTAINER_NAME: blog_test + CONTAINER_NAME: blog_dev steps: - name: Launch Blog Test Deployment run: | @@ -117,7 +117,7 @@ jobs: needs: Deploy-Test runs-on: ubuntu env: - URL: "https://blog-test.vezpi.com/en/" + URL: "https://blog-dev.vezpi.com/en/" steps: - name: Check HTTP Response run: |