Skip to content

fix hextra include-snippet example#377

Merged
carlosriosilva merged 2 commits intomasterfrom
examples
Apr 2, 2026
Merged

fix hextra include-snippet example#377
carlosriosilva merged 2 commits intomasterfrom
examples

Conversation

@arjunmehta-git
Copy link
Copy Markdown

@arjunmehta-git arjunmehta-git commented Apr 2, 2026

No description provided.

Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 11 to 13
```text
{{%/* hextra/include "examples/include-snippet" */%}}
{{%/* hextra/include "include-snippet" */%}}
```
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/).

Copilot uses AI. Check for mistakes.
**Example (included from a separate page):**

{{% hextra/include "examples/include-snippet" %}}
{{% hextra/include "include-snippet" %}}
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
{{% hextra/include "include-snippet" %}}
{{%/* hextra/include "include-snippet" */%}}

Copilot uses AI. Check for mistakes.
Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
@carlosriosilva carlosriosilva merged commit 75961d8 into master Apr 2, 2026
2 of 3 checks passed
@carlosriosilva carlosriosilva deleted the examples branch April 2, 2026 16:52
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

PR Preview Action v1.6.3
Preview removed because the pull request was closed.
2026-04-02 16:53 UTC

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants