Feedback: Hugo with partial content in modules vs. Dashboard #473

Closed
opened 2026-10-05 02:49:05 +02:00 by adam · 8 comments
Owner

Hi. I have a Hugo website and recently moved out a certain content folder (not ALL content) into a module where it is mounted via the following (config/_default/module.toml):

[[mounts]]
source = "documentation/"
target = "content/components"

The folder documentation in that module is mapped into my website's content/components folder, and Hugo does its thing with that.

What is working:

  • Hugo - the folder's contents appear on the website
  • single content file editing with Frontmatter - the frontmatter sidebar is there and working

What is not working:

  • the posts/pages from the mounted folder do not appear on the dashboard.

My configuration is scattered into folders, and the content folder config is this:

{
  "$schema": "https://frontmatter.codes/config/content.pagefolders.schema.json",
  "title": "Components",
  "path": "[[workspace]]/../hugo-modules/documentation",
  "contentTypes": ["component"]
}

I tried various path values ([[workspace]]/documentation, [[workspace]]/content/components, etc) with no luck.

My workspace looks like this:

|
|-kollitsch.dev (the website folder, also containing the workspace configuration)
|-hugo-modules (folder with the module(s)
|-hugo-theme (another module with the theme)

To test this you can clone the three repos into a folder next to each other, then open the workspace inside of kollitsch.dev.

It appears that [[workspace]] is relative to the location where the configuration is saved, not the "actual" workspace (one level above).

Is there any way to configure the content module into the dashboard using a relative path?

Hi. I have a Hugo website and recently moved out a certain content folder (not ALL content) into a module where it is mounted via the following (config/_default/module.toml): ```toml [[mounts]] source = "documentation/" target = "content/components" ``` The folder `documentation` in that module is mapped into my website's content/components folder, and Hugo does its thing with that. What is working: - Hugo - the folder's contents appear on the website - single content file editing with Frontmatter - the frontmatter sidebar is there and working What is not working: - the posts/pages from the mounted folder do not appear on the dashboard. My configuration is scattered into folders, and the content folder config is this: ```json { "$schema": "https://frontmatter.codes/config/content.pagefolders.schema.json", "title": "Components", "path": "[[workspace]]/../hugo-modules/documentation", "contentTypes": ["component"] } ``` I tried various path values (`[[workspace]]/documentation`, `[[workspace]]/content/components`, etc) with no luck. My workspace looks like this: | |-[kollitsch.dev](https://github.com/davidsneighbour/kollitsch.dev) (the website folder, also containing the workspace configuration) |-[hugo-modules](https://github.com/davidsneighbour/hugo-modules) (folder with the module(s) |-[hugo-theme](https://github.com/davidsneighbour/hugo-theme) (another module with the theme) To test this you can clone the three repos into a folder next to each other, then open the workspace inside of kollitsch.dev. It appears that `[[workspace]]` is relative to the location where the configuration is saved, not the "actual" workspace (one level above). Is there any way to configure the content module into the dashboard using a relative path? <!-- github-sync-id:1795308036 -->
adam closed this issue 2026-10-05 02:49:05 +02:00
Author
Owner

Hi @davidsneighbour, FM did not support this yet as it uses the workspace folder in which you added the frontmatter.json file.

A change is coming up to locate files outside the workspace folder. So if you use "[[workspace]]/../hugo-modules/documentation", it should correctly concat the file path to the absolute folder path.

Hi @davidsneighbour, FM did not support this yet as it uses the workspace folder in which you added the `frontmatter.json` file. A change is coming up to locate files outside the workspace folder. So if you use `"[[workspace]]/../hugo-modules/documentation"`, it should correctly concat the file path to the absolute folder path. <!-- github-comment-id:1630403145 -->
Author
Owner

I pushed out an update, let me know if it works in the latest beta.

I pushed out an update, let me know if it works in the latest beta. <!-- github-comment-id:1630422252 -->
Author
Owner

I will need to verify if I messed up my configuration, but it now shows a "no markdown to
show" error.

Selection_013

I will need to verify if I messed up my configuration, but it now shows a "no markdown to show" error. ![Selection_013](https://github.com/estruyf/vscode-front-matter/assets/83281/a9623d93-7b87-43fd-ad22-0d10591f36b6) <!-- github-comment-id:1630655797 -->
Author
Owner

This is how it shows up on my end (filter on components).

image

I didn't make any configuration change. I have cloned the main and modules project. Created a workspace with both projects and loaded the dashboard.

This is how it shows up on my end (filter on `components`). ![image](https://github.com/estruyf/vscode-front-matter/assets/2900833/bed7497d-98da-436c-9961-f17fef78a92a) I didn't make any configuration change. I have cloned the main and modules project. Created a workspace with both projects and loaded the dashboard. <!-- github-comment-id:1630688491 -->
Author
Owner

It seems to be an issue on Windows. 🫣

It seems to be an issue on Windows. 🫣 <!-- github-comment-id:1630699220 -->
Author
Owner

No, on Linux then ;) I am on Ubuntu.

No, on Linux then ;) I am on Ubuntu. <!-- github-comment-id:1630703441 -->
Author
Owner

Could you test out the latest beta to check if that would also fix it on your end? Version v8.5.5519848.

Could you test out the latest beta to check if that would also fix it on your end? Version `v8.5.5519848`. <!-- github-comment-id:1630728193 -->
Author
Owner

Perfect, all working :)

Perfect, all working :) <!-- github-comment-id:1630739582 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#473