Implement tag mapping

- Move all admin functions to /admin URLs
- Create Liquid filters for page/post edit, category/tag link
- Update all themes to use these filters
- Add delete for pages/posts
- Move category/page functions to Admin module
This commit is contained in:
2022-05-21 00:07:16 -04:00
parent ea8d4b1c63
commit 0a21240984
35 changed files with 796 additions and 357 deletions

View File

@@ -24,7 +24,7 @@
</span>
{% if logged_on %}
<span>
<a href="/post/{{ post.id }}/edit"><i class="fa fa-pencil-square-o"></i> Edit Post</a>
<a href="{{ post.id | edit_post_link }}"><i class="fa fa-pencil-square-o"></i> Edit Post</a>
</span>
{% endif %}
</h4>

View File

@@ -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/{{ post.id }}/edit"><i class="fa fa-pencil-square-o"></i> Edit Post</a></span>
<span><a href="{{ post.id | 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="/category/{{ cat.slug }}/" title="Categorized under &ldquo;{{ cat.name | escape }}&rdquo;">
<a href="{{ cat.slug | category_link }}" title="Categorized under &ldquo;{{ cat.name | escape }}&rdquo;">
{{ cat.name }}
</a> &nbsp; &nbsp;
</span>
@@ -40,7 +40,7 @@
Tagged &nbsp;
{% for tag in post.tags %}
<span class="no-wrap">
<a href="/tag/{{ tag | replace: " ", "+" }}/" title="Posts tagged &ldquo;{{ tag | escape }}&rdquo;">
<a href="{{ tag | tag_link }}" title="Posts tagged &ldquo;{{ tag | escape }}&rdquo;" rel="tag">
<i class="fa fa-tag"></i> {{ tag }}
</a> &nbsp; &nbsp;
</span>