Support directory installations
- Add web log to HttpContext on first retrieval per req - Add several DotLiquid filters - Use int for page numbers - Update all themes to use rel/abs link and other filters
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
{%- for post in model.posts %}
|
||||
<article class="item">
|
||||
<h1 class="item-heading">
|
||||
<a href="/{{ post.permalink }}" title="Permanent Link to "{{ post.title | strip_html | escape }}"">
|
||||
<a href="{{ post | relative_link }}"
|
||||
title="Permanent Link to "{{ post.title | strip_html | escape }}"">
|
||||
{{ post.title }}
|
||||
</a>
|
||||
</h1>
|
||||
@@ -24,7 +25,7 @@
|
||||
</span>
|
||||
{% if logged_on %}
|
||||
<span>
|
||||
<a href="{{ post.id | edit_post_link }}"><i class="fa fa-pencil-square-o"></i> Edit Post</a>
|
||||
<a href="{{ post | edit_post_link }}"><i class="fa fa-pencil-square-o"></i> Edit Post</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
</h4>
|
||||
@@ -34,12 +35,12 @@
|
||||
<nav aria-label="pagination">
|
||||
<ul class="pager">
|
||||
{% if model.newer_link -%}
|
||||
<li class="previous item"><a href="/{{ model.newer_link.value }}">« Newer Posts</a></li>
|
||||
<li class="previous item"><a href="{{ model.newer_link.value }}">« Newer Posts</a></li>
|
||||
{%- else -%}
|
||||
<li></li>
|
||||
{% endif %}
|
||||
{% if model.older_link -%}
|
||||
<li class="next item"><a href="/{{ model.older_link.value }}">Older Posts »</a></li>
|
||||
<li class="next item"><a href="{{ model.older_link.value }}">Older Posts »</a></li>
|
||||
{%- endif -%}
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -74,7 +75,7 @@
|
||||
{% 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>
|
||||
<a href="{{ cat | category_link }}" class="cat-list-link">{{ cat.name }}</a>
|
||||
<span class="cat-list-count">{{ cat.post_count }}</span>
|
||||
</li>
|
||||
{%- endfor %}
|
||||
|
||||
@@ -18,17 +18,19 @@
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="/themes/{{ web_log.theme_path }}/style.css">
|
||||
{%- if is_home %}
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ web_log.name | escape }}" href="/feed.xml">
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ web_log.name | escape }}"
|
||||
href="{{ "feed.xml" | relative_link }}">
|
||||
<link rel="canonical" href="{{ "" | absolute_url }}">
|
||||
{%- endif %}
|
||||
<script src="/themes/{{ web_log.theme_path }}/djs.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="site-header" role="navigation">
|
||||
<p><a class="nav-home" href="/">{{ web_log.name }}</a></p>
|
||||
<p><a class="nav-home" href="{{ "" | relative_link }}">{{ web_log.name }}</a></p>
|
||||
{%- if web_log.subtitle %}<p>{{ web_log.subtitle.value }}</p>{% endif -%}
|
||||
<p class="nav-spacer"></p>
|
||||
{%- for page in page_list %}
|
||||
<p class="desktop"><a href="/{{ page.permalink }}">{{ page.title }}</a></p>
|
||||
<p class="desktop"><a href="{{ page | relative_link }}">{{ page.title }}</a></p>
|
||||
{%- endfor %}
|
||||
<p class="desktop">
|
||||
<a href="https://devotions.summershome.org" target="_blank" rel="noopener">A Word from the Word</a>
|
||||
@@ -38,7 +40,7 @@
|
||||
{{ content }}
|
||||
<footer class="part-1" id="links">
|
||||
{%- for page in page_list %}
|
||||
<p class="mobile"><a href="{{ page.permalink }}">{{ page.title }}</a></p>
|
||||
<p class="mobile"><a href="{{ page | relative_link }}">{{ page.title }}</a></p>
|
||||
{%- endfor %}
|
||||
<p class="mobile">
|
||||
<a href="https://devotions.summershome.org" target="_blank" rel="noopener">A Word from the Word</a>
|
||||
@@ -143,9 +145,9 @@
|
||||
</a>
|
||||
• Powered by <a href="https://github.com/bit-badger/myWebLog/tree/v2">myWebLog</a> •
|
||||
{% if logged_on %}
|
||||
<a href="/admin">Dashboard</a>
|
||||
<a href="{{ "admin" | relative_link }}">Dashboard</a>
|
||||
{% else %}
|
||||
<a href="/user/log-on">Log On</a>
|
||||
<a href="{{ "user/log-on" | relative_link }}">Log On</a>
|
||||
{%- endif %}
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{% endif %}
|
||||
<span title="Author"><i class="fa fa-user"></i> {{ model.authors | value: post.author_id }}</span>
|
||||
{% if logged_on %}
|
||||
<span><a href="{{ post.id | edit_post_link }}"><i class="fa fa-pencil-square-o"></i> Edit Post</a></span>
|
||||
<span><a href="{{ post | edit_post_link }}"><i class="fa fa-pencil-square-o"></i> Edit Post</a></span>
|
||||
{% endif %}
|
||||
</h4>
|
||||
<div>{{ post.text }}</div>
|
||||
@@ -27,7 +27,7 @@
|
||||
{% assign cat = categories | where: "id", cat_id | first %}
|
||||
<span class="no-wrap">
|
||||
<i class="fa fa-folder-open-o" title="Category"></i>
|
||||
<a href="{{ cat.slug | category_link }}" title="Categorized under “{{ cat.name | escape }}”">
|
||||
<a href="{{ cat | category_link }}" title="Categorized under “{{ cat.name | escape }}”">
|
||||
{{ cat.name }}
|
||||
</a>
|
||||
</span>
|
||||
@@ -53,16 +53,16 @@
|
||||
<ul class="pager">
|
||||
{% if model.newer_link -%}
|
||||
<li class="previous item">
|
||||
<h4 class="item-heading"><a href="/{{ model.newer_link.value }}">«</a> Previous Post</h4>
|
||||
<a href="/{{ model.newer_link.value }}">{{ model.newer_name.value }}</a>
|
||||
<h4 class="item-heading"><a href="{{ model.newer_link.value }}">«</a> Previous Post</h4>
|
||||
<a href="{{ model.newer_link.value }}">{{ model.newer_name.value }}</a>
|
||||
</li>
|
||||
{%- else -%}
|
||||
<li></li>
|
||||
{% endif %}
|
||||
{% if model.older_link -%}
|
||||
<li class="next item">
|
||||
<h4 class="item-heading">Next Post <a href="/{{ model.older_link.value }}">»</a></h4>
|
||||
<a href="/{{ model.older_link.value }}">{{ model.older_name.value }}</a>
|
||||
<h4 class="item-heading">Next Post <a href="{{ model.older_link.value }}">»</a></h4>
|
||||
<a href="{{ model.older_link.value }}">{{ model.older_name.value }}</a>
|
||||
</li>
|
||||
{%- endif -%}
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user