The frontMatter.preview.host setting does not work in the manner that it is documented on this page. If I set that value to http://localhost:1313 as instructed (this is a hugo site), the preview attempts to load http://localhost:1313/pagename and gets a 404. Hugo's default permalink is /:section/:title/, though, which of course can be overridden in the configuration. Front Matter appears not to take that into account.
I have verified that the page does actually load at localhost:1313/section/pagename.
The `frontMatter.preview.host` setting does not work in the manner that it is documented on this page. If I set that value to `http://localhost:1313` as instructed (this is a hugo site), the preview attempts to load `http://localhost:1313/pagename` and gets a 404. Hugo's default permalink is `/:section/:title/`, though, which of course can be overridden in the configuration. Front Matter appears not to take that into account.
I have verified that the page does actually load at `localhost:1313/section/pagename`.
---
#### Document Details
⚠ *Do not edit this section*
* ID: site-preview
* URL: https://frontmatter.codes/docs/site-preview
* Content Source: /content/docs/site-preview.md
<!-- github-sync-id:1140487201 -->
Thanks @grahampcharles, that setting is to specify the base host location, if you want to further configure the sections/paths, you can check the following part of the documentation: https://frontmatter.codes/docs/content-types#preview-path
There are actually two other options to specify the path for your content:
Via the content type
Via the frontMatter.preview.pathName setting
Thanks @grahampcharles, that setting is to specify the base host location, if you want to further configure the sections/paths, you can check the following part of the documentation: https://frontmatter.codes/docs/content-types#preview-path
There are actually two other options to specify the path for your content:
1. Via the content type
2. Via the `frontMatter.preview.pathName` setting
<!-- github-comment-id:1042112301 -->
Thank you! That part of the documentation does not indicate how to use the equivalent of :section or :slug in the preview.pathName setting.
Since hugo already has a permalink setting, I'm curious as to why FM doesn't just use that? A separate previewPath setting seems duplicative (or maybe I'm missing something?).
Thank you! That part of the documentation does not indicate how to use the equivalent of :section or :slug in the `preview.pathName` setting.
Since hugo already has a `permalink` setting, I'm curious as to why FM doesn't just use that? A separate `previewPath` setting seems duplicative (or maybe I'm missing something?).
<!-- github-comment-id:1063242605 -->
FM is intended to work on any SSG, but it makes sense as well to retrieve settings from the SSG. Why FM doesn't use it yet? Just because you are the first that mentions it, so it would be a good enhancement to FM to be more SSG aware.
FM is intended to work on any SSG, but it makes sense as well to retrieve settings from the SSG. Why FM doesn't use it yet? Just because you are the first that mentions it, so it would be a good enhancement to FM to be more SSG aware.
<!-- github-comment-id:1063274275 -->
The CMS now has more capabilities to use front matter values in order for previews, and they can be defined on global, page folder, and content type levels.
The CMS now has more capabilities to use front matter values in order for previews, and they can be defined on global, page folder, and content type levels.
<!-- github-comment-id:2004413423 -->
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.
The
frontMatter.preview.hostsetting does not work in the manner that it is documented on this page. If I set that value tohttp://localhost:1313as instructed (this is a hugo site), the preview attempts to loadhttp://localhost:1313/pagenameand gets a 404. Hugo's default permalink is/:section/:title/, though, which of course can be overridden in the configuration. Front Matter appears not to take that into account.I have verified that the page does actually load at
localhost:1313/section/pagename.Document Details
⚠ Do not edit this section
Thanks @grahampcharles, that setting is to specify the base host location, if you want to further configure the sections/paths, you can check the following part of the documentation: https://frontmatter.codes/docs/content-types#preview-path
There are actually two other options to specify the path for your content:
frontMatter.preview.pathNamesettingThank you! That part of the documentation does not indicate how to use the equivalent of :section or :slug in the
preview.pathNamesetting.Since hugo already has a
permalinksetting, I'm curious as to why FM doesn't just use that? A separatepreviewPathsetting seems duplicative (or maybe I'm missing something?).FM is intended to work on any SSG, but it makes sense as well to retrieve settings from the SSG. Why FM doesn't use it yet? Just because you are the first that mentions it, so it would be a good enhancement to FM to be more SSG aware.
I see! Thank you for your response.
@grahampcharles we can keep the issue open, as this is a good enhancement for one of the upcoming version
The CMS now has more capabilities to use front matter values in order for previews, and they can be defined on global, page folder, and content type levels.