Issue: Hugo module content directory can't be silenced #439

Closed
opened 2026-10-05 02:47:33 +02:00 by adam · 3 comments
Owner

My repository uses a Hugo module. Both repositories are cloned into their own folders and my VSCode workspace configuration adds both folders.

Both repositories have content directories. And the content from both directories turns up on the dashboard. I would like to have only the content directory of the kollitsch.dev directory showing up. Is there any way to make Front Matter do that? The modules content directory is more or less a testing website for the module itself, not something that is part of the implementing website.

I have the configuration in .frontmatter/config/content/pagefolders but it appears that Front Matter somehow copied it into the frontmatter.json file itself.

    {
      "path": "[[workspace]]/content",
      "title": "content",
      "originalPath": "[[workspace]]/content"
    },

This seems to be the culprit leading to both roots being referenced. Is there any way to reference a single "root folder"?

If not, it's possible to fix that using Hugo's configuration. The content folder in the module could be renamed testcontent and Frontmatter would (hopefully) ignore it. But I think somehow this might be useful.

[My repository](https://github.com/davidsneighbour/kollitsch.dev) uses a [Hugo module](https://github.com/davidsneighbour/hugo-blockify). Both repositories are cloned into their own folders and my [VSCode workspace configuration](https://github.com/davidsneighbour/kollitsch.dev/blob/main/workspace.code-workspace) adds both folders. Both repositories have `content` directories. And the content from both directories turns up on the dashboard. I would like to have only the content directory of the `kollitsch.dev` directory showing up. Is there any way to make Front Matter do that? The modules content directory is more or less a testing website for the module itself, not something that is part of the implementing website. I have the configuration in `.frontmatter/config/content/pagefolders` but it appears that Front Matter somehow copied it into the [frontmatter.json file](https://github.com/davidsneighbour/kollitsch.dev/blob/91119fe20924d78ff47d6178aa482ee184179620/frontmatter.json#L20) itself. ```json { "path": "[[workspace]]/content", "title": "content", "originalPath": "[[workspace]]/content" }, ``` This seems to be the culprit leading to both roots being referenced. Is there any way to reference a single "root folder"? If not, it's possible to fix that using Hugo's configuration. The `content` folder in the module could be renamed `testcontent` and Frontmatter would (hopefully) ignore it. But I think somehow this might be useful. <!-- github-sync-id:1645734247 -->
adam closed this issue 2026-10-05 02:47:33 +02:00
Author
Owner

There is another issue with the extended page folders being added to the main frontmatter.json file. I will fix that as well. This is because there needs to be a check implemented for filtering out the values that are extended.

The content folder with the workspace is something I need to validate.

There is another issue with the extended page folders being added to the main `frontmatter.json` file. I will fix that as well. This is because there needs to be a check implemented for filtering out the values that are extended. The content folder with the workspace is something I need to validate. <!-- github-comment-id:1488764360 -->
Author
Owner

The issue with the content folder is tricky, as the workspace doesn't differentiate between folders added to a workspace. The findFiles API from Visual Studio Code need to start from the root path, and weirdly enough, for a workspace, this is both in the "same" location. That is why you retrieve the content of both content folders.

Trying to think of a way to make sure it can only be retrieved from the location where the frontmatter.json file lives.

The issue with the `content` folder is tricky, as the workspace doesn't differentiate between folders added to a workspace. The findFiles API from Visual Studio Code need to start from the root path, and weirdly enough, for a workspace, this is both in the "same" location. That is why you retrieve the content of both content folders. Trying to think of a way to make sure it can only be retrieved from the location where the frontmatter.json file lives. <!-- github-comment-id:1488838058 -->
Author
Owner

Both of the issues got fixed

Both of the issues got fixed <!-- github-comment-id:1488848019 -->
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#439