-
-
Notifications
You must be signed in to change notification settings - Fork 85
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: pageFolders "previewPath" setting doesn't seem to work #393
Labels
Comments
Thanks @michaeltlombardi, I'll investigate what is going on here. |
Thank you! Hugely appreciated! |
@michaeltlombardi found the issue. It had indeed to do with some Windows path parsing, and it got fixed. Feel free to test it out in the latest beta version. |
@estruyf confirmed, it's working! Thank you enormously for this fix, this is wayyyy easier to manage. 😊 |
Thanks @michaeltlombardi for confirming |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Despite setting the previewPath key in
frontmatter.content.pageFolders
, the preview for a page still opens to<frontMatter.preview.host>/<slug>
.To Reproduce
Steps to reproduce the behavior:
Add Front Matter to a hugo site
Define
frontMatter.preview.host
ashttp://localhost:1313
Define
frontmatter.content.pageFolders
as:Add
foo.md
in thecontent/posts
folderOpen
foo.md
and selectOpen preview
Get a 404 error and see the URL for the preview is
http://localhost:1313/foo
instead ofhttp://localhost:1313/posts/foo
.Expected behavior
When I set the previewPath option for a page folder, the pages in that folder should have the value of previewPath appended to the preview host before the page slug when I preview that page.
Screenshots
Desktop (please complete the following information):
Additional context
I did notice that if I set the previewPath for the
Post
content type infrontMatter.taxonomy.contentTypes
that works - but my problem is, for the rest of my content, it lives in subfolders of a single folder (in this case,games
, likegames/factions
,games/factions/supplements/coasts
, and so on), which would require me to redefine the content type over and over.With previewPath set on the content type, it does show the correct preview page. However, the URL seems malformed, showing
http://localhost:1313/posts\automated-factions
instead ofhttp://localhost:1313/posts/automated-factions
- presumably because I'm on Windows?I tried using the diagnostics and output terminal to see what was going on, but the output terminal only showed me an info message saying "Receiving message from webview to panel: open-preview" and the diagnostic info didn't include anything related to the content or folder specific preview settings.
I'm not clear if I've misconfigured something or misunderstood this feature. I saw #254 which implies a future feature for being able to leverage the SSG's own preview settings, which would likely resolve my entire problem, but I thought it worthwhile to file this issue as I would expect, even with that feature, that this override would function.
The text was updated successfully, but these errors were encountered: