✨ feat: support Zola's native code block names#489
Merged
Conversation
Add support for Zola's native code block name syntax (```lang,name=file.rs```). URLs in names become clickable links. Deprecate custom shortcode in favor of native syntax. - Rename `add_src_to_code_block` setting to clickable_code_names (old name supported for compatibility) - Consolidate CSS - Update documentation - Rename JS
✅ Deploy Preview for tabi-demo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
1a7cea7 to
d728fad
Compare
welpo
added a commit
to welpo/tabi-start
that referenced
this pull request
Feb 15, 2025
This was referenced Feb 17, 2025
This was referenced Mar 3, 2025
This was referenced Mar 31, 2025
This was referenced Apr 14, 2025
This was referenced May 19, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds (CSS) support for Zola's native code block name syntax (
lang,name=file.rs) added in 0.20.0.URLs in names become clickable links through setting
code_block_name_links = true.Deprecates the custom shortcode in favor of the native syntax.
Changes
add_src_to_code_blocktocode_block_name_links(old name supported for compatibility)Accessibility
The clickable links maintain the same color contrast as before and are keyboard accessible. The URLs are visible to screen readers and maintain the same semantic structure.
Type of change
Checklist
theme.tomlwith a sane default for the featureconfig.tomlin tabi-startconfig.tomlcommentstheme.tomlcomments