{#- Theme Switcher Button to toggle between dark/light #} {%- macro theme(config) %} {%- if config.extra.js_theme %} {%- if config.extra.js_themeButton or config.extra.js_bundle %} {%- endif %} {%- endif %} {%- endmacro %} {%- macro stylesheets(config) %} {%- if config.extra.stylesheets %}{%- for i in config.extra.stylesheets %} {%- endfor %}{%- endif %} {%- endmacro %} {%- macro stylesheets_preload(config) %} {%- if config.extra.fonts %}{%- for i in config.extra.fonts %} {%- if i.url is matching("^http[s]?://") %} {%- else %} {%- endif %} {%- endfor %}{%- endif %} {%- if config.extra.fontawesome %} {%- endif %} {%- if config.extra.math or page.extra.math %} {%- if config.extra.katex_css %}{%- if config.extra.katex_css is matching("^http[s]?://") %} {%- else %} {%- endif %}{%- endif %} {%- endif %} {%- endmacro %} {%- macro feed(config) %} {%- if config.generate_feed %} {%- endif %} {%- endmacro %} {%- macro js(config) %} {%- set preStyle = false %} {%- if config.extra.fonts %}{%- for i in config.extra.fonts %} {%- if i.url is matching("^http[s]?://") %} {%- set preStyle = true %} {%- endif %} {%- endfor %}{%- endif %} {%- if config.extra.fontawesome %} {%- set preStyle = true %} {%- endif %} {%- if config.extra.math or page.extra.math %} {%- if config.extra.katex_css %} {%- set preStyle = true %} {%- endif %} {%- endif %} {%- if config.extra.js_bundle and config.build_search_index or config.extra.js_bundle and config.extra.search_library %} {%- if config.extra.js_search_facade %} {#- dont load the index #} {%- elif config.extra.search_library == "tinysearch" or config.extra.search_library == "stork" %} {#- dont load the index #} {%- elif config.extra.js_search_index %} {%- endif %} {%- if not config.extra.js_search_facade %} {%- if config.extra.js_switcher %} {%- else %} {%- endif %} {%- elif config.extra.search_library == "tinysearch" %} {%- elif config.extra.search_library == "stork" %} {%- else %} {%- endif %} {%- elif config.build_search_index or config.extra.search_library %} {#- no bundle #} {%- if preStyle == true %} {%- if config.extra.js_prestyle %} {%- endif %} {%- endif %} {%- if config.extra.js_theme %} {%- if config.extra.js_themeButton %} {%- endif %} {%- endif %} {%- if config.extra.js_email %} {%- if config.extra.social.mail_encode %} {%- endif %} {%- endif %} {%- if config.extra.js_codecopy %} {%- endif %} {%- if config.extra.js_search_facade %} {%- if config.extra.search_library %} {%- if config.extra.search_library == "tinysearch" %} {%- elif config.extra.search_library == "stork" %} {%- endif %} {%- endif %} {%- endif %} {%- if config.extra.js_search_facade or config.extra.search_library %} {#- dont load the index/search #} {%- elif config.extra.js_search_index %} {%- endif %} {%- if config.extra.js_search_facade %} {#- dont load the index/search #} {%- else %} {%- if config.extra.search_library == "tinysearch" %} {%- elif config.extra.search_library == "stork" %} {%- else %} {%- endif %} {%- endif %} {%- elif config.extra.js_bundle %} {#- no search #} {%- else %} {#- no bundle or search #} {%- if preStyle == true %} {%- if config.extra.js_prestyle %} {%- endif %} {%- endif %} {%- if config.extra.js_theme %} {%- if config.extra.js_themeButton or config.extra.js_bundle %} {%- endif %} {%- endif %} {%- if config.extra.js_email %} {%- if config.extra.social.mail_encode %} {%- endif %} {%- endif %} {%- if config.extra.js_codecopy %} {%- endif %} {%- endif %} {#- https://katex.org/docs/autorender.html #} {#- https://github.com/KaTeX/KaTeX/ #} {#- https://github.com/KaTeX/KaTeX/tree/main/contrib/mathtex-script-type/ #} {%- if config.extra.math or page.extra.math %} {%- if config.extra.katex_bundle %} {%- else %} {%- if config.extra.katex_js %}{%- if config.extra.katex_js is matching("^http[s]?://") %} {%- else %} {%- endif %}{%- endif %} {%- if config.extra.mathtex_js %}{%- if config.extra.mathtex_js is matching("^http[s]?://") %} {%- else %} {%- endif %}{%- endif %} {%- if config.extra.math_auto_render or page.extra.math_auto_render %} {%- if config.extra.katex_autorender_js %} {%- if config.extra.katex_autorender_js is matching("^http[s]?://") %} {%- else %} {%- endif %} {%- endif %} {%- endif %} {%- endif %} {%- endif %} {%- endmacro %} {%- macro favicons(config) %} {%- if config.extra.favicon_theme_color %} {%- endif %} {%- if config.extra.favicon_ms_color %} {%- endif %} {%- if config.extra.favicon_webmanifest %} {%- endif %} {%- if config.extra.favicon_mask and config.extra.favicon_mask_color %} {%- endif %} {%- if config.extra.favicon180 %} {%- endif %} {%- if config.extra.favicon32 %} {%- endif %} {%- if config.extra.favicon16 %} {%- endif %} {%- endmacro %} {%- macro security(config) %} {%- if config.extra.security_header_referrer %} {%- endif %} {%- if config.extra.security_header_csp %} {%- endif %} {%- endmacro %} {#- type: website or article, generally setting article for blog articles -#} {#- page_images: using for the blog single template page -#} {#- page_section: the blog single template page have to pass the parameter -#} {#- is_404: using for the 404.html template -#} {%- macro seo( config, title="", title_addition="", description="", type="website", is_home=false, is_404=false, is_page=false, page_images="", page_section="", created_time="2021-07-04T07:07:00-07:00", updated_time="2021-07-04T07:07:00-07:00" ) %} {%- if is_404 -%} {%- else -%} {%- endif -%} {%- if current_url %} {%- set page_url = current_url %} {%- else %} {%- set page_url = get_url(path="404.html", trailing_slash=true) %} {%- endif %}