dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
site/templates/page.html (1848B)
1{% extends "base.html" -%} {% import "macros/pagination.html" as pages -%} {%
2import "macros/javascript.html" as js -%} {% import "macros/toc.html" as toc -%}
3{%- block math -%} {% if page.extra.math %} {{ js::katex() }} {% endif %} {%-
4endblock math -%} {%- block title %}
5<title>{{ page.title }} - {{ config.extra.author }}</title>
6{%- endblock title -%} {%- block main -%}
7<article class="post">
8 {% set section = get_section(path="blog/_index.md") %}
9 <header>
10 <h1 class="post-title">
11 {% if page.extra['archive'] %} {{ page.title }} ({{ section.pages | length
12 }} post{{ section.pages | length | pluralize }}) {% else %}
13 <a href="{{ page.permalink }}">{{ page.title }}</a>
14 {% endif %}
15 </h1>
16 {% if not page.extra['skip-meta'] -%} {{ posts::meta(page=page) }} {% endif
17 %} {%- block ToC -%} {%- if page.extra.ToC or config.extra.table_of_contents
18 -%} {{ toc::toc(t=page.toc) }} {%- endif -%} {%- endblock ToC -%}
19 </header>
20
21 <div class="post-content">{{ page.content | safe }}</div>
22
23 {% if page.extra['archive'] %}
24 <ul class="post-list">
25 {% for page in section.pages %}
26 <li>{{ posts::meta(page=page, list=true) }}</li>
27 {% endfor %}
28 </ul>
29 {% endif %} {% if page.extra['feed'] %}
30 <ul class="post-list">
31 <li>
32 {{ url::internal(path=config.extra.feed_path, trailing_slash=false,
33 text="RSS Link") }}
34 </li>
35 </ul>
36 {% endif %} {% if config.extra.edit_page and page.extra.edit %} {{
37 edit::edit_page(current_path=current_path) }} {% endif %} {% if
38 page.extra.comments %} {{ comments::comments() }} {% endif %} {% if
39 page.extra.github %}
40 <script async defer src="https://buttons.github.io/buttons.js"></script>
41 {% endif %} {{ pages::related() }}
42</article>
43<button class="scroll-back" id="scroll-back" title="Scroll Up">↑</button>
44{%- endblock main -%}