docs: render emoji shortcodes on the documentation site - #141
Merged
Merged
Conversation
The Cache-Control directive tables use ✅ and ❌, which GitHub renders but the site printed as literal text because pymdownx.emoji was not enabled. Enable it with the Unicode output, so no images are loaded from a CDN.
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.
Problem
The Cache-Control directive tables in
docs/HTTP_CACHING.mdanddocs/README.zh-TW.mdmark support with:white_check_mark:and:x:. GitHub renders these shortcodes, but the documentation site printed them as literal text, becausepymdownx.emojiwas not enabled inzensical.toml.Change
Enable
pymdownx.emojiwith Zensical's twemoji index and thepymdownx.emoji.to_altgenerator. Shortcodes become the Unicode characters (✅ / ❌), so the site matches GitHub.I tried the
to_svggenerator first and did not keep it: it emits an<img>for every emoji loaded from cdn.jsdelivr.net, which adds a third-party request for two symbols.The Markdown sources are unchanged, so GitHub rendering is unaffected.
Verification
zensical build --strictpasses.HTTP_CACHING/andREADME.zh-TW/differ, and every difference is a shortcode turned into ✅/❌. Colon-delimited text such ascache:user:*is left alone.cdn.jsdelivr.netreference and no remaining literal:white_check_mark:text.