Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with merged static mounts #12103

Closed
cmahnke opened this issue Feb 21, 2024 · 3 comments · Fixed by #12116
Closed

Issue with merged static mounts #12103

cmahnke opened this issue Feb 21, 2024 · 3 comments · Fixed by #12116

Comments

@cmahnke
Copy link

cmahnke commented Feb 21, 2024

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.123.1-3f8434a62fc91a50f4e5bd43a4435d2d301844ff+extended darwin/arm64 BuildDate=2024-02-21T08:17:45Z VendorInfo=brew

Does this issue reproduce with the latest release?

Yes

Description

Combined Mount setup like the following stopped working

Contents of the folders

  • static/images
    • header.svg
  • themes/PaperMod/images/
    • screenshot.png
[module]

  [[module.mounts]]
    source = "themes/PaperMod/images/screenshot.png"
    target = "static/images/screenshot.png"

  [[module.mounts]]
    source = "static"
    target = "static"

See Discourse #48374

Results

0.122.0

$ hugo-0.122.0
Start building sites …
hugo v0.122.0-b9a03bd59d5f71a529acb3e33f995e0ef332b3aa+extended darwin/arm64 BuildDate=2024-01-26T15:54:24Z

WARN  Dir layouts/partials/shortcodes/metadata not found

                   | EN  
-------------------+-----
  Pages            | 20  
  Paginator pages  |  0  
  Non-page files   |  0  
  Static files     |  2  
  Processed images |  0  
  Aliases          |  7  
  Sitemaps         |  1  
  Cleaned          |  0  

Total in 57 ms

$ ls public/images/
header.svg	screenshot.png

0.123.1

$ hugo
Start building sites …
hugo v0.123.1-3f8434a62fc91a50f4e5bd43a4435d2d301844ff+extended darwin/arm64 BuildDate=2024-02-21T08:17:45Z VendorInfo=brew

WARN  Dir layouts/partials/shortcodes/metadata not found

                   | EN  
-------------------+-----
  Pages            | 21  
  Paginator pages  |  0  
  Non-page files   |  0  
  Static files     |  1  
  Processed images |  0  
  Aliases          |  7  
  Cleaned          |  0  

Total in 54 ms
$ ls public/images/
screenshot.png

Reproduceable example

See https://github.com/cmahnke/hugo-test/tree/0.123.0-static

Further ideas

  • Maybe it's now depending on the order of the mounts? Shouldn't really matter.
@bep bep changed the title Combined (stacked) mounts don't work anymore Issue with merged static mounts Feb 21, 2024
@bep bep added v0.123.x and removed NeedsTriage labels Feb 21, 2024
@bep bep self-assigned this Feb 21, 2024
@bep bep added this to the v0.123.2 milestone Feb 21, 2024
@cmahnke
Copy link
Author

cmahnke commented Feb 21, 2024

@bep Please don't shoot me, if I'm wrong: IS it possible that this is also causing the remaining SCSS issues? There it's also possible that the search path for stylesheets is expected to be combined / merged from theme and site.

If not, please just ignore this comment.

@bep
Copy link
Member

bep commented Feb 21, 2024

If not, please just ignore this comment.

Done :-)

bep added a commit to bep/hugo that referenced this issue Feb 22, 2024
But note that the overlay file system is set up horizontally (project -> module1 -> module2), so I would not recommend too complex overlapping mount setups within the same module.

But this worked in v0.122.0, so we should fix it.

Fixes gohugoio#12103
bep added a commit that referenced this issue Feb 22, 2024
But note that the overlay file system is set up horizontally (project -> module1 -> module2), so I would not recommend too complex overlapping mount setups within the same module.

But this worked in v0.122.0, so we should fix it.

Fixes #12103
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants