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

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

Closed
davidsneighbour opened this issue Mar 29, 2023 · 3 comments
Closed

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

davidsneighbour opened this issue Mar 29, 2023 · 3 comments
Labels

Comments

@davidsneighbour
Copy link

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.

@davidsneighbour davidsneighbour added the bug Something isn't working label Mar 29, 2023
@estruyf
Copy link
Owner

estruyf commented Mar 29, 2023

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.

@estruyf
Copy link
Owner

estruyf commented Mar 29, 2023

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.

@estruyf
Copy link
Owner

estruyf commented Mar 29, 2023

Both of the issues got fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants