pages/_includes/head.liquid
Doğaç Eldenk e6542e3f4b
fix tikzjax (#3477)
Fixes #3216 – TikZJax not working.

1. Changing SHA simply doesn't work, `window.tikzjax` is undefined and
it doesn't render anything.
2. I switched to the JS distributed by
[benrbray/tikzjax](https://github.com/benrbray/tikzjax/tree/develop),
added under `assets.js` to prevent future issues.
3. Documents now require to start with `\begin{document}`, should be a
simple fix.

<img width="789" height="341" alt="Screenshot 2026-01-24 at 1 10 39 PM"
src="https://github.com/user-attachments/assets/8272471d-df94-4118-a726-00ed09dcf1e8"
/>
<img width="780" height="380" alt="Screenshot 2026-01-24 at 1 06 13 PM"
src="https://github.com/user-attachments/assets/11284661-de15-4d57-a1d9-4959f562f826"
/>
2026-01-30 22:07:24 -03:00

198 lines
6.0 KiB
Plaintext

<!-- Metadata, OpenGraph and Schema.org -->
{% include metadata.liquid %}
<!-- Security: Content Security Policy -->
<!-- Permissive CSP suitable for academic websites. Allows external images, videos, and common embed services. -->
<!-- To customize for your needs, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta
http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self' 'unsafe-inline' https:; style-src 'self' 'unsafe-inline' https:; img-src 'self' data: https:; font-src 'self' data: https:; media-src 'self' https:; frame-src 'self' https:; connect-src 'self' https:;"
>
<!-- Bootstrap & MDB -->
<link rel="stylesheet" href="{{ '/assets/css/bootstrap.min.css' | relative_url | bust_file_cache }}">
<link
rel="stylesheet"
href="{{ site.third_party_libraries.mdb.url.css }}"
integrity="{{ site.third_party_libraries.mdb.integrity.css }}"
crossorigin="anonymous"
>
{% if page.pretty_table %}
<!-- Bootstrap Table -->
<link
defer
rel="stylesheet"
href="{{ site.third_party_libraries.bootstrap-table.url.css }}"
integrity="{{ site.third_party_libraries.bootstrap-table.integrity.css }}"
crossorigin="anonymous"
>
{% endif %}
<!-- Fonts & Icons -->
<link defer rel="stylesheet" href="{{ '/assets/css/academicons.min.css' | relative_url | bust_file_cache }}">
<link defer rel="stylesheet" href="{{ '/assets/css/scholar-icons.css' | relative_url | bust_file_cache }}">
<link
defer
rel="stylesheet"
type="text/css"
href="{{ site.third_party_libraries.google_fonts.url.fonts }}"
>
<!-- Code Syntax Highlighting -->
<link
defer
rel="stylesheet"
href="{{ '/assets/css/jekyll-pygments-themes-github.css' | relative_url | bust_file_cache }}"
media=""
id="highlight_theme_light"
>
{% if page.toc and page.toc.sidebar %}
<!-- Sidebar Table of Contents -->
<link defer href="{{ '/assets/css/bootstrap-toc.min.css' | relative_url | bust_file_cache }}" rel="stylesheet">
{% endif %}
<!-- Styles -->
{% if page.pseudocode %}
<!-- pseudocode -->
<link
defer
rel="stylesheet"
href="{{ site.third_party_libraries.pseudocode.url.css }}"
integrity="{{ site.third_party_libraries.pseudocode.integrity.css }}"
crossorigin="anonymous"
>
{% endif %}
{% if site.icon.size <= 4 %}
<link
rel="shortcut icon"
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>{{ site.icon }}</text></svg>"
>
{% elsif site.icon != blank %}
<link rel="shortcut icon" href="{{ site.icon | prepend: '/assets/img/' | relative_url | bust_file_cache}}">
{% endif %}
<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url | bust_css_cache }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
{% if site.enable_darkmode %}
<!-- Dark Mode -->
<script src="{{ '/assets/js/theme.js' | relative_url | bust_file_cache }}"></script>
<link
defer
rel="stylesheet"
href="{{ '/assets/css/jekyll-pygments-themes-native.css' | relative_url | bust_file_cache }}"
media="none"
id="highlight_theme_dark"
>
<script>
initTheme();
</script>
{% endif %}
{% if page.map %}
<!-- GeoJSON support via Leaflet -->
<link
defer
rel="stylesheet"
href="{{ site.third_party_libraries.leaflet.url.css }}"
integrity="{{ site.third_party_libraries.leaflet.integrity.css }}"
crossorigin="anonymous"
>
{% endif %}
{% if page.code_diff %}
<!-- diff2html -->
<link
defer
rel="stylesheet"
href="{{ site.third_party_libraries.highlightjs.url.css.light }}"
integrity="{{ site.third_party_libraries.highlightjs.integrity.css.light }}"
crossorigin="anonymous"
media="screen and (prefers-color-scheme: light)"
>
<link
defer
rel="stylesheet"
href="{{ site.third_party_libraries.highlightjs.url.css.dark }}"
integrity="{{ site.third_party_libraries.highlightjs.integrity.css.dark }}"
crossorigin="anonymous"
media="screen and (prefers-color-scheme: dark)"
>
<link
defer
rel="stylesheet"
href="{{ site.third_party_libraries.diff2html.url.css }}"
integrity="{{ site.third_party_libraries.diff2html.integrity.css }}"
crossorigin="anonymous"
>
{% endif %}
{% if page.images %}
{% if page.images.compare %}
<!-- Image comparison slider -->
<link
defer
rel="stylesheet"
href="{{ site.third_party_libraries.img-comparison-slider.url.css }}"
integrity="{{ site.third_party_libraries.img-comparison-slider.integrity.css }}"
crossorigin="anonymous"
>
{% endif %}
{% if page.images.lightbox2 %}
<!-- Lightbox2 -->
<link
defer
rel="stylesheet"
href="{{ site.third_party_libraries.lightbox2.url.css }}"
integrity="{{ site.third_party_libraries.lightbox2.integrity.css }}"
crossorigin="anonymous"
>
{% endif %}
{% if page.images.photoswipe %}
<!-- Photoswipe -->
<link
defer
rel="stylesheet"
href="{{ site.third_party_libraries.photoswipe.url.css }}"
crossorigin="anonymous"
>
{% endif %}
{% if page.images.slider %}
<!-- Image slider -->
<link
defer
rel="stylesheet"
href="{{ site.third_party_libraries.swiper.url.css }}"
integrity="{{ site.third_party_libraries.swiper.integrity.css }}"
crossorigin="anonymous"
>
{% endif %}
{% if page.images.spotlight %}
<!-- Spotlight -->
<link
defer
rel="stylesheet"
href="{{ site.third_party_libraries.spotlight.url.css }}"
integrity="{{ site.third_party_libraries.spotlight.integrity.css }}"
crossorigin="anonymous"
>
{% endif %}
{% if page.images.venobox %}
<!-- Venobox -->
<link
defer
rel="stylesheet"
href="{{ site.third_party_libraries.venobox.url.css }}"
integrity="{{ site.third_party_libraries.venobox.integrity.css }}"
crossorigin="anonymous"
>
{% endif %}
{% endif %}
{% if page.tikzjax %}
<link defer rel="stylesheet" type="text/css" href="{{ '/assets/css/tikzjax.min.css' | relative_url | bust_file_cache }}">
{% endif %}