Skip to content

Commit 24aa7a2

Browse files
add removehttp filter, add posttype, and new base
1 parent c882863 commit 24aa7a2

22 files changed

+58
-9
lines changed

lib/filters/removehttp.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict'
2+
3+
module.exports = (str) => {
4+
return str.replace(/(^\w+:|^)\/\//, '')
5+
}

src/_includes/extends/html5boilerplate.njk

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
<head>
55
{% block headMeta %}
6-
<title>{{ title }}</title>
6+
{% if title %}
7+
<title>{{ title }}</title>
8+
{% endif %}
79
<meta charset="utf-8">
810
<meta http-equiv="x-ua-compatible" content="ie=edge">
911
<meta name="description" content="{{ description }}">

src/_layouts/base-reply.njk

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{% extends "extends/html5boilerplate.njk" %}
2+
3+
{% set lang = lang | default(site.lang) %}
4+
{% set description = description | default(site.description) %}
5+
{% set author = author | default(site.author) %}
6+
7+
{% block headStyles %}
8+
{% include "partials/styles-critical.njk" %}
9+
{% include "partials/styles.njk" %}
10+
{% include "partials/scripts.njk" %}
11+
{% endblock %}
12+
13+
{% block headMisc %}
14+
{% if not title %}
15+
<title>In reaction to {{ inreplyto | removehttp }}</title>
16+
{% endif %}
17+
<link rel="manifest" href="/site.webmanifest">
18+
<link rel="apple-touch-icon" href="/_img/icon.png">
19+
{% endblock %}
20+
21+
{% block body %}
22+
{{ super() }}
23+
24+
{{ content | safe }}
25+
{% endblock %}
26+
27+
{% block bodyScripts %}
28+
{% endblock %}

src/_layouts/reply.njk

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
---
2-
layout: base.njk
2+
layout: base-reply.njk
33
---
44
<main class="page">
55
{% include "partials/header.njk" %}
66
<article class="h-entry container mb-4">
77
<div class="mx-auto max-w-40 w-full">
8-
<h1 class="p-name h1">
9-
{{ title }}
8+
<h1 class="p-name h3">
9+
<p class="italic">In reaction to <a href="{{ inreplyto }}">{{ inreplyto | removehttp }}</a></p>
1010
</h1>
1111

1212
{% include "partials/u-url.njk" %}
1313

1414
<p class="text-right italic">
15-
<time class="dt-published" datetime="{{ page.date.toISOString() }}">Created on {{date.toUTCString().substring(0, 16)}}</time>
15+
<time class="dt-published" datetime="{{ page.date.toISOString() }}">Created on {{page.date.toUTCString().substring(0, 16)}}</time>
1616
</p>
17-
<p class="italic">In reaction to <a href="{{ inreplyto }}">{{ inreplyto }}</a></p>
1817
<div class="e-content mt-1">
1918
{{ content | safe }}
2019
</div>

src/b/file-to-program.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: File to program
33
layout: blog.njk
44
date: 2021-01-14
5+
posttype: blog
56
tags:
67
- blog
78
- post

src/b/file-to-program.org

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
title: File to program
66
layout: blog.njk
77
date: 2021-01-14
8+
posttype: blog
89
tags:
910
- blog
1011
- post

src/b/init.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Init
33
layout: blog.njk
44
date: 2020-10-10
5+
posttype: blog
56
tags:
67
- blog
78
- post

src/b/init.org

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
title: Init
66
layout: blog.njk
77
date: 2020-10-10
8+
posttype: blog
89
tags:
910
- blog
1011
- post

src/b/offline-first.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Offline first
33
layout: blog.njk
44
date: 2020-12-22
5+
posttype: blog
56
tags:
67
- blog
78
- post

src/b/offline-first.org

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
title: Offline first
66
layout: blog.njk
77
date: 2020-12-22
8+
posttype: blog
89
tags:
910
- blog
1011
- post

src/b/social-media.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Re-thinking Social media
33
layout: blog.njk
44
date: 2021-01-12
5+
posttype: blog
56
tags:
67
- blog
78
- post

src/b/social-media.org

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
title: Re-thinking Social media
66
layout: blog.njk
77
date: 2021-01-12
8+
posttype: blog
89
tags:
910
- blog
1011
- post

src/b/test-journal.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
layout: note.njk
33
date: 2021-02-13
44
title: let's try journal entry...
5+
posttype: note
56
visibility: private
67
---
78
let's try journal entry

src/b/test-slug.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
layout: article.njk
33
date: 2021-02-13
44
title: Article, test for publishing micropub
5+
posttype: article
56
---
67
Alright, let's see.

src/bk/hala-bala-tumblr-com.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
layout: bookmark.njk
33
date: 2021-02-13
44
title: My dream,life,future
5+
posttype: bookmark
56
bookmarkof: https://hala-bala.tumblr.com/post/145877609940
67
---
78
bookmark ? :)

src/l/uf5bf.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
layout: like.njk
33
date: 2021-02-13
4+
posttype: like
45
bookmarkof: https://rafaj.dev/b/file-to-program/
56
---

src/r/5kocs.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
layout: repost.njk
33
date: 2021-02-13
4+
posttype: repost
45
repostof: https://webmention.rocks/receive/1
56
---

src/r/b8ubw.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
layout: repost.njk
33
date: 2021-02-13
4+
posttype: repost
45
repostof: https://rafaj.dev/b/file-to-program/
56
---

src/r/nuuap.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
layout: repost.njk
33
date: 2021-02-13
4+
posttype: repost
45
repostof: https://hala-bala.tumblr.com/image/145877609940
56
---

src/reply/ob59l.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: reply.njk
33
date: 2021-02-13
4-
title: Nice reply...
4+
posttype: reply
55
inreplyto: https://rafaj.dev/b/file-to-program/
66
---
77
Nice reply

src/reply/quge4.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: reply.njk
33
date: 2021-02-13
4-
title: test reply...
4+
posttype: reply
55
inreplyto: https://rafaj.dev/reply/ob59l/
66
---
77
test reply

src/reply/t0kua.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: reply.njk
33
date: 2021-02-13
4-
title: reply...
4+
posttype: reply
55
inreplyto: https://rafaj.dev/bk/hala-bala-tumblr-com/
66
---
77
reply

0 commit comments

Comments
 (0)