How to render content from remote repositories using module.imports.mount in v0.105.0

I thought I understood go modules, but I am having real difficulty getting content dir’s mounted in a central repository.

I raised a PR against an existing module test repo to demonstrate:

Since modules have been around for quite a while I think there is something I am missing about the special handing of content vs the other directories Hugo uses, so hopefully I can help get this clarified.

See this example:
https://github.com/jmooring/hugo-content#usage

Thanks for the example - it works as expect with the below configs and really helps my sanity!

I’ll diff this against my own PR and my setup and see what I can learn.

[[module.imports]]
    path = "github.com/jmooring/hugo-content"
[[module.imports]]
    path = "github.com/jmooring/hugo-content"
[[module.imports.mounts]]
    source="content"
    target="content/jmooring"
[[module.imports]]
    path = "github.com/jmooring/hugo-content"
[[module.imports.mounts]]
    source="content/articles"
    target="content/jmooring"
[[module.imports]]
    path = "github.com/metafeather/hugo-content"
[[module.imports.mounts]]
    source="mycontent"
    target="content/metafeather"
1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.