Skip to content

fix: allow dotfiles in page artifacts#3364

Closed
daniiiol wants to merge 2 commits intogohugoio:masterfrom
daniiiol:patch-1
Closed

fix: allow dotfiles in page artifacts#3364
daniiiol wants to merge 2 commits intogohugoio:masterfrom
daniiiol:patch-1

Conversation

@daniiiol
Copy link
Contributor

@daniiiol daniiiol commented Feb 1, 2026

🐛 Problem

e.g. Files under /static/.well-known/ were not served on GitHub Pages, even though:

  • they exist in the repository (static/.well-known)
  • Hugo correctly copies them to public/.well-known
  • the site builds correctly locally

🔍 Root cause

The workflow used actions/upload-pages-artifact@v4, which internally excludes all dotfiles and dot-directories:

--exclude=".[^/]*"

As a result, public/.well-known was never included in the Pages artifact and therefore not deployed.

✅ Solution

The workflow was patched to create and upload the Pages artifact without excluding dotfiles, ensuring that .well-known is included in the deployed output.

No changes were required to Hugo configuration or project structure.

Optimization for creating page artifacts to also allow DotFiles to be added (e.g., /static/.well-known/)
@jmooring
Copy link
Member

jmooring commented Feb 1, 2026

Related:

There's no indication that the 3.01 => 4.0 update provides any tangible benefit. In my view the dot file restriction introduced in v4 was designed and implemented in a bit of a rush.

I've subscribed to the issue and PR's above; perhaps they'll add a config param for this. In the interim, could we simply change our documentation to show V3 instead of V4?

@daniiiol
Copy link
Contributor Author

daniiiol commented Feb 2, 2026

That would also be a solution for me. In any case, the current situation is unfortunate and not immediately apparent to everyone.

jmooring added a commit to jmooring/hosting-github-pages that referenced this pull request Feb 2, 2026
jmooring added a commit to jmooring/hosting-github-pages that referenced this pull request Feb 2, 2026
jmooring added a commit to jmooring/hugo-docs that referenced this pull request Feb 2, 2026
Closes gohugoio#3364

Co-authored-by: Daniel Scherrer <daniel.scherrer@webjoda.ch>
pull bot pushed a commit to Randy88-art/hugoDocs that referenced this pull request Feb 2, 2026
Closes gohugoio#3364

Co-authored-by: Daniel Scherrer <daniel.scherrer@webjoda.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants