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

Feedback: Hugo with partial content in modules vs. Dashboard #602

Closed
davidsneighbour opened this issue Jul 9, 2023 · 8 comments
Closed

Comments

@davidsneighbour
Copy link
Contributor

Hi. I have a Hugo website and recently moved out a certain content folder (not ALL content) into a module where it is mounted via the following (config/_default/module.toml):

[[mounts]]
source = "documentation/"
target = "content/components"

The folder documentation in that module is mapped into my website's content/components folder, and Hugo does its thing with that.

What is working:

  • Hugo - the folder's contents appear on the website
  • single content file editing with Frontmatter - the frontmatter sidebar is there and working

What is not working:

  • the posts/pages from the mounted folder do not appear on the dashboard.

My configuration is scattered into folders, and the content folder config is this:

{
  "$schema": "https://frontmatter.codes/config/content.pagefolders.schema.json",
  "title": "Components",
  "path": "[[workspace]]/../hugo-modules/documentation",
  "contentTypes": ["component"]
}

I tried various path values ([[workspace]]/documentation, [[workspace]]/content/components, etc) with no luck.

My workspace looks like this:

|
|-kollitsch.dev (the website folder, also containing the workspace configuration)
|-hugo-modules (folder with the module(s)
|-hugo-theme (another module with the theme)

To test this you can clone the three repos into a folder next to each other, then open the workspace inside of kollitsch.dev.

It appears that [[workspace]] is relative to the location where the configuration is saved, not the "actual" workspace (one level above).

Is there any way to configure the content module into the dashboard using a relative path?

@estruyf
Copy link
Owner

estruyf commented Jul 11, 2023

Hi @davidsneighbour, FM did not support this yet as it uses the workspace folder in which you added the frontmatter.json file.

A change is coming up to locate files outside the workspace folder. So if you use "[[workspace]]/../hugo-modules/documentation", it should correctly concat the file path to the absolute folder path.

@estruyf
Copy link
Owner

estruyf commented Jul 11, 2023

I pushed out an update, let me know if it works in the latest beta.

@davidsneighbour
Copy link
Contributor Author

I will need to verify if I messed up my configuration, but it now shows a "no markdown to
show" error.

Selection_013

@estruyf
Copy link
Owner

estruyf commented Jul 11, 2023

This is how it shows up on my end (filter on components).

image

I didn't make any configuration change. I have cloned the main and modules project. Created a workspace with both projects and loaded the dashboard.

@estruyf
Copy link
Owner

estruyf commented Jul 11, 2023

It seems to be an issue on Windows. 🫣

@davidsneighbour
Copy link
Contributor Author

No, on Linux then ;) I am on Ubuntu.

estruyf added a commit that referenced this issue Jul 11, 2023
@estruyf
Copy link
Owner

estruyf commented Jul 11, 2023

Could you test out the latest beta to check if that would also fix it on your end? Version v8.5.5519848.

@davidsneighbour
Copy link
Contributor Author

Perfect, all working :)

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

No branches or pull requests

2 participants