estruyf / vscode-front-matter

Front Matter is a CMS running straight in Visual Studio Code. Can be used with static site generators like Hugo, Jekyll, Hexo, NextJs, Gatsby, and many more...
https://frontmatter.codes
MIT License
1.86k stars 70 forks source link

Issue: Unable to select virtual workspace folder when using Github repositories extension to open a Github repository #761

Open devgid opened 4 months ago

devgid commented 4 months ago

Describe the bug I am using Github repositories vscode extension that uses github repo as a virtual workspace Read here: https://code.visualstudio.com/api/extension-guides/virtual-workspaces

However I get error To Reproduce Steps to reproduce the behavior:

  1. Open a repo using Github Repositories vscode extension (or github.dev should also work)
  2. Click on Open dashboard
  3. You cannot register content folder as you are unable to select a content folder
  4. Click on Create Content button: It says No Page folders were configured
  5. As a workaround copy the frontmatter files including the frontmatter.json file from a non virtual workspace vscode project to this project.
  6. Edit the json file manually to the correct folders
  7. However this workaround doesn't work. You still get "No Page folders were configured" in all the various buttons and dashboard.

Expected behavior basic functionality like view the dashboard, add content and refresh for content should work with virtual workspace. That allows you to at least capture information using remote repositories or github.dev.

Screenshots image "+" button does nothing image

Desktop (please complete the following information):

estruyf commented 4 months ago

Hi @devgid, I have yet to try this.

Can you register folders the following way:

Let me know if that works.

devgid commented 4 months ago

@estruyf If I right click on folder and select register folder it gives me two messages displayed underneath each other image image

However the dashboard does show now and I can click on Create Content button which creates an open markdown file but this does not appear in my virtual workspace folder nor my source control changes. The file frontmatter.json does also not show in my virtual workspace folder nor my source control changes.

Despite the markdown file being created the dashboard still shows as "No Markdown to show" even when clicking the Refresh Icon. The created markdown file is oddly located in new created local drive folders C:\VirtualWorkspaceGitHubUsername\VirtuallWorkspacename\ where .frontmatter and frontmatter.json is also created. The new markdown file created: C:\VirtualWorkspaceGitHubUsername\VirtuallWorkspacename\FolderRegisteredName\Markdownfilecreated.md

In it the frontmatter.json file display the pageFolders as following image

devgid commented 4 months ago

If you want to test yourself you can install this extension https://marketplace.visualstudio.com/items?itemName=GitHub.remotehub and add a remote Github repository from the Remote Explorer sidebar icon.

estruyf commented 4 months ago

The extension doesn't yet support virtual workspaces. We'll have to look into the amount of work to get it supported.