mirror of
https://github.com/welpo/tabi.git
synced 2025-10-10 23:38:53 +02:00
✨ feat: support Zola's native code block names (#489)
This commit is contained in:
parent
6837f6f4f1
commit
61793b2e56
23 changed files with 228 additions and 195 deletions
|
@ -62,9 +62,12 @@
|
|||
<script defer src="{{ get_url(path='js/copyCodeToClipboard.min.js', trailing_slash=false) | safe }}"></script>
|
||||
{%- endif -%}
|
||||
|
||||
{# JavaScript to use the "Show source or path" on code blocks shortcode: https://welpo.github.io/tabi/blog/shortcodes/#show-source-or-path #}
|
||||
{%- if macros_settings::evaluate_setting_priority(setting="add_src_to_code_block", page=page_s, section=section_s, default_global_value=false) == "true" -%}
|
||||
<script defer src="{{ get_url(path='js/addSrcToCodeBlock.min.js', trailing_slash=false) | safe }}"></script>
|
||||
{# JavaScript to make code block names clickable when they are URLs: https://welpo.github.io/tabi/blog/shortcodes/#show-source-or-path #}
|
||||
{# Note: "add_src_to_code_block" is deprecated in favor of "code_block_name_links". It will be removed in a future release. #}
|
||||
{# See https://github.com/welpo/tabi/pull/489 #}
|
||||
{%- if macros_settings::evaluate_setting_priority(setting="code_block_name_links", page=page_s, section=section_s, default_global_value=false) == "true"
|
||||
or macros_settings::evaluate_setting_priority(setting="add_src_to_code_block", page=page_s, section=section_s, default_global_value=false) == "true" -%}
|
||||
<script defer src="{{ get_url(path='js/codeBlockNameLinks.min.js', trailing_slash=false) | safe }}"></script>
|
||||
{%- endif -%}
|
||||
|
||||
{# Add backlinks to footnotes #}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue