forked from sampsyo/cs6120
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost.html
47 lines (47 loc) · 2.24 KB
/
post.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{% extends "base.html" %}
{% block header %}
<meta name="twitter:card" content="summary">
<meta property="og:type" content="article">
<meta property="og:title" content="{{ page.title }}">
<meta property="og:description"
content="{{ page.content | striptags | split(pat="\n\n") | first }}">
{% if page.extra.latex %}
<!-- KaTeX -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body, { delimiters: [ {left: '$$', right: '$$', display: true}, {left: '\\[', right: '\\]', display: true}, {left: '$', right: '$', display: false} ] });"></script>
{% endif %}
{% endblock header %}
{% block main %}
{% set secpath = page.ancestors | last %}
{% set section = get_section(path=secpath, metadata_only=true) %}
<h1>
<a href="{{ section.permalink }}">
{{ section.title }}
</a>
</h1>
<article>
<h1>{{ page.title }}</h1>
<p class="details">
{% if page.extra.authors %}
<span class="author"> by
{% for author in page.extra.authors %}
{% if author.link %}<a href="{{ author.link }}">{% endif %}{{ author.name }}{% if author.link %}</a>{% endif %}{% if not loop.last %},{% endif %}
{% endfor %}
<span>
{% else %}
<span class="author">by {% if page.extra.author_link %}<a href="{{ page.extra.author_link }}">{% endif %}{{ page.extra.author }}{% if page.extra.author_link %}</a>{% endif %}</span>
{% endif %}
<time datetime="{{ page.date }}">
{{ page.date | date(format="%B %e, %Y") }}
</time>
</p>
{{ page.content | safe }}
<footer>
{% if page.extra.bio %}
{{ page.extra.bio | markdown | safe }}
{% endif %}
{{ load_data(path="data/blog_footer.md") | markdown | safe }}
</footer>
</article>
{% endblock main %}