pages/_layouts/distill.liquid
Jacob Austin 10d007a98c
Allows for standard Jekyll code highlighting with distill template (#3002)
As described in https://github.com/alshedivat/al-folio/issues/300,
standard Markdown code highlighting doesn't work in the Distill template
because it is clobbered by the Distill "Prism" syntax highlighting. This
PR will allow d-code tags (distill-specific code tags) to function with
the Distill syntax highlighter, but will default `highlight` and
Markdown code blocks to use the Jekyll/Rouge highlighter.

This PR also removes overrides.js, which is currently broken because
jquery isn't loaded.
2025-02-12 18:47:57 -03:00

114 lines
3.3 KiB
Plaintext

<!doctype html>
<html>
<head>
{% include head.liquid %}
<!-- Distill js -->
<script src="{{ '/assets/js/distillpub/template.v2.js' | relative_url }}"></script>
<script src="{{ '/assets/js/distillpub/transforms.v2.js' | relative_url }}"></script>
{% if page._styles %}
<!-- Page/Post style -->
<style type="text/css">
{{ page._styles }}
</style>
{% endif %}
</head>
<d-front-matter>
<script async type="text/json">
{
"title": "{{ page.title }}",
"description": "{{ page.description }}",
"published": "{{ page.date | date: '%B %d, %Y' }}",
"authors": [
{% for author in page.authors %}
{
"author": "{{ author.name }}",
"authorURL": "{{ author.url }}",
"affiliations": [
{
"name": "{{ author.affiliations.name }}",
"url": "{{ author.affiliations.url }}"
}
]
}{% if forloop.last == false %},{% endif %}
{% endfor %}
],
"katex": {
"delimiters": [
{
"left": "$",
"right": "$",
"display": false
},
{
"left": "$$",
"right": "$$",
"display": true
}
]
}
}
</script>
</d-front-matter>
<body class="{% if site.navbar_fixed %}fixed-top-nav{% endif %} {% unless site.footer_fixed %}sticky-bottom-footer{% endunless %}">
<!-- Header -->
{% include header.liquid %}
<!-- Content -->
<div class="post distill">
<d-title>
<h1>{{ page.title }}</h1>
<p>{{ page.description }}</p>
</d-title>
{% if page.authors %}
<d-byline></d-byline>
{% endif %}
<d-article>
{% if page.toc %}
<d-contents>
<nav class="l-text figcaption">
<h3>Contents</h3>
{% for section in page.toc %}
<div>
<a href="#{{ section.name | slugify }}">{{ section.name }}</a>
</div>
{% if section.subsections %}
<ul>
{% for subsection in section.subsections %}
<li>
<a href="#{{ subsection.name | slugify }}">{{ subsection.name }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</nav>
</d-contents>
{% endif %}
{{ content }}
</d-article>
<d-appendix>
<d-footnote-list></d-footnote-list>
<d-citation-list></d-citation-list>
</d-appendix>
<d-bibliography src="{{ page.bibliography | prepend: '/assets/bibliography/' | relative_url }}"></d-bibliography>
{% if site.disqus_shortname and page.disqus_comments %}{% include disqus.liquid %}{% endif %}
{% if site.giscus.repo and page.giscus_comments %}
{% include giscus.liquid %}
{% endif %}
</div>
<!-- Footer -->
{% include footer.liquid %}
<!-- JavaScripts -->
{% include distill_scripts.liquid %}
</body>
</html>