Commit Graph

4 Commits (release-1.33)

Author SHA1 Message Date
eunjeong Park 2e9cbbbcec Add fallback to default language for code_sample shortcode
This imporves internationalization support by falling back to the default
language's examples when a translation doesn't exist, prevention build errors
for missing localized code samples.

- Refactor code_sample.html to handle missing files more gracefully
- Move filename generation to scratch variable for reusability
- Add fallback logic to try default language when file not found in current language
- Reorganize source lookup flow with proper conditional blocks
- Maintain existing ghlink generation with updated filename variable
2025-08-16 12:45:44 +09:00
Tim Bannister 2b498d9bfb Make tooltip localizable
Allow localizations to customize the tooltip for copying code samples to
the clipboard.
2024-05-14 01:09:39 +01:00
Tim Bannister 9e128e3fc7 Reimplement code_sample shortcode
Use Hugo Pipes for the icon asset pipeline, and avoid inline styling.
2024-05-14 01:09:38 +01:00
Mengjiao Liu 234458f2e3 Add code_sample shortcode to replace code shortcode 2023-09-05 16:45:35 +08:00