Skip to content

Commit 1058060

Browse files
committed
Fix article title formatting in templates
1 parent ca280a6 commit 1058060

File tree

8 files changed

+23
-10
lines changed

8 files changed

+23
-10
lines changed

content/posts/Diving-into-Infinite-broccoli-twigl-analysis-1.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: 'Diving into Infinite broccoli: twigl analysis #1'
33
date: 2024-02-14T08:00:00.000Z
44
category: Programming
55
tags: twigl;fractal;gl;shader
6+
status: draft
67
---
78

8-
I'm trying out this new series where I try and understand how shaders work.
9+
I'm trying out this new series where I try and understand how shaders work.

oaitheme/templates/archives.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h1>Archives</h1>
1010
{% for article in dates %}
1111
<tr>
1212
<td>{{ article.date.strftime("%d %b %Y") }}</td>
13-
<td><a href='{{ SITEURL }}/{{ article.url }}'>{{ article.title }}</a></td>
13+
<td><a href='{{ SITEURL }}/{{ article.url }}'>{{ article.title.strip("'") }}</a></td>
1414
</tr>
1515
{% endfor %}
1616
</tbody>

oaitheme/templates/article.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% extends "base.html" %}
2-
{% block description %}Title: {{ article.title }}; Date: {{ article.date|strftime('%Y-%m-%d') }}; Author: {{ article.author }}{% endblock %}
3-
{% block title %}{{ article.title }} — {{ SITENAME }}{% endblock %}
2+
{% block description %}Title: {{ article.title.strip("'") }}; Date: {{ article.date|strftime('%Y-%m-%d') }}; Author: {{ article.author }}{% endblock %}
3+
{% block title %}{{ article.title.strip("'") }} — {{ SITENAME }}{% endblock %}
44
{% block content %}
55
<div class="article" itemscope itemtype="http://schema.org/BlogPosting">
66
<div class="title-card">
@@ -11,7 +11,7 @@
1111
{% endif %}
1212

1313
<div class="article-header">
14-
<h1 itemprop="name headline" class="article-title">{{ article.title }}</h1>
14+
<h1 itemprop="name headline" class="article-title">{{ article.title.strip("'") }}</h1>
1515
</div>
1616
{% if article.subtitle %}
1717
<div class="subtitle">

oaitheme/templates/category.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ <h1>Category <small>{{category}}</small></h1>
88
{% for article in articles %}
99
<tr>
1010
<td>{{ article.date.strftime("%d %b %Y") }}</td>
11-
<td><a href='{{ SITEURL }}/{{ article.url }}'>{{ article.title }}</a></td>
11+
<td><a href='{{ SITEURL }}/{{ article.url }}'>{{ article.title.strip("'") }}</a></td>
1212
</tr>
1313
{% endfor %}
1414
</tbody>

oaitheme/templates/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
<table class="table no-top-table">
66
<tbody>
77
{% for article in articles_page.object_list %}
8-
{% if article.template == 'article' and not article.draft %}
8+
{% if article.template == 'article' %}
99
<tr>
1010
<td>{{ article.date.strftime("%d %b %Y") }}</td>
11-
<td><a href='{{ SITEURL }}/{{ article.url }}'>{{ article.title }}</a></td>
11+
<td><a href='{{ SITEURL }}/{{ article.url }}'>{{ article.title.strip("'") }}</a></td>
1212
</tr>
1313
{% endif %}
1414
{% endfor %}

oaitheme/templates/tag.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ <h1>Tag&nbsp;<small>{{tag}}</small></h1>
99
{% for article in articles %}
1010
<tr>
1111
<td>{{ article.date.strftime("%d %b %Y") }}</td>
12-
<td><a href='{{ SITEURL }}/{{ article.url }}'>{{ article.title }}</a></td>
12+
<td><a href='{{ SITEURL }}/{{ article.url }}'>{{ article.title.strip("'") }}</a></td>
1313
</tr>
1414
{% endfor %}
1515
</tbody>

tina/config.ts

+12
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ export default defineConfig({
4141
isTitle: true,
4242
required: true,
4343
},
44+
{
45+
type: "string",
46+
name: "subtitle",
47+
label: "Subtitle",
48+
},
4449
{
4550
type: "datetime",
4651
name: "date",
@@ -59,6 +64,13 @@ export default defineConfig({
5964
label: "Tags",
6065
required: true,
6166
},
67+
{
68+
type: "string",
69+
name: "status",
70+
label: "Status",
71+
required: true,
72+
options: ["published", "draft" , "hidden"],
73+
},
6274
{
6375
type: "rich-text",
6476
name: "body",

tina/tina-lock.json

+1-1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)