-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Shortcode add highlight options #52795
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
base: main
Are you sure you want to change the base?
Shortcode add highlight options #52795
Conversation
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
lmktfy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR.
This should be 2 commits and ideally it wouldn't include commit fe845b0.
- add the shortcode (first commit)
- use the shortcode (second commit)
Alternatively, omit the second commit but show reviewers how they can test it out. A follow up PR can set highlighting options for some content.
fe845b0 to
4f3eca8
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
4f3eca8 to
5b4cbe3
Compare
Thanks for the feedback. And added a follow up PR for reviewers to easily test. |
|
/remove-language zh |
|
follow-up PR will demonstrate usage #52837 |
Description
Adds an options parameter to the code_sample shortcode and forwards it to Hugo’s highlight function. This enables linenos, hl_lines, and other highlight features when including external files without changing existing calls.
follow-up PR will demonstrate usage #52837
Before:
After:
Preview
old:
new:
Closes: #