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

Enhancement: Exclude content from subfolders? #174

Closed
estruyf opened this issue Nov 10, 2021 Discussed in #172 · 3 comments
Closed

Enhancement: Exclude content from subfolders? #174

estruyf opened this issue Nov 10, 2021 Discussed in #172 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@estruyf
Copy link
Owner

estruyf commented Nov 10, 2021

Add the option to exclude sub-directories.

@iveptawebadmin Thanks for opening the discussion. Let us follow it up here as this will become an enhancement to the CMS.

Discussed in #172

Originally posted by iveptawebadmin November 9, 2021
On my Hugo site, many of my pages like about.md, contact.md, etc. are in the root of my content directory.
Then I have subdirectories for subsections of the site like blog, events, etc. that have pages within them.

I would like the root content pages to be shown in a 'Pages' section, and then news posts to be in a 'News' section and so on.
Is there a way to set this up so that the 'Pages' folder does not look into any of the subdirectories within the content directory?

"frontMatter.content.pageFolders": [
    {
      "title": "Pages",
      "path": "[[workspace]]/content"
    },
    {
      "title": "News",
      "path": "[[workspace]]/content/news"
    }
  ],

Right now the 'Pages' folder has all the files from every subdirectory within content.

@estruyf estruyf added the enhancement New feature or request label Nov 10, 2021
@estruyf estruyf added this to the 5.5.0 milestone Nov 10, 2021
@estruyf
Copy link
Owner Author

estruyf commented Nov 10, 2021

@iveptawebadmin thanks for asking this. You will be able with version 5.5.0 of the extension to specify an extra excludeSubdir property for the pages folder.

"frontMatter.content.pageFolders": [
    {
      "title": "Pages",
      "path": "[[workspace]]/content",
      "excludeSubdir": true
    },
    {
      "title": "News",
      "path": "[[workspace]]/content/news"
    }
  ],

You'll be able to test it out with the latest beta version: https://frontmatter.codes/docs/getting-started#beta-version

@iveptawebadmin
Copy link

Are you automatically pushing out updates to Open VSX on these updates to 'Beta'?

@estruyf
Copy link
Owner Author

estruyf commented Nov 12, 2021

@iveptawebadmin yes. It is part of the same release flow. If a main (with the upcoming version) or beta version is released, it gets published to both.

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

No branches or pull requests

2 participants