When "frontMatter.content.publicFolder" is set both in workspace.code-workspace and frontmatter.json, the setting is not taken into account, and the Media tab of the dashboard display the contents of the "content" folder of the workspace, not the root folder (as is the default when the setting is not set).
Steps to reproduce the behavior:
Add "frontMatter.content.publicFolder": "static" to frontmatter.json and workspace.code-workspace
May the the path of the content folder ('content' for Hugo)
Click on Dashboard : Media tab
The content of 'content' are displayed, not of 'static' or of the project root (as when publicFolder is not set).
Expected behavior
A alert should be seen about the setting confusion ? and the media tab should display the 'static' folder contents..
Desktop (please complete the following information):
OS: Ubuntu 22.04 Jammy
Visual Code 1.67.2
Frontmatter v7.3.1
When "frontMatter.content.publicFolder" is set both in workspace.code-workspace and frontmatter.json, the setting is not taken into account, and the Media tab of the dashboard display the contents of the "content" folder of the workspace, not the root folder (as is the default when the setting is not set).
Steps to reproduce the behavior:
1. Add `"frontMatter.content.publicFolder": "static"` to `frontmatter.json` and `workspace.code-workspace`
2. May the the path of the content folder ('content' for Hugo)
3. Click on Dashboard : Media tab
4. The content of 'content' are displayed, not of 'static' or of the project root (as when publicFolder is not set).
**Expected behavior**
A alert should be seen about the setting confusion ? and the media tab should display the 'static' folder contents..
**Desktop (please complete the following information):**
- OS: Ubuntu 22.04 Jammy
- Visual Code 1.67.2
- Frontmatter v7.3.1
<!-- github-sync-id:1252275232 -->
The workspace.code-workspace and settings.json settings will override what you have set in the frontmatter.json file because these files are not always shared with the team.
I've just done some testing, but cannot reproduce the issue. What I have is the following:
Create a workspace
Add the frontMatter.content.publicFolder to the workspace.code-workspace file
Open the media dashboard, check if the media folder is available
Contents of frontmatter.json file
Settings
Media dashboard output
Setting update in the workspace file
Settings
Media dashboard output
In the workspace setting, I defined a sub-folder to show the difference and make sure it works correctly.
Questions
Do you see any difference in your configuration?
Would you be able to share more details of your configuration?
The `workspace.code-workspace` and `settings.json` settings will override what you have set in the `frontmatter.json` file because these files are not always shared with the team.
I've just done some testing, but cannot reproduce the issue. What I have is the following:
- Create a workspace
- Add the `frontMatter.content.publicFolder` to the `workspace.code-workspace` file
- Open the media dashboard, check if the media folder is available
## Contents of frontmatter.json file
### Settings

### Media dashboard output

## Setting update in the workspace file
### Settings

### Media dashboard output

