-
Notifications
You must be signed in to change notification settings - Fork 8.1k
hugo: use render hooks for blockquotes (callouts/alerts) #20608
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
20c2734 to
3316ba1
Compare
cb17acb to
d36dbed
Compare
d36dbed to
ae4aeb4
Compare
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
The shortcut syntax is used by GitHub-style alerts and trigger a lint warning. Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
59c13cf to
4e6fafe
Compare
4e6fafe to
46ad127
Compare
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
Instead of inserting the raw file contents, use the page object. Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
46ad127 to
eb8614a
Compare
aevesdocker
approved these changes
Aug 16, 2024
This was referenced Aug 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/accounts
Relates to Docker accounts
area/admin
Relates to Docker Admin
area/api
Relates to Docker API docs
area/billing
area/build
Relates to Dockerfiles or docker build command
area/build-cloud
area/compose
Relates to docker-compose.yml spec or docker-compose binary
area/desktop
Issue affects a desktop edition of Docker. E.g docker for mac
area/engine
Issue affects Docker engine/daemon
area/extensions
Relates to Docker Extensions
area/get-started
Relates to get started and onboarding docs
area/hub
Issue affects Docker Hub
area/install
Relates to installing a product
area/release
Relates to CI or deployment
area/scout
Relates to Docker Scout
area/security
area/subscription
Relates to Docker pricing and subscription
area/swarm
Issue affects swarm and clustering functionality of docker
hugo
Updates related to hugo
status/review
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Trying out the new render hooks functionality for blockquotes in Hugo v0.132.0, for generating custom blockquotes markup to display callouts.
The new syntax for alerts is:
The alert types are hard-coded to be compatible with GitHub's alert types. The following alerts are supported:
notetipimportantwarningcautionThis is in contrast to the callouts we currently use, which are:
notetipimportantwarningexperimentalrestrictedExamples:
The new callouts do not use any custom CSS outside what's in the template, which is an improvement for maintainability. (The icon rendering with the CSS-only solution we use today is especially hacky.)
Appearance-wise, I have changed the callouts to align more with what they look like on GitHub too, e.g. removing the background color.
To migrate to these new alerts, we'd need to:
or add support in the render hook for these classes specifically and keep the current syntax**Note**etc but still defaulted to rendering as notes)