mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 00:14:05 +00:00
fix(tpl): resolve broken assets on GitHub Pages subdirectory deployments
Add `actions/configure-pages` step to all template build workflows and pass the detected base_url to `hugo --baseURL`, so sites deployed to subdirectory paths (e.g. user.github.io/repo-name/) generate correct asset URLs. Also fix leading-slash relURL calls in slides layout that would ignore the baseURL path component.
This commit is contained in:
1 parent
26e1f775a2
commit
6a2f1ba2ae
9 files changed
+42
-10
No files matched your search
+5
-1
@@ -112,13 +112,17 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-hugo-resources-
|
||||
|
||||
- name: Setup Pages
|
||||
id: pages
|
||||
uses: actions/configure-pages@v5
|
||||
|
||||
- name: Build with Hugo
|
||||
env:
|
||||
HUGO_ENVIRONMENT: production
|
||||
HUGO_BLOX_LICENSE: ${{ secrets.HUGO_BLOX_LICENSE }}
|
||||
run: |
|
||||
echo "Hugo Cache Dir: $(hugo config | grep cachedir)"
|
||||
hugo --minify
|
||||
hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
|
||||
|
||||
- name: Generate Pagefind search index (if applicable)
|
||||
run: |
|
||||
|
||||
Reference in new issue
Block a user