> In the workspace setting, I defined a sub-folder to show the difference and make sure it works correctly.
## Questions
1. Do you see any difference in your configuration?
2. Would you be able to share more details of your configuration?
<!-- github-comment-id:1140833780 -->
Hi, here is my code workspace and frontmatter.json that triggered the issue. I don't know the exact trigger for the issue, but the publicFolder setting was the one that was ignored.
It is quite a playground for me , so pardon me any horror. The issue has shown up on two or three distinct computers, so it should be linked to these two files.
.
Hi, here is my code workspace and frontmatter.json that triggered the issue. I don't know the exact trigger for the issue, but the publicFolder setting was the one that was ignored.
[code-workspace-frontmatter.zip](https://github.com/estruyf/vscode-front-matter/files/8798118/code-workspace-frontmatter.zip)
It is quite a playground for me , so pardon me any horror. The issue has shown up on two or three distinct computers, so it should be linked to these two files.
.
<!-- github-comment-id:1141069677 -->
Thanks @landure - Just tested your configuration on one of my projects, and I don't see anything weird happening.
What does your folder structure look like?
Do you have a folder named static at the root of your project?
Thanks @landure - Just tested your configuration on one of my projects, and I don't see anything weird happening.
1. What does your folder structure look like?
2. Do you have a folder named `static` at the root of your project?
<!-- github-comment-id:1141725493 -->
Yes, my folder structure is a relatively standard Hugo website. I played a lot with the content folder, but the root of the site is quite basic. Here it is:
archetypes
assets
config.yaml
content
data
.frontmatter
frontmatter.json
.git
.gitignore
.gitmodules
howto.biapy.com.code-workspace
.hugo_build.lock
layouts
public
resources
static
themes
.vale
.vale.ini
.vscode
Hope this help figuring where the issue came from. The folder is shared between computers using Seafile (a Dropbox self hosted equivalent), and the issue appeared on a newly install computer with a new VSCode installation after syncing the sites contents to the new computer and opening the workspace with VSCode. The real trick is that the media tab was showing the content folder instead of the root of the site sources.
Yes, my folder structure is a relatively standard Hugo website. I played a lot with the content folder, but the root of the site is quite basic. Here it is:
- archetypes
- assets
- config.yaml
- content
- data
- .frontmatter
- frontmatter.json
- .git
- .gitignore
- .gitmodules
- howto.biapy.com.code-workspace
- .hugo_build.lock
- layouts
- public
- resources
- static
- themes
- .vale
- .vale.ini
- .vscode
Hope this help figuring where the issue came from. The folder is shared between computers using Seafile (a Dropbox self hosted equivalent), and the issue appeared on a newly install computer with a new VSCode installation after syncing the sites contents to the new computer and opening the workspace with VSCode. The real trick is that the media tab was showing the content folder instead of the root of the site sources.
<!-- github-comment-id:1142231739 -->
The media dashboard will, of course, show media files from the content folder if page bundles are used. As you can see above, folders with a C, are coming from the content folder.
That said, it still doesn't explain why in your case you don't see anything from the static folder when it is defined in your configuration.
Would you be able to give me temporary access? Feel free to contact me at elio@struyfconsulting.be to keep these things private.
The media dashboard will, of course, show media files from the content folder if page bundles are used. As you can see above, folders with a **C**, are coming from the content folder.
That said, it still doesn't explain why in your case you don't see anything from the `static` folder when it is defined in your configuration.
Would you be able to give me temporary access? Feel free to contact me at `elio@struyfconsulting.be` to keep these things private.
<!-- github-comment-id:1142454071 -->
I think I understand what happened, and why it was troubling me. I've just found my image folder in the media tab, with all my contents folders.
As you can see in the screenshot, there is no separation between the last folder (image folder from static (publicFolder)) and the folders (hugo sections) from content.
Since I have many sections, i completely overlooked the image folder.
So the publicFolder setting is taken into account, but since there is no visible separation for media sources (and I think that the fact that the content folder is in media should be configurable, not just automatic if page bundles are available) , i didn't find immediately the image folder.
Thank you for your help. The issue is more a UI problem than a configuration issue.
I think I understand what happened, and why it was troubling me. I've just found my image folder in the media tab, with all my contents folders.

As you can see in the screenshot, there is no separation between the last folder (image folder from static (publicFolder)) and the folders (hugo sections) from content.
Since I have many sections, i completely overlooked the image folder.
So the publicFolder setting is taken into account, but since there is no visible separation for media sources (and I think that the fact that the content folder is in media should be configurable, not just automatic if page bundles are available) , i didn't find immediately the image folder.
Thank you for your help. The issue is more a UI problem than a configuration issue.
<!-- github-comment-id:1142544874 -->
@landure would this view make it easier?

<!-- github-comment-id:1143408411 -->
Released a beta version with the following view:

<!-- github-comment-id:1143504350 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
When "frontMatter.content.publicFolder" is set both in workspace.code-workspace and frontmatter.json, the setting is not taken into account, and the Media tab of the dashboard display the contents of the "content" folder of the workspace, not the root folder (as is the default when the setting is not set).
Steps to reproduce the behavior:
"frontMatter.content.publicFolder": "static"tofrontmatter.jsonandworkspace.code-workspaceExpected behavior
A alert should be seen about the setting confusion ? and the media tab should display the 'static' folder contents..
Desktop (please complete the following information):
The
workspace.code-workspaceandsettings.jsonsettings will override what you have set in thefrontmatter.jsonfile because these files are not always shared with the team.I've just done some testing, but cannot reproduce the issue. What I have is the following:
frontMatter.content.publicFolderto theworkspace.code-workspacefileContents of frontmatter.json file
Settings
Media dashboard output
Setting update in the workspace file
Settings
Media dashboard output
Questions
Hi, here is my code workspace and frontmatter.json that triggered the issue. I don't know the exact trigger for the issue, but the publicFolder setting was the one that was ignored.
code-workspace-frontmatter.zip
It is quite a playground for me , so pardon me any horror. The issue has shown up on two or three distinct computers, so it should be linked to these two files.
.
Thanks @landure - Just tested your configuration on one of my projects, and I don't see anything weird happening.
staticat the root of your project?Yes, my folder structure is a relatively standard Hugo website. I played a lot with the content folder, but the root of the site is quite basic. Here it is:
Hope this help figuring where the issue came from. The folder is shared between computers using Seafile (a Dropbox self hosted equivalent), and the issue appeared on a newly install computer with a new VSCode installation after syncing the sites contents to the new computer and opening the workspace with VSCode. The real trick is that the media tab was showing the content folder instead of the root of the site sources.
The media dashboard will, of course, show media files from the content folder if page bundles are used. As you can see above, folders with a C, are coming from the content folder.
That said, it still doesn't explain why in your case you don't see anything from the
staticfolder when it is defined in your configuration.Would you be able to give me temporary access? Feel free to contact me at
elio@struyfconsulting.beto keep these things private.I think I understand what happened, and why it was troubling me. I've just found my image folder in the media tab, with all my contents folders.
As you can see in the screenshot, there is no separation between the last folder (image folder from static (publicFolder)) and the folders (hugo sections) from content.
Since I have many sections, i completely overlooked the image folder.
So the publicFolder setting is taken into account, but since there is no visible separation for media sources (and I think that the fact that the content folder is in media should be configurable, not just automatic if page bundles are available) , i didn't find immediately the image folder.
Thank you for your help. The issue is more a UI problem than a configuration issue.
Oh great to hear @landure you found the issue. Let us figure out how this can be made better.
@landure would this view make it easier?
Released a beta version with the following view:
Thank you for your work, it is a clear organization.