Add tech blog theme
- Add code colorizer Markdig plugin
This commit is contained in:
@@ -23,11 +23,14 @@
|
||||
<footer>
|
||||
<p>
|
||||
{%- if category_count > 0 -%}
|
||||
Categorized under: {{ cat_names | reverse | join: ", " }}
|
||||
{%- for cat in post.category_ids -%}
|
||||
{%- assign cat_names = model.categories | value: cat | split: "," | concat: cat_names -%}
|
||||
{%- assign this_cat = categories | where: "id", cat | first -%}
|
||||
{{ this_cat.name }},
|
||||
{%- assign cat_names = this_cat.name | concat: cat_names -%}
|
||||
{%- endfor -%}
|
||||
Categorized under: {{ cat_names | reverse | join: ", " }}<br>
|
||||
{%- assign cat_names = "" -%}
|
||||
<br>
|
||||
{% endif -%}
|
||||
{%- if tag_count > 0 %}
|
||||
Tagged: {{ post.tags | join: ", " }}
|
||||
|
||||
44
src/MyWebLog/themes/tech-blog/index.liquid
Normal file
44
src/MyWebLog/themes/tech-blog/index.liquid
Normal file
@@ -0,0 +1,44 @@
|
||||
{% if is_category or is_tag %}
|
||||
<h1>{{ page_title }}</h1>
|
||||
{%- if subtitle %}
|
||||
<p>{{ subtitle }}</p>
|
||||
{%- endif %}
|
||||
{% endif %}
|
||||
{%- for post in model.posts %}
|
||||
<article class="auto">
|
||||
<div>
|
||||
<h1 class="home-title">
|
||||
<small class="home-lead">{{ post.published_on | date: "dddd, MMMM d, yyyy" }}</small><br>
|
||||
|
||||
<a href="/{{ post.permalink }}" title="Permanent Link to "{{ post.title | strip_html | escape }}"">
|
||||
{{ post.title }}
|
||||
</a>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="entry-content">{{ post.text }}</div>
|
||||
{%- assign cat_count = post.category_ids | size -%}
|
||||
{%- if cat_count > 0 %}
|
||||
<small class="category-list">
|
||||
Categorized under
|
||||
{%- for cat_id in post.category_ids %}
|
||||
{%- assign cat = categories | where: "id", cat_id | first -%}
|
||||
<span>
|
||||
<a href="/category/{{ cat.slug }}/"
|
||||
title="Categorized under {{ cat.name | strip_html | escape }}" rel="tag">{{ cat.name }}</a></span>
|
||||
{%- endfor %}
|
||||
</small><br>
|
||||
{%- endif %}
|
||||
{%- assign tag_count = post.tags | size -%}
|
||||
{%- if tag_count > 0 %}
|
||||
<small class="category-list">
|
||||
Tagged
|
||||
{%- for tag in post.tags %}
|
||||
<span>
|
||||
<a href="/tag/{{ tag | replace: " ", "+" }}/"
|
||||
title="Tagged “{{ tag | escape }}”" rel="tag">{{ tag }}</a></span>
|
||||
{%- endfor %}
|
||||
</small><br>
|
||||
{%- endif %}
|
||||
{%- if logged_on %}<small><a href="/post/{{ post.id }}/edit">Edit Post</a></small>{% endif %}
|
||||
</article>
|
||||
{%- endfor %}
|
||||
86
src/MyWebLog/themes/tech-blog/layout.liquid
Normal file
86
src/MyWebLog/themes/tech-blog/layout.liquid
Normal file
@@ -0,0 +1,86 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="generator" content="{{ generator }}">
|
||||
<title>
|
||||
{%- if is_home %}
|
||||
{{ web_log.name }}{% if web_log.subtitle %} | {{ web_log.subtitle.value }}{% endif %}
|
||||
{%- else %}
|
||||
{{ page_title | strip_html }}{% if page_title and page_title != "" %} » {% endif %}{{ web_log.name }}
|
||||
{%- endif %}
|
||||
</title>
|
||||
<link rel="stylesheet" href="/themes/tech-blog/style.css">
|
||||
{% comment %}link(rel='canonical' href=config.url + url_for(page.path.replace('index.html', ''))) {% endcomment %}
|
||||
{%- if is_home %}
|
||||
<link rel="alternate" type="application/rss+xml"
|
||||
title="{{ web_log.name }}" href="https://{{ web_log.urlBase }}/feed.xml">
|
||||
{%- endif %}
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
<div class="header-logo">
|
||||
<a href="/">
|
||||
<img src="/themes/tech-blog/img/bitbadger.png"
|
||||
alt="A cartoon badger looking at a computer screen, with his paw on a mouse"
|
||||
title="Bit Badger Solutions">
|
||||
</a>
|
||||
</div>
|
||||
<div class="header-title"><a href="/">The Bit Badger Blog</a></div>
|
||||
<div class="header-spacer"> </div>
|
||||
<div class="header-social">
|
||||
<a href="/feed.xml" title="Subscribe to The Bit Badger Blog via RSS">
|
||||
<img src="/themes/tech-blog/img/rss.png" alt="RSS">
|
||||
</a>
|
||||
<a href="https://twitter.com/Bit_Badger" title="Bit_Badger on Twitter">
|
||||
<img src="/themes/tech-blog/img/twitter.png" alt="Twitter">
|
||||
</a>
|
||||
<a href="https://www.facebook.com/bitbadger.solutions" title="Bit Badger Solutions on Facebook">
|
||||
<img src="/themes/tech-blog/img/facebook.png" alt="Facebook">
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<div id="content" role="main">
|
||||
{{ content }}
|
||||
</div>
|
||||
<aside class="blog-sidebar">
|
||||
<div>
|
||||
<div class="sidebar-head">Linux Resources</div>
|
||||
<ul><li><a href="/linux/">Browse Resources</a></li></ul>
|
||||
</div>
|
||||
<div>
|
||||
<div class="sidebar-head">Categories</div>
|
||||
<ul class="cat-list">
|
||||
{% for cat in categories -%}
|
||||
{%- assign indent = cat.parent_names | size -%}
|
||||
<li class="cat-list-item"{% if indent > 0 %} style="padding-left:{{ indent }}rem;"{% endif %}>
|
||||
<a href="/category/{{ cat.slug }}/" class="cat-list-link">{{ cat.name }}</a>
|
||||
<span class="cat-list-count">{{ cat.post_count }}</span>
|
||||
</li>
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
<footer>
|
||||
<span>
|
||||
A production of
|
||||
<a href="https://bitbadger.solutions" title="Bit Badger Solutions" target="_blank" rel="noopener">
|
||||
Bit Badger Solutions
|
||||
</a>
|
||||
</span>
|
||||
<span>
|
||||
Powered by <a href="https://github.com/bit-badger/myWebLog/tree/v2" target="_blank" rel="noopener">myWebLog</a>
|
||||
•
|
||||
{% if logged_on %}
|
||||
<a href="/admin">Dashboard</a>
|
||||
{% else %}
|
||||
<a href="/user/log-on">Log On</a>
|
||||
{%- endif %}
|
||||
</span>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
5
src/MyWebLog/themes/tech-blog/single-page.liquid
Normal file
5
src/MyWebLog/themes/tech-blog/single-page.liquid
Normal file
@@ -0,0 +1,5 @@
|
||||
<article class="auto">
|
||||
<h1 class="entry-title">{{ page.title }}</h1>
|
||||
<div class="entry-content">{{ page.text }}</div>
|
||||
{%- if logged_on %}<p><small><a href="/page/{{ page.id }}/edit">Edit Page</a></small></p>{% endif %}
|
||||
</article>
|
||||
41
src/MyWebLog/themes/tech-blog/single-post.liquid
Normal file
41
src/MyWebLog/themes/tech-blog/single-post.liquid
Normal file
@@ -0,0 +1,41 @@
|
||||
{%- assign post = model.posts | first -%}
|
||||
<article class="auto">
|
||||
<h1 class="entry-title">
|
||||
{{ post.title }}<br>
|
||||
<span class="entry-meta">
|
||||
Posted by {{ model.authors | value: post.author_id }} on {{ post.published_on | date: "dddd, MMMM d, yyyy" }}
|
||||
at {{ post.published_on | date: "h:mm tt" | downcase }}
|
||||
{%- assign cat_count = post.category_ids | size -%}
|
||||
{%- if cat_count > 0 %}
|
||||
<br>
|
||||
<small class="category-list">
|
||||
Categorized under
|
||||
{%- for cat_id in post.category_ids %}
|
||||
{%- assign cat = categories | where: "id", cat_id | first -%}
|
||||
<span>
|
||||
<a href="/category/{{ cat.slug }}/"
|
||||
title="Categorized under {{ cat.name | strip_html | escape }}" rel="tag">{{ cat.name }}</a></span>
|
||||
{%- endfor %}
|
||||
</small>
|
||||
{%- endif %}
|
||||
</span>
|
||||
</h1>
|
||||
<div class="entry-content">{{ post.text }}</div>
|
||||
<div class="entry-footer">
|
||||
{%- assign tag_count = post.tags | size -%}
|
||||
{%- if tag_count > 0 %}
|
||||
<span class="category-list">
|
||||
Tagged
|
||||
{%- for tag in post.tags %}
|
||||
<span>
|
||||
<a href="/tag/{{ tag | replace: " ", "+" }}/"
|
||||
title="Tagged “{{ tag | escape }}”" rel="tag">{{ tag }}</a></span>
|
||||
{%- endfor %}
|
||||
</span> •
|
||||
{%- endif %}
|
||||
Bookmark the
|
||||
<a href="/{{ post.permalink }}" rel="bookmark"
|
||||
title="Permanent link to “{{ post.title | strip_html | escape }}”">permalink</a>
|
||||
{%- if logged_on %} • <a href="/post/{{ post.id }}/edit">Edit Post</a>{% endif %}
|
||||
</div>
|
||||
</article>
|
||||
Reference in New Issue
Block a user