Skip to content

Commit b5b0656

Browse files
committed
HTML/Tera templates: allow line breaks in devlog titles, using '~'
1 parent b07713a commit b5b0656

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

website/templates/devlog-page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{% block content %}
1111
<div class="flex items-center flex-col mt-10">
1212
<div class="markdown-content">
13-
<h1>{{ page.title }}</h1>
13+
<h1>{{ page.title | replace(from="~", to="<br>") | safe }}</h1>
1414
</div>
1515

1616
<div class="author-date">

website/templates/devlog.html

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,15 @@
3434

3535
{# linked icon (like PR) could come here #}
3636

37-
<div class="flex-grow border border-2 doc-button rounded-xl p-5 shadow-2xl transform transition duration-300 hover:scale-105
38-
{% if page.title == 'master' %}
39-
button-background
40-
{% else %}
41-
button-background-2
42-
{% endif %}
43-
">
37+
<!-- Article title -->
38+
<div class="flex-grow border border-2 doc-button rounded-xl p-5 shadow-2xl transform transition duration-300 hover:scale-105 button-background-2">
4439
<a href="{{ page.permalink }}" class="pr-link-box" title="API docs for {{ page.title }}"></a>
4540
<div class="flex flex-col justify-center"><!-- py-2 -->
46-
<h3 class="pr-num">{{ page.title }}</h3>
41+
<h3 class="pr-num">{{ page.title | replace(from="~", to="<br>") | safe }}</h3>
4742
<p>{{ page.description }}</p>
4843
</div>
4944

50-
<!-- PR title -->
45+
<!-- Article subtitle/summary -->
5146
<div class="flex flex-wrap py-2">
5247
<div class="flex items-center">
5348
<div class="pr-content flex space-x-3 text-gray-900 dark:text-gray-400">

0 commit comments

Comments
 (0)