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

Allow content mounts to be files #6684

Closed
bep opened this issue Dec 30, 2019 · 3 comments · Fixed by #6693
Closed

Allow content mounts to be files #6684

bep opened this issue Dec 30, 2019 · 3 comments · Fixed by #6693
Labels
Milestone

Comments

@bep
Copy link
Member

@bep bep commented Dec 30, 2019

I was trying to make a portable GitHub type of repo with render hooks and tried this:

[module]
  [[module.mounts]]
    source = "README.md"
    target = "content/_index.md"

This failed:

 Error building site: process: readAndProcessContent: walk: Readdir: fdopendir: not a directory
@bep bep added the Enhancement label Dec 30, 2019
@bep bep added this to the v0.62.1 milestone Dec 30, 2019
bep added a commit to bep/hugo that referenced this issue Dec 30, 2019
bep added a commit to bep/hugo that referenced this issue Dec 31, 2019
This commit is a general improvement of handling if single file mounts.

Fixes gohugoio#6684
bep added a commit to bep/hugo that referenced this issue Dec 31, 2019
This commit is a general improvement of handling if single file mounts.

Fixes gohugoio#6684
@bep

This comment has been minimized.

Copy link
Member Author

@bep bep commented Dec 31, 2019

OK, I've labeled this with Enhancement, but testing this it borderlines bug(s). The "file mount" was, I'll admit, accidental -- but very useful The main scope was mounting of directories.

The reason this come up now is https://github.com/bep/portable-hugo-links -- I have a WIP patch for this, but I'll need to test this some more (and add some more unit tests for it to make sure it works for more than the above case).

/cc @XhmikosR

@XhmikosR

This comment has been minimized.

Copy link
Contributor

@XhmikosR XhmikosR commented Dec 31, 2019

Actually it seems it currently works for us; it just fails with nested "empty" folders. So if the target folder exists, it works, but if not, it does fail silently.

This works for us right now:

https://github.com/twbs/bootstrap/blob/4ba7248308ab9cfc5c6e573fc40590fc4df093aa/config.yml#L39-L42

This is the only thing missing so that we switch to Hugo to handle copying all of all doc assets. I have a WIP PR twbs/bootstrap#29283

PS. I hope we are talking about the same thing; it's NYE and you know how it goes :)

bep added a commit to bep/hugo that referenced this issue Dec 31, 2019
This commit is a general improvement of handling if single file mounts.

Fixes gohugoio#6684
@bep

This comment has been minimized.

Copy link
Member Author

@bep bep commented Dec 31, 2019

@XhmikosR OK, I suspect it's mostly the /content thing that is broken in this scenario -- I just thought I'd inform you about this possibly relevant issue.

bep added a commit to bep/hugo that referenced this issue Dec 31, 2019
This commit is a general improvement of handling if single file mounts.

Fixes gohugoio#6684
bep added a commit to bep/hugo that referenced this issue Jan 1, 2020
This commit is a general improvement of handling if single file mounts.

Fixes gohugoio#6684
bep added a commit to bep/hugo that referenced this issue Jan 1, 2020
This commit is a general improvement of handling if single file mounts.

Fixes gohugoio#6684
Fixes gohugoio#6696
bep added a commit to bep/hugo that referenced this issue Jan 1, 2020
This commit is a general improvement of handling if single file mounts.

Fixes gohugoio#6684
Fixes gohugoio#6696
bep added a commit to bep/hugo that referenced this issue Jan 1, 2020
This commit is a general improvement of handling if single file mounts.

Fixes gohugoio#6684
Fixes gohugoio#6696
@bep bep closed this in #6693 Jan 1, 2020
bep added a commit that referenced this issue Jan 1, 2020
This commit is a general improvement of handling if single file mounts.

Fixes #6684
Fixes #6696
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.