I use the following config.yaml
file:
module:
mounts:
- source: content
target: content
- source: prebuild/public/company
target: content/company
When I execute hugo config mounts
: I got the default list as a result
(...) "mounts": [
{
"source": "content",
"target": "content"
},
{
"source": "data",
"target": "data"
},
{
"source": "layouts",
"target": "layouts"
},
{
"source": "i18n",
"target": "i18n"
},
{
"source": "archetypes",
"target": "archetypes"
},
{
"source": "assets",
"target": "assets"
},
{
"source": "static",
"target": "static"
}
]
Shouldn’t I be able to see my own config there?
For the full context, I’m trying to follow this article to build a hugo website over (pre)generated content: Toward using a Headless CMS with Hugo: Building Pages from an API | The New Dynamic
If any segment of a source
path does not exist, the path will not be mounted.
In the future, when posting to this forum, please use code fences when posting code. Or the little button that has the </>
symbol.
(code fences added, thanks for the feedback).
The source path exist, files in this source folder too, that why I’m not understanding why I don’t see it in the output of the hugo config mounts
command.
I’m not sure what you’re doing, but with v0.117.0 …
./
├── layouts/
│ └── _default/
│ ├── baseof.html
│ ├── home.html
│ ├── list.html
│ └── single.html
├── prebuild/
│ └── public/
│ └── company/
└── hugo.yaml
baseURL: 'https://example.org/'
languageCode: 'en-US'
title: 'mysite'
module:
mounts:
- source: content
target: content
- source: prebuild/public/company
target: content/company
$ hugo config mounts
{
"path": "project",
"version": "",
"time": "0001-01-01T00:00:00Z",
"owner": "",
"dir": "/home/jmooring/code/hugo-testing",
"mounts": [
{
"source": "prebuild/public/company",
"target": "content/company"
},
{
"source": "data",
"target": "data"
},
{
"source": "layouts",
"target": "layouts"
},
{
"source": "i18n",
"target": "i18n"
},
{
"source": "archetypes",
"target": "archetypes"
},
{
"source": "assets",
"target": "assets"
},
{
"source": "static",
"target": "static"
}
]
}
Thanks for the help. I rebuilt a project skeleton as you did, but I still have my default mounting (ie not taking my config). I suppose that’s where I need to investigate now.