fix hextra include-snippet example#377
Conversation
Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
There was a problem hiding this comment.
Pull request overview
This PR updates the Hextra include shortcode documentation example to reference a different include target path.
Changes:
- Update the commented shortcode syntax example to use
"include-snippet"instead of"examples/include-snippet". - Update the rendered shortcode example to use
"include-snippet"instead of"examples/include-snippet".
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```text | ||
| {{%/* hextra/include "examples/include-snippet" */%}} | ||
| {{%/* hextra/include "include-snippet" */%}} | ||
| ``` |
There was a problem hiding this comment.
The referenced include target include-snippet does not appear to exist as a Hugo content page in this repository (there’s no content/**/include-snippet*). The only matching file is static/examples/include-snippet/index.md, which Hugo won’t treat as a page. If hextra/include uses .Site.GetPage/.Page.GetPage, this example will fail to resolve unless the snippet is moved/added under content/ (or the shortcode is documented as reading from static/).
| **Example (included from a separate page):** | ||
|
|
||
| {{% hextra/include "examples/include-snippet" %}} | ||
| {{% hextra/include "include-snippet" %}} |
There was a problem hiding this comment.
This live shortcode invocation will try to include include-snippet at build time. In the current tree there isn’t a corresponding content page, so rendering this page (e.g., with --buildDrafts) is likely to error. Consider adding the snippet under content/ (e.g., content/.../include-snippet/index.md) or updating the parameter/path to the actual resolvable location.
| {{% hextra/include "include-snippet" %}} | |
| {{%/* hextra/include "include-snippet" */%}} |
Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
|
No description provided.