aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md8
-rw-r--r--config.toml18
-rw-r--r--static/processed_images/199de027950a8f4800.jpgbin37494 -> 0 bytes
-rw-r--r--templates/404.html34
-rw-r--r--templates/base.html107
-rw-r--r--templates/categories/list.html14
-rw-r--r--templates/categories/single.html13
-rw-r--r--templates/contact.html35
-rw-r--r--templates/index.html31
-rw-r--r--templates/macros/macros.html9
-rw-r--r--templates/macros/page.html8
-rw-r--r--templates/macros/social.html7
-rw-r--r--templates/page.html68
-rw-r--r--templates/pages.html6
-rw-r--r--templates/posts.html17
-rw-r--r--templates/shortcodes/img.html51
-rw-r--r--templates/tags/list.html19
-rw-r--r--templates/tags/single.html13
18 files changed, 266 insertions, 192 deletions
diff --git a/README.md b/README.md
index c9ec215..90b9cd3 100644
--- a/README.md
+++ b/README.md
@@ -89,6 +89,14 @@ You can customize your configurations, templates and content for yourself. Look
at the `config.toml`, `content` files, and templates files in this
repo for an idea.
+### Colors and Styles
+
+Colors and style are handled by the sass files of [abridge.css](https://github.com/jieiku/abridge.css)
+
+To change colors of this theme all you need to do is edit `/themes/abridge/sass/themes/_auto.scss`
+then in the root of your site type `zola build` which will regenerate your site, this is similar to what zola serve does, except it does not facilitate serving the site.
+This is also the way you should generate your site to serve it by a real webserver such as nginx.
+
### Global Configuration
There are some configuration options that you can customize in `config.toml`.
diff --git a/config.toml b/config.toml
index c65cdb3..7cb9809 100644
--- a/config.toml
+++ b/config.toml
@@ -36,9 +36,9 @@ footer_credit = true
#google = "Your Google Site verification code."
#bing = "Your Bing Site verification code."
textlogo = '<font color="#f90">A</font>bridge'
-sitedesc = false # This enables or disables the display of the site description below the logo.
+sitedesc = false # enables or disables the display of the site description below the logo.
author = "Your Name"
-keywords = "Whatever, SEO, keywords, you want"
+favicon = "favicon.png"
banner = "banner.png"
menu = [
{url = "/", name = "Home", slash = true},
@@ -54,10 +54,13 @@ menu_footer = [
{url = "/privacy/", name = "Privacy", slash = true},
{url = "/sitemap.xml", name = "Sitemap", slash = false},
]
+#copyright_start_year = 2019 # optional
+#copyright_end_year = 2020 # optional, recommend leaving unset, zola build will set this to current year by default
+
# meta tags
+keywords = "Whatever, SEO, keywords, you want"
twitter = "your-user-name"
-
-# favicon = images/favicon.png # override default favicon
+seo = true # enable or disable seo-related meta tags: opengraph, facebook, twitter
# Footer social links; full options listed in macros/social.html
[extra.social]
@@ -69,20 +72,13 @@ element = "matrix.example.com"
twitter = "your-user-name"
facebook = "your-user-name"
linkedin = "your-user-name"
-
gitlab = "your-user-name"
github = "your-user-name"
bitbucket = "your-user-name"
python = "your-user-name"
docker = "your-user-name"
stack = "your-user-name"
-
instagram = "your-user-name"
pinterest = "your-user-name"
twitch = "your-user-name"
youtube = "your-channel-id"
-
-# seo = true # enable or disable seo-related tags, defaults to true
-
-# start_year = 2019 # optional, copyright start year
-# end_year = 2022 #optional, copyright end year, defaults to current year if unset
diff --git a/static/processed_images/199de027950a8f4800.jpg b/static/processed_images/199de027950a8f4800.jpg
deleted file mode 100644
index 51d50a8..0000000
--- a/static/processed_images/199de027950a8f4800.jpg
+++ /dev/null
Binary files differ
diff --git a/templates/404.html b/templates/404.html
index 23c7168..3b02be6 100644
--- a/templates/404.html
+++ b/templates/404.html
@@ -1,21 +1,23 @@
{% extends "base.html" %}
-
{# Title #}
-{% block title %}<title>Sorry! Page not found.</title>{% endblock title %}
-
-{% if config.extra.seo | default(value=true) %}
- {% block current_url %}
- <meta property="og:url" content="{{ get_url(path='/') }}">
- <meta name="twitter:url" content="{{ get_url(path='/') }}">
- {% endblock current_url %}
-{% endif %}
-{# Page heading #}
+{% block title %}
+ <title>Sorry! Page not found.</title>
+{% endblock title %}
-{% block content %}<div>
+{% block current_url %}
+ {% if config.extra.seo | default(value=true) %}
+ <meta property="og:url" content="{{ get_url(path='/') }}">
+ <meta name="twitter:url" content="{{ get_url(path='/') }}">
+ {% endif %}
+{% endblock current_url %}
-<h1>404 Error</h1>
-<h2>Sorry</h2>
-<p>The requested page does not exist or has been moved to another address.</p>
-<p>Please go back to <a href="{{ get_url(path="/", trailing_slash=true) }}">home</a>.</p>
+{# Page heading #}
-</div>{% endblock content %}
+{% block content %}
+ <div>
+ <h1>404 Error</h1>
+ <h2>Sorry</h2>
+ <p>The requested page does not exist or has been moved to another address.</p>
+ <p>Please go back to <a href="{{ get_url(path="/", trailing_slash=true) }}">home</a>.</p>
+ </div>
+{% endblock content %}
diff --git a/templates/base.html b/templates/base.html
index 77c4742..f43dcba 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -11,16 +11,20 @@
{% block description %}
{% if page.description %}
<meta name="description" content="{{ page.description }}" />
+
{% if config.extra.seo | default(value=true) %}
- <meta name="twitter:description" content="{{ page.description }}">
- <meta property="og:description" content="{{ page.description }}">
+ <meta name="twitter:description" content="{{ page.description }}">
+ <meta property="og:description" content="{{ page.description }}">
{% endif %}
+
{% else %}
<meta name="description" content="{{ config.description }}" />
+
{% if config.extra.seo | default(value=true) %}
- <meta name="twitter:description" content="{{ config.description}}">
- <meta property="og:description" content="{{ config.description }}">
+ <meta name="twitter:description" content="{{ config.description}}">
+ <meta property="og:description" content="{{ config.description }}">
{% endif %}
+
{% endif %}
{% endblock description %}
@@ -44,11 +48,11 @@
<meta name="apple-mobile-web-app-status-bar-style" content="default">
{% block css %}<link rel="stylesheet" href="{{ get_url(path="abridge.css", trailing_slash=false, cachebust=true) }}">{% endblock css %}
+
{% if config.extra.favicon %}
- <link rel="shortcut icon" href="{{ get_url(path=config.extra.favicon, trailing_slash=false) }}" sizes="16x16" type="image/png"/>
- {% else %}
- <link rel="shortcut icon" href="{{ get_url(path="favicon.png", trailing_slash=false) }}" sizes="16x16" type="image/png"/>
+ <link rel="shortcut icon" href="{{ get_url(path=config.extra.favicon, trailing_slash=false) }}" sizes="16x16" type="image/png"/>
{% endif %}
+
<link rel="canonical" href="{{ get_url(path="/") }}">
{% if config.generate_feed %}<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path="atom.xml") }}">{% endif %}
@@ -74,8 +78,8 @@
{% endblock current_url %}
{% if config.extra.social.twitter %}
- <meta name="twitter:site" content="@{{ config.extra.twitter }}">
- <meta name="twitter:creator" content="@{{ config.extra.twitter }}">
+ <meta name="twitter:site" content="@{{ config.extra.twitter }}">
+ <meta name="twitter:creator" content="@{{ config.extra.twitter }}">
{% endif %}
{% if page.extra.thumbnail %}
@@ -93,55 +97,64 @@
<meta property="og:image" content="{{ get_url(path=page.extra.static_thumbnail, trailing_slash=false) }}">
{% endif %}
{% elif config.extra.default_og_image %}
- <meta name="twitter:card" content="summary_large_image">
- <meta name="twitter:image" content="{{ get_url(path=config.extra.default_og_image, trailing_slash=false) }}">
- <meta property="og:image" content="{{ get_url(path=config.extra.default_og_image, trailing_slash=false) }}">
+ <meta name="twitter:card" content="summary_large_image">
+ <meta name="twitter:image" content="{{ get_url(path=config.extra.default_og_image, trailing_slash=false) }}">
+ <meta property="og:image" content="{{ get_url(path=config.extra.default_og_image, trailing_slash=false) }}">
{% elif config.extra.banner %}
- <meta name="twitter:card" content="summary_large_image">
- <meta name="twitter:image" content="{{ get_url(path=config.extra.banner, trailing_slash=false) }}">
- <meta property="og:image" content="{{ get_url(path=config.extra.banner, trailing_slash=false) }}">
+ <meta name="twitter:card" content="summary_large_image">
+ <meta name="twitter:image" content="{{ get_url(path=config.extra.banner, trailing_slash=false) }}">
+ <meta property="og:image" content="{{ get_url(path=config.extra.banner, trailing_slash=false) }}">
{% else %}
- <meta name="twitter:card" content="summary">
+ <meta name="twitter:card" content="summary">
{% endif %}
{% endif %}
{% block extra_head %}{% endblock extra_head %}
</head>
<body>
-{% block header %}<header>
- <nav>
- <header>
- <h1><a href="{{ get_url(path="/", trailing_slash=true) }}">{{ config.extra.textlogo | safe }}</a></h1>
- </header>
- <div overflow>
- <ul>
- {% for i in config.extra.menu %}<li><h2><a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}">{{ i.name }}</a></h2></li>{% endfor %}
- </ul>
- </div>
- </nav>
- {% if config.extra.sitedesc %}{% if config.description %}<div>{{ config.description }}</div>{% endif %}{% endif %}
- <hr>
-</header>{% endblock header %}
-<main>{% block content %}
+{% block header %}
+ <header>
+ <nav>
+ <header>
+ <h1><a href="{{ get_url(path="/", trailing_slash=true) }}">{{ config.extra.textlogo | safe }}</a></h1>
+ </header>
+ <div overflow>
+ <ul>
+ {% for i in config.extra.menu %}<li><h2><a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}">{{ i.name }}</a></h2></li>{% endfor %}
+ </ul>
+ </div>
+ </nav>
+ {% if config.extra.sitedesc %}
+ {% if config.description %}
+ <div>{{ config.description }}</div>
+ {% endif %}
+ {% endif %}
+ <hr>
+ </header>
+{% endblock header %}
+<main>
+{% block content %}
{% endblock content %}
</main>
-{% block footer %}<footer>
- <hr>
- <center>
- <p>{{ social_macros::social_links(social_config=config.extra.social) }}</p>
+{% block footer %}
+ <footer>
+ <hr>
+ <center>
+ <p>{{ social_macros::social_links(social_config=config.extra.social) }}</p>
- {# Copyright #}
- {% set start_year=config.extra.start_year | default(value="") %}
- {% if start_year %}{% set start_year=start_year ~ "-" %}{% endif %}
- {% set end_year=config.extra.end_year | default(value=now() | date(format="%Y")) %}
- <p>Copyright &copy; {{ start_year ~ end_year}} {{ config.title }}</p>
+ {# Copyright #}
+ {% set copyright_start_year=config.extra.copyright_start_year | default(value="") %}
+ {% if copyright_start_year %}{% set copyright_start_year=copyright_start_year ~ "-" %}{% endif %}
+ {% set copyright_end_year=config.extra.copyright_end_year | default(value=now() | date(format="%Y")) %}
+ <p>Copyright &copy; {{ copyright_start_year ~ copyright_end_year}} {{ config.title }}</p>
- <p>{% for i in config.extra.menu_footer %}<a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}">{{ i.name }}</a> &nbsp; {% endfor %}</p>
- {# Optional footer credit #}
- {% if config.extra.footer_credit %}
- <p>Powered by <a href="https://www.getzola.org/">Zola</a> and <a href="https://github.com/jieiku/abridge/">Abridge</a></p>
- {% endif %}
- </center>
-</footer>{% endblock footer %}
+ <p>{% for i in config.extra.menu_footer %}<a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}">{{ i.name }}</a> &nbsp; {% endfor %}</p>
+ {# Optional footer credit #}
+ {% if config.extra.footer_credit | default(value=true) %}
+ <p>Powered by <a href="https://www.getzola.org/">Zola</a> and <a href="https://github.com/jieiku/abridge/">Abridge</a></p>
+ {% endif %}
+ </center>
+ </footer>
+{% endblock footer %}
</body>
</html>
diff --git a/templates/categories/list.html b/templates/categories/list.html
index 89bbc23..bce31fa 100644
--- a/templates/categories/list.html
+++ b/templates/categories/list.html
@@ -1,12 +1,16 @@
{% extends "base.html" %}
{% block content %}
- <div>
+<div>
<center>
<h1>{{ terms | length }} Categories</h1>
<p>{% for term in terms -%}[<a href="#{{ term.name }}">{{ term.name }}</a>] &nbsp; {%- endfor %}</p>
</center>
- {% for term in terms -%}<h2 id="{{ term.name }}"><a href="{{ term.permalink | safe }}">{{ term.name }}</a></h2>
- {% for page in term.pages -%}<p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p>
- {% endfor -%}{% endfor -%}
-</div>{% endblock content %}
+ {% for term in terms -%}
+ <h2 id="{{ term.name }}"><a href="{{ term.permalink | safe }}">{{ term.name }}</a></h2>
+ {% for page in term.pages -%}
+ <p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p>
+ {% endfor -%}
+ {% endfor -%}
+</div>
+{% endblock content %}
diff --git a/templates/categories/single.html b/templates/categories/single.html
index d5fe5b7..641add7 100644
--- a/templates/categories/single.html
+++ b/templates/categories/single.html
@@ -1,8 +1,13 @@
{% extends "base.html" %}
{% block content %}
- <div>
+<div>
<h2>{{ term.name }}</h2>
- {% for year, posts in term.pages | group_by(attribute="year") %}<h3>{{ year }}</h3>
- {% for page in posts %}<p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p>
- {% endfor %}{% endfor %}</div>{% endblock content %}
+ {% for year, posts in term.pages | group_by(attribute="year") %}
+ <h3>{{ year }}</h3>
+ {% for page in posts %}
+ <p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p>
+ {% endfor %}
+ {% endfor %}
+</div>
+{% endblock content %}
diff --git a/templates/contact.html b/templates/contact.html
index bf37d2d..6cdbc55 100644
--- a/templates/contact.html
+++ b/templates/contact.html
@@ -1,16 +1,25 @@
{% extends "base.html" %}
{% block content %}
-<div>
-<p>Want to get in touch? Fill out the form below to send me a message and I will get back to you as soon as possible!</p>
-<form name="contact" method="POST">
- <p><label>Name</label>
- <input type="text" placeholder="Name" id="name" required data-validation-required-message="Please enter your name."></p>
- <p><label>Email Address</label>
- <input type="email" placeholder="name@example.com" id="email" required data-validation-required-message="Please enter your email address."></p>
- <p><label>Message</label>
- <textarea rows="5" placeholder="Message" id="message" required data-validation-required-message="Please enter a message."></textarea></p>
- <div id="success"></div>
- <p><button type="submit" id="sendMessageButton">Send</button></p>
-</form>
-</div>{% endblock content %}
+ <div>
+ <p>Want to get in touch? Fill out the form below to send me a message and I will get back to you as soon as possible!</p>
+ <form name="contact" method="POST">
+ <p>
+ <label>Name</label>
+ <input type="text" placeholder="Name" id="name" required data-validation-required-message="Please enter your name.">
+ </p>
+ <p>
+ <label>Email Address</label>
+ <input type="email" placeholder="name@example.com" id="email" required data-validation-required-message="Please enter your email address.">
+ </p>
+ <p>
+ <label>Message</label>
+ <textarea rows="5" placeholder="Message" id="message" required data-validation-required-message="Please enter a message."></textarea>
+ </p>
+ <div id="success"></div>
+ <p>
+ <button type="submit" id="sendMessageButton">Send</button>
+ </p>
+ </form>
+ </div>
+{% endblock content %}
diff --git a/templates/index.html b/templates/index.html
index 1bd4976..ad4af41 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,20 +1,27 @@
{% import "macros/page.html" as page_macros %}
{% import "macros/macros.html" as macros %}
-{% extends "base.html" %}{% block content %}
- <div>{% for page in paginator.pages %}
- <article>
-{{ macros::title(page=page) }} <p>{{ page.summary | markdown(inline=true) | safe }} <a href="{{ page.permalink | safe }}">...more</a></p>
- </article>{% endfor %}
+{% extends "base.html" %}
+{% block content %}
+ <div>
+ {% for page in paginator.pages %}
+ <article>
+ {{ macros::title(page=page) }}
+ <p>{{ page.summary | markdown(inline=true) | safe }} <a href="{{ page.permalink | safe }}">...more</a></p>
+ </article>
+ {% endfor %}
<nav>
{% if paginator.previous %}<a href="{{ paginator.previous | safe }}">&#60; Previous</a> {% endif %}{% if paginator.next %}<a href="{{ paginator.next | safe }}">Next &#62;</a>{% endif %}
</nav>
- </div>{% set section_item = get_section(path="_index.md") %}
+ </div>
+ {% set section_item = get_section(path="_index.md") %}
{% if recent %}
- <div class="toc">
- <div class="toc-sticky">
- <h3>Recent Posts</h3>{% for page in section_item.pages | slice(end=config.extra.recent_items) %}
-{{ page_macros::page_listing(page=page) }}{% endfor %}
+ <div class="toc">
+ <div class="toc-sticky">
+ <h3>Recent Posts</h3>
+ {% for page in section_item.pages | slice(end=config.extra.recent_items) %}
+ {{ page_macros::page_listing(page=page) }}
+ {% endfor %}
+ </div>
</div>
- </div>
{% endif %}
- {% endblock content %}
+{% endblock content %}
diff --git a/templates/macros/macros.html b/templates/macros/macros.html
index a470bb0..c3147aa 100644
--- a/templates/macros/macros.html
+++ b/templates/macros/macros.html
@@ -1,6 +1,9 @@
-{% macro title(page) %} <h1><a href="{{ page.permalink | safe }}">{{ page.title }}</a></h1>
- <span>{{ page.date | date(format="%B %d, %Y") }}{% if page.taxonomies.categories %} [{% for cat in page.taxonomies.categories %}<a href="{{ get_taxonomy_url(kind="categories", name=cat) | safe }}">{{ cat }}</a>{% endfor %}] </span> {% endif %}
- {% if page.taxonomies.tags %} <span>{% for tag in page.taxonomies.tags %} #<a href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}">{{ tag }}</a> {% endfor %}</span>{% endif %}
+{% macro title(page) %}
+<h1><a href="{{ page.permalink | safe }}">{{ page.title }}</a></h1>
+<span>{{ page.date | date(format="%B %d, %Y") }}{% if page.taxonomies.categories %} [{% for cat in page.taxonomies.categories %}<a href="{{ get_taxonomy_url(kind="categories", name=cat) | safe }}">{{ cat }}</a>{% endfor %}] </span> {% endif %}
+{% if page.taxonomies.tags %}
+ <span>{% for tag in page.taxonomies.tags %} #<a href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}">{{ tag }}</a> {% endfor %}</span>
+{% endif %}
{% endmacro title %}
{% macro footer(page) %}
<h3><a href="#">Back to top</a></h3>
diff --git a/templates/macros/page.html b/templates/macros/page.html
index 69d40f7..0029e13 100644
--- a/templates/macros/page.html
+++ b/templates/macros/page.html
@@ -1,3 +1,5 @@
-{% macro page_listing(page) %} <div class="toc-item">
- <a href="{{ page.permalink | safe}}" title="{{ page.title }}">{{ page.title }}</a>
- </div>{% endmacro page_listing %}
+{% macro page_listing(page) %}
+ <div class="toc-item">
+ <a href="{{ page.permalink | safe}}" title="{{ page.title }}">{{ page.title }}</a>
+ </div>
+{% endmacro page_listing %}
diff --git a/templates/macros/social.html b/templates/macros/social.html
index 8daf7bc..6d45b9e 100644
--- a/templates/macros/social.html
+++ b/templates/macros/social.html
@@ -1,4 +1,6 @@
-{% macro social_links(social_config) %}<span>{% set base_url = get_url(path="", lang=lang) %}
+{% macro social_links(social_config) %}
+{% set base_url = get_url(path="", lang=lang) %}
+<span>
{% if config.generate_feed %}{% if config.extra.social.feed %} <a href="{{ get_url(path="atom.xml") }}" target="_blank"><span class="svg rss" title="Rss"></span></a>{% endif %}{% endif %}
{% if social_config.mail %} <a href="mailto:{{ social_config.mail }}" target="_blank"><span class="svg mail" title="Mail"></span></a>{% endif %}
@@ -20,4 +22,5 @@
{% if social_config.pinterest %} <a href="https://www.pinterest.com/{{ social_config.pinterest }}/" target="_blank"><span class="svg pinterest" title="Pinterest"></span></a>{% endif %}
{% if social_config.twitch %} <a href="https://www.twitch.tv/{{ social_config.twitch }}/" target="_blank"><span class="svg twitch" title="Twitch"></span></a>{% endif %}
{% if social_config.youtube %} <a href="https://www.youtube.com/channel/{{ social_config.youtube }}/" target="_blank"><span class="svg youtube" title="YouTube"></span></a>{% endif %}
- </span>{% endmacro %}
+</span>
+{% endmacro %}
diff --git a/templates/page.html b/templates/page.html
index e3388c0..f92574e 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -2,39 +2,39 @@
{% import "macros/macros.html" as macros %}
{{config.title}} - {{page.title}}
{% block content %}
-<article>
- {{ macros::title(page=page) }}
- {{ page.content | safe }}
- {% block page_before_footer %}
- {% endblock page_before_footer %}
- {% block page_footer %}
- {{ macros::footer(page=page) }}
- {% endblock page_footer %}
- {% block page_after_footer %}
- {% endblock page_after_footer %}
-</article>
-{% block toc %}
- {% if page.extra.toc %}
- {% set toc = page.toc %}
- {% endif %}
- {% if toc %}
- <div class="toc">
- <div class="toc-sticky">
- <h3>Index</h3>
- {% for h in toc %}
- <div class="toc-item">
- <a class="subtext" href="{{h.permalink | safe}}">{{ h.title }}</a>
+ <article>
+ {{ macros::title(page=page) }}
+ {{ page.content | safe }}
+ {% block page_before_footer %}
+ {% endblock page_before_footer %}
+ {% block page_footer %}
+ {{ macros::footer(page=page) }}
+ {% endblock page_footer %}
+ {% block page_after_footer %}
+ {% endblock page_after_footer %}
+ </article>
+ {% block toc %}
+ {% if page.extra.toc %}
+ {% set toc = page.toc %}
+ {% endif %}
+ {% if toc %}
+ <div class="toc">
+ <div class="toc-sticky">
+ <h3>Index</h3>
+ {% for h in toc %}
+ <div class="toc-item">
+ <a class="subtext" href="{{h.permalink | safe}}">{{ h.title }}</a>
+ </div>
+ {% if h.children %}
+ {% for h2 in h.children %}
+ <div class="toc-item-child">
+ <a class="subtext" href="{{h2.permalink | safe}}"><small>- {{ h2.title }}</small></a>
+ </div>
+ {% endfor %}
+ {% endif %}
+ {% endfor %}
+ </div>
</div>
- {% if h.children %}
- {% for h2 in h.children %}
- <div class="toc-item-child">
- <a class="subtext" href="{{h2.permalink | safe}}"><small>- {{ h2.title }}</small></a>
- </div>
- {% endfor %}
- {% endif %}
- {% endfor %}
- </div>
- </div>
- {% endif %}
-{% endblock toc %}
+ {% endif %}
+ {% endblock toc %}
{% endblock content %}
diff --git a/templates/pages.html b/templates/pages.html
index 30c95e9..3d2ca80 100644
--- a/templates/pages.html
+++ b/templates/pages.html
@@ -1,2 +1,4 @@
-{% extends "base.html" %}{% block content %}
-<div>{{ page.content | safe }}</div>{% endblock content %}
+{% extends "base.html" %}
+{% block content %}
+ <div>{{ page.content | safe }}</div>
+{% endblock content %}
diff --git a/templates/posts.html b/templates/posts.html
index 7aee3a7..f093e8e 100644
--- a/templates/posts.html
+++ b/templates/posts.html
@@ -1,5 +1,12 @@
-{% extends "base.html" %}{% block content %}{% set section_item = get_section(path="_index.md") %}
- <div>{% for year, posts in section_item.pages | group_by(attribute="year") %}
- <h2>{{ year }}</h2>
- {% for post in posts %}<p><a href="{{ post.permalink | safe }}" title="{{ post.title }}">{{ post.title }}</a> - {{ post.date | date(format="%F") }}</p>{% endfor %}{% endfor %}
- </div>{% endblock content %}
+{% extends "base.html" %}
+{% block content %}
+ {% set section_item = get_section(path="_index.md") %}
+ <div>
+ {% for year, posts in section_item.pages | group_by(attribute="year") %}
+ <h2>{{ year }}</h2>
+ {% for post in posts %}
+ <p><a href="{{ post.permalink | safe }}" title="{{ post.title }}">{{ post.title }}</a> - {{ post.date | date(format="%F") }}</p>
+ {% endfor %}
+ {% endfor %}
+ </div>
+{% endblock content %}
diff --git a/templates/shortcodes/img.html b/templates/shortcodes/img.html
index 94cb9fa..d003eeb 100644
--- a/templates/shortcodes/img.html
+++ b/templates/shortcodes/img.html
@@ -7,36 +7,39 @@
{% set figure_width = container_width - (40 * 2) %}
{% if path is starting_with("./") %}
- {% set relative_path = page.relative_path | split(pat="/") | slice(end=-1) | join(sep="/") %}
- {% set img_path = path | trim_start_matches(pat="./") %}
- {% set img_path = relative_path ~ "/" ~ img_path %}
+ {% set relative_path = page.relative_path | split(pat="/") | slice(end=-1) | join(sep="/") %}
+ {% set img_path = path | trim_start_matches(pat="./") %}
+ {% set img_path = relative_path ~ "/" ~ img_path %}
{% else %}
- {% set img_path = path %}
+ {% set img_path = path %}
{% endif %}
{% if path is not ending_with(".svg") %}
- {% set resize = true %}
- {% set image_quality = 90 %}
- {% if quality %}
- {% set image_quality = quality %}
- {% endif %}
- {% if extended_width_pct %}
- {% if extended_width_pct == -1 %}
- {# adjust extended width to container width #}
- {% set extended_width_pct = 0.042 %}
- {% endif %}
- {% set _width = config.extra.images.max_width - figure_width %}
- {% set extended_width = (extended_width_pct * _width + figure_width) | round | int %}
- {% if extended_width > config.extra.images.max_width %}
- {% set extended_width = config.extra.images.max_width %}
- {% endif %}
- {% set resized_image = resize_image(path=img_path, width=extended_width, op="fit_width", quality=image_quality) %}
- {% else %}
- {% set resized_image = resize_image(path=img_path, width=figure_width, op="fit_width", quality=image_quality) %}
+ {% set resize = true %}
+ {% set image_quality = 90 %}
+ {% if quality %}
+ {% set image_quality = quality %}
+ {% endif %}
+
+ {% if extended_width_pct %}
+
+ {% if extended_width_pct == -1 %}
+ {# adjust extended width to container width #}
+ {% set extended_width_pct = 0.042 %}
{% endif %}
+ {% set _width = config.extra.images.max_width - figure_width %}
+ {% set extended_width = (extended_width_pct * _width + figure_width) | round | int %}
+ {% if extended_width > config.extra.images.max_width %}
+ {% set extended_width = config.extra.images.max_width %}
+ {% endif %}
+ {% set resized_image = resize_image(path=img_path, width=extended_width, op="fit_width", quality=image_quality) %}
+
+ {% else %}
+ {% set resized_image = resize_image(path=img_path, width=figure_width, op="fit_width", quality=image_quality) %}
+ {% endif %}
{% endif %}
<figure>
- <img src="{% if resize %}{{ resized_image.url }}{% else %}{{ path }}{% endif %}" {% if alt %}alt="{{alt}}"{% endif %}/>
- {% if caption %}<figcaption>{{ caption | safe }}</figcaption>{% endif %}
+ <img src="{% if resize %}{{ resized_image.url }}{% else %}{{ path }}{% endif %}" {% if alt %}alt="{{alt}}"{% endif %}/>
+ {% if caption %}<figcaption>{{ caption | safe }}</figcaption>{% endif %}
</figure>
diff --git a/templates/tags/list.html b/templates/tags/list.html
index e7a6b7d..56575df 100644
--- a/templates/tags/list.html
+++ b/templates/tags/list.html
@@ -2,10 +2,15 @@
{% block content %}
<div>
- <center>
- <h1>{{ terms | length }} Tags</h1>
- <p>{% for term in terms -%}#<a href="#{{ term.name }}">{{ term.name }}</a> &nbsp; {%- endfor %}</p>
- </center>
- {% for term in terms -%}<h2 id="{{ term.name }}">#<a href="{{ term.permalink | safe }}">{{ term.name }}</a></h2>
- {% for page in term.pages -%}<p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p>
- {% endfor -%}{% endfor -%}</div>{% endblock content %}
+ <center>
+ <h1>{{ terms | length }} Tags</h1>
+ <p>{% for term in terms -%}#<a href="#{{ term.name }}">{{ term.name }}</a> &nbsp; {%- endfor %}</p>
+ </center>
+ {% for term in terms -%}
+ <h2 id="{{ term.name }}">#<a href="{{ term.permalink | safe }}">{{ term.name }}</a></h2>
+ {% for page in term.pages -%}
+ <p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p>
+ {% endfor -%}
+ {% endfor -%}
+ </div>
+{% endblock content %}
diff --git a/templates/tags/single.html b/templates/tags/single.html
index fd1a10f..2bddb8e 100644
--- a/templates/tags/single.html
+++ b/templates/tags/single.html
@@ -2,7 +2,12 @@
{% block content %}
<div>
- <h2>{{ term.name }}</h2>
- {% for year, posts in term.pages | group_by(attribute="year") %}<h3>{{ year }}</h3>
- {% for page in term.pages %}<p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p>
- {% endfor %}{% endfor %}</div>{% endblock content %}
+ <h2>{{ term.name }}</h2>
+ {% for year, posts in term.pages | group_by(attribute="year") %}
+ <h3>{{ year }}</h3>
+ {% for page in term.pages %}
+ <p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p>
+ {% endfor %}
+ {% endfor %}
+ </div>
+{% endblock content %}