@geekity/cms 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +445 -63
- package/admin/layouts/shell.njk +13 -6
- package/admin/pages/comments/all.njk +3 -0
- package/admin/pages/error.njk +11 -0
- package/admin/pages/settings/discussion.njk +53 -0
- package/admin/pages/settings/email.njk +20 -0
- package/admin/pages/tools/personal-data.njk +67 -0
- package/admin/pages/users/edit.njk +1 -1
- package/admin/static/admin.css +69 -15
- package/dist/admin/comments.d.ts +5 -0
- package/dist/admin/comments.d.ts.map +1 -1
- package/dist/admin/comments.js +13 -0
- package/dist/admin/comments.js.map +1 -1
- package/dist/admin/documents.d.ts.map +1 -1
- package/dist/admin/documents.js +58 -31
- package/dist/admin/documents.js.map +1 -1
- package/dist/admin/headers.d.ts +14 -5
- package/dist/admin/headers.d.ts.map +1 -1
- package/dist/admin/headers.js +18 -6
- package/dist/admin/headers.js.map +1 -1
- package/dist/admin/index.d.ts +1 -1
- package/dist/admin/index.d.ts.map +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/menu.d.ts.map +1 -1
- package/dist/admin/menu.js +5 -1
- package/dist/admin/menu.js.map +1 -1
- package/dist/admin/personal-data.d.ts +35 -0
- package/dist/admin/personal-data.d.ts.map +1 -0
- package/dist/admin/personal-data.js +90 -0
- package/dist/admin/personal-data.js.map +1 -0
- package/dist/admin/routes.d.ts.map +1 -1
- package/dist/admin/routes.js +23 -4
- package/dist/admin/routes.js.map +1 -1
- package/dist/admin/session.d.ts +42 -1
- package/dist/admin/session.d.ts.map +1 -1
- package/dist/admin/session.js +74 -4
- package/dist/admin/session.js.map +1 -1
- package/dist/admin/settings-discussion.d.ts.map +1 -1
- package/dist/admin/settings-discussion.js +9 -1
- package/dist/admin/settings-discussion.js.map +1 -1
- package/dist/admin/settings-email.d.ts.map +1 -1
- package/dist/admin/settings-email.js +10 -1
- package/dist/admin/settings-email.js.map +1 -1
- package/dist/admin/settings.d.ts +39 -0
- package/dist/admin/settings.d.ts.map +1 -1
- package/dist/admin/settings.js +144 -0
- package/dist/admin/settings.js.map +1 -1
- package/dist/admin/store.d.ts +30 -0
- package/dist/admin/store.d.ts.map +1 -1
- package/dist/admin/store.js +68 -5
- package/dist/admin/store.js.map +1 -1
- package/dist/admin/templates.d.ts +2 -0
- package/dist/admin/templates.d.ts.map +1 -1
- package/dist/admin/templates.js +2 -0
- package/dist/admin/templates.js.map +1 -1
- package/dist/avatars/avatars.d.ts +112 -0
- package/dist/avatars/avatars.d.ts.map +1 -0
- package/dist/avatars/avatars.js +259 -0
- package/dist/avatars/avatars.js.map +1 -0
- package/dist/avatars/index.d.ts +4 -0
- package/dist/avatars/index.d.ts.map +1 -0
- package/dist/avatars/index.js +3 -0
- package/dist/avatars/index.js.map +1 -0
- package/dist/avatars/routes.d.ts +11 -0
- package/dist/avatars/routes.d.ts.map +1 -0
- package/dist/avatars/routes.js +33 -0
- package/dist/avatars/routes.js.map +1 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +128 -3
- package/dist/cli.js.map +1 -1
- package/dist/comments/records.d.ts +15 -0
- package/dist/comments/records.d.ts.map +1 -1
- package/dist/comments/records.js +51 -1
- package/dist/comments/records.js.map +1 -1
- package/dist/comments/routes.d.ts.map +1 -1
- package/dist/comments/routes.js +7 -1
- package/dist/comments/routes.js.map +1 -1
- package/dist/config.d.ts +37 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +58 -0
- package/dist/config.js.map +1 -1
- package/dist/contact/index.d.ts +1 -1
- package/dist/contact/index.d.ts.map +1 -1
- package/dist/contact/index.js +1 -1
- package/dist/contact/index.js.map +1 -1
- package/dist/contact/records.d.ts +8 -2
- package/dist/contact/records.d.ts.map +1 -1
- package/dist/contact/records.js +13 -6
- package/dist/contact/records.js.map +1 -1
- package/dist/content/document.d.ts +10 -2
- package/dist/content/document.d.ts.map +1 -1
- package/dist/content/document.js +1 -0
- package/dist/content/document.js.map +1 -1
- package/dist/content/parser.d.ts.map +1 -1
- package/dist/content/parser.js +13 -0
- package/dist/content/parser.js.map +1 -1
- package/dist/content/store.d.ts +13 -2
- package/dist/content/store.d.ts.map +1 -1
- package/dist/content/store.js +45 -1
- package/dist/content/store.js.map +1 -1
- package/dist/content/writer.d.ts.map +1 -1
- package/dist/content/writer.js +4 -0
- package/dist/content/writer.js.map +1 -1
- package/dist/env.d.ts +18 -0
- package/dist/env.d.ts.map +1 -1
- package/dist/federation/article.d.ts +9 -0
- package/dist/federation/article.d.ts.map +1 -1
- package/dist/federation/article.js +24 -2
- package/dist/federation/article.js.map +1 -1
- package/dist/federation/federation.d.ts.map +1 -1
- package/dist/federation/federation.js +24 -6
- package/dist/federation/federation.js.map +1 -1
- package/dist/federation/inbox.d.ts +17 -3
- package/dist/federation/inbox.d.ts.map +1 -1
- package/dist/federation/inbox.js +72 -6
- package/dist/federation/inbox.js.map +1 -1
- package/dist/federation/mount.d.ts.map +1 -1
- package/dist/federation/mount.js +8 -3
- package/dist/federation/mount.js.map +1 -1
- package/dist/federation/paths.d.ts +5 -0
- package/dist/federation/paths.d.ts.map +1 -1
- package/dist/federation/paths.js +5 -0
- package/dist/federation/paths.js.map +1 -1
- package/dist/federation/quotes.d.ts +58 -0
- package/dist/federation/quotes.d.ts.map +1 -0
- package/dist/federation/quotes.js +89 -0
- package/dist/federation/quotes.js.map +1 -0
- package/dist/federation/replies.d.ts +23 -0
- package/dist/federation/replies.d.ts.map +1 -1
- package/dist/federation/replies.js +47 -10
- package/dist/federation/replies.js.map +1 -1
- package/dist/federation/wordpress.d.ts.map +1 -1
- package/dist/federation/wordpress.js +5 -4
- package/dist/federation/wordpress.js.map +1 -1
- package/dist/index.d.ts +23 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +64 -7
- package/dist/index.js.map +1 -1
- package/dist/maintenance.d.ts +47 -0
- package/dist/maintenance.d.ts.map +1 -0
- package/dist/maintenance.js +78 -0
- package/dist/maintenance.js.map +1 -0
- package/dist/notifications/index.d.ts +1 -1
- package/dist/notifications/index.d.ts.map +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/optouts.d.ts +6 -0
- package/dist/notifications/optouts.d.ts.map +1 -1
- package/dist/notifications/optouts.js +17 -0
- package/dist/notifications/optouts.js.map +1 -1
- package/dist/privacy/erase.d.ts +45 -0
- package/dist/privacy/erase.d.ts.map +1 -0
- package/dist/privacy/erase.js +77 -0
- package/dist/privacy/erase.js.map +1 -0
- package/dist/privacy/policy.d.ts +32 -0
- package/dist/privacy/policy.d.ts.map +1 -0
- package/dist/privacy/policy.js +37 -0
- package/dist/privacy/policy.js.map +1 -0
- package/dist/privacy/retention.d.ts +79 -0
- package/dist/privacy/retention.d.ts.map +1 -0
- package/dist/privacy/retention.js +133 -0
- package/dist/privacy/retention.js.map +1 -0
- package/dist/web/conversation.d.ts +9 -1
- package/dist/web/conversation.d.ts.map +1 -1
- package/dist/web/conversation.js +69 -39
- package/dist/web/conversation.js.map +1 -1
- package/dist/web/documents.d.ts +9 -0
- package/dist/web/documents.d.ts.map +1 -1
- package/dist/web/documents.js +31 -0
- package/dist/web/documents.js.map +1 -1
- package/dist/web/errors.d.ts +19 -0
- package/dist/web/errors.d.ts.map +1 -0
- package/dist/web/errors.js +93 -0
- package/dist/web/errors.js.map +1 -0
- package/dist/web/health.d.ts +6 -0
- package/dist/web/health.d.ts.map +1 -1
- package/dist/web/health.js +5 -1
- package/dist/web/health.js.map +1 -1
- package/dist/web/index.d.ts +5 -0
- package/dist/web/index.d.ts.map +1 -1
- package/dist/web/index.js +4 -0
- package/dist/web/index.js.map +1 -1
- package/dist/web/maintenance.d.ts +18 -0
- package/dist/web/maintenance.d.ts.map +1 -0
- package/dist/web/maintenance.js +113 -0
- package/dist/web/maintenance.js.map +1 -0
- package/dist/web/redirects.d.ts +75 -0
- package/dist/web/redirects.d.ts.map +1 -0
- package/dist/web/redirects.js +200 -0
- package/dist/web/redirects.js.map +1 -0
- package/dist/web/render.d.ts +9 -0
- package/dist/web/render.d.ts.map +1 -1
- package/dist/web/render.js +19 -0
- package/dist/web/render.js.map +1 -1
- package/dist/web/routes.d.ts.map +1 -1
- package/dist/web/routes.js +57 -0
- package/dist/web/routes.js.map +1 -1
- package/dist/web/well-known.d.ts +21 -0
- package/dist/web/well-known.d.ts.map +1 -0
- package/dist/web/well-known.js +66 -0
- package/dist/web/well-known.js.map +1 -0
- package/dist/webmention/fetch-public.d.ts +34 -0
- package/dist/webmention/fetch-public.d.ts.map +1 -0
- package/dist/webmention/fetch-public.js +101 -0
- package/dist/webmention/fetch-public.js.map +1 -0
- package/dist/webmention/reply-context.d.ts.map +1 -1
- package/dist/webmention/reply-context.js +12 -89
- package/dist/webmention/reply-context.js.map +1 -1
- package/package.json +1 -1
- package/templates/site/content/_data/site.json +7 -1
- package/templates/site/content/pages/privacy.md +127 -0
- package/themes/default/README.md +58 -19
- package/themes/default/layouts/500.njk +8 -0
- package/themes/default/layouts/503.njk +8 -0
package/admin/layouts/shell.njk
CHANGED
|
@@ -7,12 +7,19 @@
|
|
|
7
7
|
<a class="admin-bar-site" href="{{ adminUrl }}">{{ site.title }}</a>
|
|
8
8
|
<a href="{{ siteUrl }}">View site</a>
|
|
9
9
|
<span class="admin-bar-spacer"></span>
|
|
10
|
-
{% if
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
</
|
|
10
|
+
{% if me %}
|
|
11
|
+
{# WordPress's "Howdy," menu, greeting the way this site's owner does.
|
|
12
|
+
A popover rather than a script: the browser opens and closes it,
|
|
13
|
+
shuts it on Escape or a click elsewhere, and tells a screen reader
|
|
14
|
+
whether it is expanded, all under the CSP's script-src 'self'. #}
|
|
15
|
+
<button type="button" class="admin-bar-account" popovertarget="admin-account-menu">Hoopla! {{ me.name }}</button>
|
|
16
|
+
<div id="admin-account-menu" class="admin-account-menu" popover>
|
|
17
|
+
<a href="{{ me.url }}">Edit profile</a>
|
|
18
|
+
<form method="post" action="{{ logoutUrl }}">
|
|
19
|
+
<input type="hidden" name="csrf_token" value="{{ csrfToken }}" />
|
|
20
|
+
<button type="submit">Log out</button>
|
|
21
|
+
</form>
|
|
22
|
+
</div>
|
|
16
23
|
{% endif %}
|
|
17
24
|
</header>
|
|
18
25
|
{% endblock %}
|
|
@@ -60,6 +60,9 @@
|
|
|
60
60
|
{% if row.address %}
|
|
61
61
|
· <code title="A salted hash of the address it came from">{{ row.address }}</code>
|
|
62
62
|
{% endif %}
|
|
63
|
+
{% if row.removed %}
|
|
64
|
+
· {{ row.removed }}
|
|
65
|
+
{% endif %}
|
|
63
66
|
</p>
|
|
64
67
|
|
|
65
68
|
<div class="admin-comment-body">{{ row.html | safe }}</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{% extends "layouts/base.njk" %}
|
|
2
|
+
|
|
3
|
+
{% block title %}Something went wrong{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block content %}
|
|
6
|
+
{# The page an admin request that threw answers with. It extends the bare
|
|
7
|
+
layout rather than the shell because the shell reads the session, the
|
|
8
|
+
menu and the site, and any of those may be what failed. #}
|
|
9
|
+
<h1>Something went wrong</h1>
|
|
10
|
+
<p>This screen could not be shown because of a problem on the server. The error has been logged. Try again in a moment, or go back to the <a href="{{ adminUrl }}">dashboard</a>.</p>
|
|
11
|
+
{% endblock %}
|
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
{% extends "layouts/settings-page.njk" %}
|
|
3
3
|
{% import "components/fields.njk" as field %}
|
|
4
4
|
|
|
5
|
+
{# What a retention field says about the period as it stands: kept forever at
|
|
6
|
+
0, removed after so many days otherwise. Nothing for a value the form is
|
|
7
|
+
about to refuse, which has its own error line. #}
|
|
8
|
+
{% macro retention(days) %}
|
|
9
|
+
{%- if days == '0' -%}
|
|
10
|
+
<strong>Kept forever.</strong>
|
|
11
|
+
{%- elif days | int > 0 -%}
|
|
12
|
+
<strong>Removed after {{ days }} day{% if days != '1' %}s{% endif %}.</strong>
|
|
13
|
+
{%- endif -%}
|
|
14
|
+
{% endmacro %}
|
|
15
|
+
|
|
5
16
|
{% block settingsFields %}
|
|
6
17
|
<h2>Comments</h2>
|
|
7
18
|
|
|
@@ -41,6 +52,48 @@
|
|
|
41
52
|
{% endset %}
|
|
42
53
|
{{ field.checkbox('settings-webmentions-receive', fields.webmentionsReceive,
|
|
43
54
|
'Accept webmentions sent here', checked=form.webmentionsReceive, hint=receiveHint) }}
|
|
55
|
+
|
|
56
|
+
<h2>Keeping personal data</h2>
|
|
57
|
+
|
|
58
|
+
<p class="admin-hint">
|
|
59
|
+
How long the site keeps what commenters and people writing through the
|
|
60
|
+
contact form hand it, in days from when it arrived; <code>0</code> keeps
|
|
61
|
+
it forever. A site that has never set these keeps everything, so upgrading
|
|
62
|
+
removes nothing. The recommended periods are 180 days for emails, 30 for
|
|
63
|
+
address hashes and 365 for contact messages, which is what a new site
|
|
64
|
+
starts with. A sweep removes whatever has outlived its period every few
|
|
65
|
+
hours. Tools › Personal data erases one person's data on request.
|
|
66
|
+
</p>
|
|
67
|
+
|
|
68
|
+
{% set emailHint %}
|
|
69
|
+
{{ retention(form.commentEmailRetentionDays) }}
|
|
70
|
+
Past this a comment loses its author's email. The comment, its place in
|
|
71
|
+
the thread and its moderation status stay; the author is no longer told
|
|
72
|
+
about replies, and their next comment waits for a moderator. Recommended:
|
|
73
|
+
<code>180</code>.
|
|
74
|
+
{% endset %}
|
|
75
|
+
{{ field.text('settings-comment-email-retention', fields.commentEmailRetentionDays,
|
|
76
|
+
'Keep commenter emails for', form.commentEmailRetentionDays, type='number', min='0',
|
|
77
|
+
step='1', error=problems.commentEmailRetentionDays, hint=emailHint) }}
|
|
78
|
+
|
|
79
|
+
{% set hashHint %}
|
|
80
|
+
{{ retention(form.addressHashRetentionDays) }}
|
|
81
|
+
The salted hash of the address a comment, webmention or contact message
|
|
82
|
+
came from, which shows a moderator that two came from one place.
|
|
83
|
+
Recommended: <code>30</code>.
|
|
84
|
+
{% endset %}
|
|
85
|
+
{{ field.text('settings-address-hash-retention', fields.addressHashRetentionDays,
|
|
86
|
+
'Keep address hashes for', form.addressHashRetentionDays, type='number', min='0',
|
|
87
|
+
step='1', error=problems.addressHashRetentionDays, hint=hashHint) }}
|
|
88
|
+
|
|
89
|
+
{% set contactHint %}
|
|
90
|
+
{{ retention(form.contactMessageRetentionDays) }}
|
|
91
|
+
Past this a contact message is deleted from the Messages screen and from
|
|
92
|
+
<code>data/contact/</code>. Recommended: <code>365</code>.
|
|
93
|
+
{% endset %}
|
|
94
|
+
{{ field.text('settings-contact-message-retention', fields.contactMessageRetentionDays,
|
|
95
|
+
'Keep contact messages for', form.contactMessageRetentionDays, type='number', min='0',
|
|
96
|
+
step='1', error=problems.contactMessageRetentionDays, hint=contactHint) }}
|
|
44
97
|
{% endblock %}
|
|
45
98
|
|
|
46
99
|
{% block settingsPanels %}
|
|
@@ -39,6 +39,26 @@
|
|
|
39
39
|
{% endset %}
|
|
40
40
|
{{ field.text('settings-contact-email', fields.contactEmail, 'Contact address',
|
|
41
41
|
form.contactEmail, error=problems.contactEmail, hint=contactHint, inputmode='email') }}
|
|
42
|
+
|
|
43
|
+
<h2>Security contact</h2>
|
|
44
|
+
|
|
45
|
+
{% set securityContactsHint %}
|
|
46
|
+
Where somebody who finds a vulnerability in this site should report it, one per line:
|
|
47
|
+
an email address, an <code>https://</code> URL or a <code>tel:</code> number. They are
|
|
48
|
+
published at <a href="/.well-known/security.txt"><code>/.well-known/security.txt</code></a>,
|
|
49
|
+
which is not served at all while this is empty.
|
|
50
|
+
{% endset %}
|
|
51
|
+
{{ field.textarea('settings-security-contacts', fields.securityContacts, 'Contacts',
|
|
52
|
+
form.securityContacts, error=problems.securityContacts, hint=securityContactsHint,
|
|
53
|
+
rows='2', spellcheck='false') }}
|
|
54
|
+
|
|
55
|
+
{{ field.text('settings-security-policy', fields.securityPolicy, 'Disclosure policy',
|
|
56
|
+
form.securityPolicy, error=problems.securityPolicy, inputmode='url',
|
|
57
|
+
hint='Optional. An https:// URL for the page that says how reports are handled.') }}
|
|
58
|
+
|
|
59
|
+
{{ field.text('settings-security-languages', fields.securityLanguages, 'Preferred languages',
|
|
60
|
+
form.securityLanguages, error=problems.securityLanguages,
|
|
61
|
+
hint='Optional. The languages a report may be written in, such as en, fr.') }}
|
|
42
62
|
{% endblock %}
|
|
43
63
|
|
|
44
64
|
{% block settingsPanels %}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{# /admin/tools/personal-data: erasing one person's data when they ask
|
|
2
|
+
(TASK-135). Looking is a step of its own because erasing cannot be undone. #}
|
|
3
|
+
{% extends "layouts/shell.njk" %}
|
|
4
|
+
{% import "components/fields.njk" as field %}
|
|
5
|
+
|
|
6
|
+
{% block title %}{{ heading }}{% endblock %}
|
|
7
|
+
|
|
8
|
+
{% block content %}
|
|
9
|
+
<h1>{{ heading }}</h1>
|
|
10
|
+
|
|
11
|
+
<p>
|
|
12
|
+
When somebody asks for what this site holds about them to be erased, type
|
|
13
|
+
the email address they commented or wrote in under. Their comments stay in
|
|
14
|
+
their threads, with their words and their moderation status, signed
|
|
15
|
+
<strong>{{ erasedName }}</strong> and with their email, website and address
|
|
16
|
+
hash removed. Their contact messages are deleted, and the address comes off
|
|
17
|
+
the list of people who asked not to be emailed about replies.
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
{% if found %}
|
|
21
|
+
<form class="admin-settings" method="post" action="{{ actionUrl }}">
|
|
22
|
+
<input type="hidden" name="csrf_token" value="{{ csrfToken }}" />
|
|
23
|
+
<input type="hidden" name="{{ fields.email }}" value="{{ email }}" />
|
|
24
|
+
<input type="hidden" name="{{ fields.confirm }}" value="1" />
|
|
25
|
+
|
|
26
|
+
<h2>What this site holds for {{ email }}</h2>
|
|
27
|
+
|
|
28
|
+
<ul>
|
|
29
|
+
<li>{{ found.comments }}</li>
|
|
30
|
+
<li>{{ found.messages }}</li>
|
|
31
|
+
<li>
|
|
32
|
+
{% if found.optedOut %}On{% else %}Not on{% endif %} the list of addresses not
|
|
33
|
+
to email about replies
|
|
34
|
+
</li>
|
|
35
|
+
</ul>
|
|
36
|
+
|
|
37
|
+
{% if found.anything %}
|
|
38
|
+
<p>
|
|
39
|
+
Erasing cannot be undone. A copy of a comment file in git history or in a
|
|
40
|
+
backup keeps what it held; this changes the site as it is now.
|
|
41
|
+
</p>
|
|
42
|
+
<p class="admin-settings-buttons">
|
|
43
|
+
<button type="submit">Erase it</button>
|
|
44
|
+
<a href="{{ actionUrl }}">Cancel</a>
|
|
45
|
+
</p>
|
|
46
|
+
{% else %}
|
|
47
|
+
<p>There is nothing to erase for that address.</p>
|
|
48
|
+
<p class="admin-settings-buttons"><a href="{{ actionUrl }}">Look for another</a></p>
|
|
49
|
+
{% endif %}
|
|
50
|
+
</form>
|
|
51
|
+
{% else %}
|
|
52
|
+
<form class="admin-settings" method="post" action="{{ actionUrl }}">
|
|
53
|
+
<input type="hidden" name="csrf_token" value="{{ csrfToken }}" />
|
|
54
|
+
{{ field.text('personal-data-email', fields.email, 'Email address', email,
|
|
55
|
+
type='email', error=problem) }}
|
|
56
|
+
<p class="admin-settings-buttons">
|
|
57
|
+
<button type="submit">Look for it</button>
|
|
58
|
+
</p>
|
|
59
|
+
</form>
|
|
60
|
+
{% endif %}
|
|
61
|
+
|
|
62
|
+
<p class="admin-hint">
|
|
63
|
+
Comments are found by the email they carry, so a comment whose email the
|
|
64
|
+
retention sweep has already removed, a webmention and a fediverse reply are
|
|
65
|
+
not found here. Delete those one by one from the Comments screen.
|
|
66
|
+
</p>
|
|
67
|
+
{% endblock %}
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
Resetting a colleague's password from under them is deliberately not
|
|
214
214
|
offered — a fresh account is what that is for. #}
|
|
215
215
|
{% if account.you %}
|
|
216
|
-
<form class="admin-settings" method="post" action="{{ changePasswordUrl }}">
|
|
216
|
+
<form class="admin-settings" id="change-password" method="post" action="{{ changePasswordUrl }}">
|
|
217
217
|
<input type="hidden" name="csrf_token" value="{{ csrfToken }}" />
|
|
218
218
|
|
|
219
219
|
<h2>Change your password</h2>
|
package/admin/static/admin.css
CHANGED
|
@@ -54,11 +54,13 @@ a {
|
|
|
54
54
|
min-height: 2.5rem;
|
|
55
55
|
background: var(--admin-bar);
|
|
56
56
|
color: var(--admin-nav-text);
|
|
57
|
+
anchor-name: --admin-bar;
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
.admin-bar a {
|
|
60
61
|
color: var(--admin-nav-text);
|
|
61
62
|
text-decoration: none;
|
|
63
|
+
white-space: nowrap;
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
.admin-bar a:hover,
|
|
@@ -74,22 +76,71 @@ a {
|
|
|
74
76
|
flex: 1;
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
.admin-bar-
|
|
78
|
-
|
|
79
|
+
.admin-bar-account {
|
|
80
|
+
padding: 0;
|
|
81
|
+
border: 0;
|
|
82
|
+
background: none;
|
|
83
|
+
color: var(--admin-nav-text);
|
|
84
|
+
font: inherit;
|
|
85
|
+
text-align: right;
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
anchor-name: --admin-account;
|
|
79
88
|
}
|
|
80
89
|
|
|
81
|
-
.admin-bar
|
|
82
|
-
|
|
90
|
+
.admin-bar-account:hover,
|
|
91
|
+
.admin-bar-account:focus-visible,
|
|
92
|
+
.admin-bar-account:popover-open {
|
|
93
|
+
color: #72aee6;
|
|
83
94
|
}
|
|
84
95
|
|
|
85
|
-
.admin-bar
|
|
86
|
-
|
|
96
|
+
.admin-bar-account::after {
|
|
97
|
+
content: ' \25BE' / '';
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* The menu is in the top layer, so it is placed rather than laid out: under
|
|
101
|
+
the greeting where anchor positioning exists, at the bar's right edge
|
|
102
|
+
where it does not. */
|
|
103
|
+
|
|
104
|
+
.admin-account-menu {
|
|
105
|
+
inset: 2.5rem 0 auto auto;
|
|
106
|
+
margin: 0;
|
|
107
|
+
min-width: 10rem;
|
|
108
|
+
padding: 0.25rem 0;
|
|
109
|
+
border: 0;
|
|
110
|
+
background: var(--admin-nav);
|
|
111
|
+
color: var(--admin-nav-text);
|
|
112
|
+
box-shadow: 0 3px 5px rgb(0 0 0 / 20%);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@supports (top: anchor(--admin-bar bottom)) {
|
|
116
|
+
.admin-account-menu {
|
|
117
|
+
inset: anchor(--admin-bar bottom) anchor(--admin-account right) auto auto;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.admin-account-menu a,
|
|
122
|
+
.admin-account-menu button[type='submit'] {
|
|
123
|
+
display: block;
|
|
124
|
+
box-sizing: border-box;
|
|
125
|
+
width: 100%;
|
|
126
|
+
margin: 0;
|
|
127
|
+
padding: 0.5rem 1rem;
|
|
87
128
|
border: 0;
|
|
129
|
+
border-radius: 0;
|
|
88
130
|
background: none;
|
|
89
131
|
color: var(--admin-nav-text);
|
|
90
132
|
font: inherit;
|
|
133
|
+
text-align: left;
|
|
134
|
+
text-decoration: none;
|
|
91
135
|
cursor: pointer;
|
|
92
|
-
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.admin-account-menu a:hover,
|
|
139
|
+
.admin-account-menu a:focus-visible,
|
|
140
|
+
.admin-account-menu button[type='submit']:hover,
|
|
141
|
+
.admin-account-menu button[type='submit']:focus-visible {
|
|
142
|
+
background: var(--admin-bar);
|
|
143
|
+
color: #72aee6;
|
|
93
144
|
}
|
|
94
145
|
|
|
95
146
|
/* The shell: navigation column beside the screen itself. */
|
|
@@ -331,6 +382,8 @@ label {
|
|
|
331
382
|
input[type='text'],
|
|
332
383
|
input[type='password'],
|
|
333
384
|
input[type='email'],
|
|
385
|
+
input[type='url'],
|
|
386
|
+
select,
|
|
334
387
|
textarea {
|
|
335
388
|
width: 100%;
|
|
336
389
|
padding: 0.4rem 0.5rem;
|
|
@@ -346,6 +399,13 @@ textarea {
|
|
|
346
399
|
resize: vertical;
|
|
347
400
|
}
|
|
348
401
|
|
|
402
|
+
/* A select lays its text out at line-height: normal whatever it inherits, so
|
|
403
|
+
it is given the height a text box reaches: the body's 1.6 line, the padding
|
|
404
|
+
and the border. */
|
|
405
|
+
select {
|
|
406
|
+
min-height: calc(1.6em + 0.8rem + 2px);
|
|
407
|
+
}
|
|
408
|
+
|
|
349
409
|
button[type='submit'],
|
|
350
410
|
.admin-button {
|
|
351
411
|
margin-top: 1rem;
|
|
@@ -477,6 +537,7 @@ button[type='submit']:hover,
|
|
|
477
537
|
|
|
478
538
|
.admin-check input {
|
|
479
539
|
width: auto;
|
|
540
|
+
margin: 0;
|
|
480
541
|
}
|
|
481
542
|
|
|
482
543
|
.admin-editor-buttons {
|
|
@@ -659,14 +720,6 @@ button[type='submit']:hover,
|
|
|
659
720
|
border-top: 0;
|
|
660
721
|
}
|
|
661
722
|
|
|
662
|
-
.admin-settings select {
|
|
663
|
-
padding: 0.4rem 0.5rem;
|
|
664
|
-
border: 1px solid #8c8f94;
|
|
665
|
-
background: var(--admin-surface);
|
|
666
|
-
color: inherit;
|
|
667
|
-
font: inherit;
|
|
668
|
-
}
|
|
669
|
-
|
|
670
723
|
.admin-settings input:disabled {
|
|
671
724
|
background: var(--admin-field);
|
|
672
725
|
color: var(--admin-muted);
|
|
@@ -877,6 +930,7 @@ button[type='submit']:hover,
|
|
|
877
930
|
switches and windows still reads as one column rather than as a form. */
|
|
878
931
|
|
|
879
932
|
.admin-inline select {
|
|
933
|
+
width: auto;
|
|
880
934
|
margin: 0;
|
|
881
935
|
}
|
|
882
936
|
|
package/dist/admin/comments.d.ts
CHANGED
|
@@ -67,6 +67,11 @@ export interface CommentRow {
|
|
|
67
67
|
submitted: string;
|
|
68
68
|
/** A short form of the address hash, for spotting one machine's run of them. */
|
|
69
69
|
address: string | null;
|
|
70
|
+
/**
|
|
71
|
+
* What privacy took off it, in a few words, or `null` when nothing was
|
|
72
|
+
* (TASK-135): so a moderator can tell an email removed from one never given.
|
|
73
|
+
*/
|
|
74
|
+
removed: string | null;
|
|
70
75
|
/** The post's title, or its slug when the post is not in the index. */
|
|
71
76
|
post: string;
|
|
72
77
|
/** Where the post can be read, or `null` when it is not published. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../src/admin/comments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,IAAI,EAAE,MAAM,MAAM,CAAC;AAO1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAOlD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAe,MAAM,YAAY,CAAC;AAGzE;;;;;;;;;;;;;;GAcG;AAEH,uCAAuC;AACvC,eAAO,MAAM,aAAa,oBAA6B,CAAC;AAExD,kDAAkD;AAClD,eAAO,MAAM,gBAAgB,aAAa,CAAC;AAE3C,kCAAkC;AAClC,eAAO,MAAM,sBAAsB,6BAA8B,CAAC;AAElE,kCAAkC;AAClC,eAAO,MAAM,mBAAmB,0BAA2B,CAAC;AAE5D,kDAAkD;AAClD,eAAO,MAAM,oBAAoB;IAC/B,uCAAuC;aACvC,EAAE,EAAE,IAAI;IACR,gEAAgE;aAChE,MAAM,EAAE,QAAQ;IAChB,+CAA+C;aAC/C,IAAI,EAAE,MAAM;IACZ,2CAA2C;aAC3C,MAAM,EAAE,QAAQ;CACR,CAAC;AAEX,mCAAmC;AACnC,eAAO,MAAM,eAAe,YAAI,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAU,CAAC;AAEtE,sCAAsC;AACtC,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,qDAAqD;AACrD,eAAO,MAAM,iBAAiB,KA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ACvB,MAAM,EAAE,aAAa,CAAC;IACtB,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,sDAAsD;IACtD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,SAAS,EAAE,MAAM,CAAC;IAClB,gFAAgF;IAChF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;;OAGG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,sEAAsE;IACtE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,uEAAuE;AACvE,MAAM,WAAW,0BAA0B;IACzC,oFAAoF;IACpF,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,sCAAsC;AACtC,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,EACrB,OAAO,EAAE,0BAA0B,GAClC,IAAI,CA+IN;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAEzD;AAED,yCAAyC;AACzC,wBAAgB,OAAO,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,SAAI,GAAG,MAAM,CAG/D"}
|
package/dist/admin/comments.js
CHANGED
|
@@ -194,6 +194,18 @@ export function listUrl(status, page = 1) {
|
|
|
194
194
|
function statusOf(value) {
|
|
195
195
|
return COMMENT_STATUSES.includes(value) ? value : 'pending';
|
|
196
196
|
}
|
|
197
|
+
/** What a moderator is told was removed from a comment for privacy. */
|
|
198
|
+
function removedNote(redacted) {
|
|
199
|
+
if (redacted === undefined)
|
|
200
|
+
return null;
|
|
201
|
+
if (redacted.includes('author'))
|
|
202
|
+
return 'author erased on request';
|
|
203
|
+
if (redacted.includes('email'))
|
|
204
|
+
return 'email removed after the retention period';
|
|
205
|
+
if (redacted.includes('addressHash'))
|
|
206
|
+
return 'address hash removed after the retention period';
|
|
207
|
+
return null;
|
|
208
|
+
}
|
|
197
209
|
/** The files and the index this request writes through. */
|
|
198
210
|
function recordsOf(c) {
|
|
199
211
|
return { admin: c.var.admin, contentDir: c.var.config.contentDir };
|
|
@@ -214,6 +226,7 @@ function commentRow(c, comment) {
|
|
|
214
226
|
// The first eight characters are enough to see that two comments came from
|
|
215
227
|
// one place, which is the only question the hash is there to answer.
|
|
216
228
|
address: comment.addressHash === null ? null : comment.addressHash.slice(0, 8),
|
|
229
|
+
removed: removedNote(comment.redacted),
|
|
217
230
|
post: document === undefined ? comment.slug : postLabel(document),
|
|
218
231
|
postUrl: comment.permalink === '' ? null : comment.permalink,
|
|
219
232
|
editUrl: document === undefined
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comments.js","sourceRoot":"","sources":["../../src/admin/comments.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAA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GAAE,MAAyB,GAAG,UAAU,CAkB3F;AAiFD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,YAAY,EACnB,IAAI,EAAE,YAAY,EAClB,IAAI,EAAE,MAAM,GACX,QAAQ,GAAG,SAAS,CAWtB;AAED,wDAAwD;AACxD,MAAM,WAAW,WAAW;IAC1B,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,+EAA+E;IAC/E,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,+EAA+E;IAC/E,SAAS,EAAE,OAAO,CAAC;IACnB,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B;;;OAGG;IACH,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;aAAK,QAAQ,EAAE,YAAY;aAAE,SAAS,EAAE,YAAY;CAAW,CAAC;AAoD7F,2EAA2E;AAC3E,wBAAgB,UAAU,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,SAAI,GAAG,MAAM,CAMvF"}
|
package/dist/admin/documents.js
CHANGED
|
@@ -11,6 +11,7 @@ import { DuplicatePermalinkError, isTrashedPath, TRASH_DIRECTORY } from '../cont
|
|
|
11
11
|
import { calendarDayIn, DEFAULT_TIMEZONE, toUtcInstant, wallClockIn, zoneLabel, } from '../content/time.js';
|
|
12
12
|
import { normalizeBody, serializeDocument } from '../content/writer.js';
|
|
13
13
|
import { isPublicDocument } from '../web/documents.js';
|
|
14
|
+
import { absoluteUrl } from '../web/negotiate.js';
|
|
14
15
|
import { COMMENTS_FRONT_MATTER_KEY } from '../comments/policy.js';
|
|
15
16
|
import { CONTACT_FRONT_MATTER_KEY } from '../contact/form.js';
|
|
16
17
|
import { userForAuthor } from '../web/authors.js';
|
|
@@ -258,27 +259,17 @@ async function saveFromForm(c, options) {
|
|
|
258
259
|
const finalSlug = document === undefined
|
|
259
260
|
? await freeSlug({ contentDir, store, type: kind.type, slug, date: filed })
|
|
260
261
|
: slug;
|
|
261
|
-
//
|
|
262
|
-
//
|
|
263
|
-
//
|
|
264
|
-
//
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
const
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
// An empty field is not a request to move: it is a form that carried no
|
|
273
|
-
// permalink, and the promised one is what it keeps. Only a field naming
|
|
274
|
-
// some other URL is somebody asking for the one thing this refuses.
|
|
275
|
-
const submitted = normalizePermalink(form.permalink);
|
|
276
|
-
if (submitted !== undefined && submitted !== promised.permalink) {
|
|
277
|
-
return refuse(`The permalink of a published post is permanent: this ${kind.singular} stays at ${promised.permalink}.`);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
const permalink = promised?.permalink ??
|
|
281
|
-
resolvePermalink({
|
|
262
|
+
// A URL somebody has been shown only moves when the author asks it to, by
|
|
263
|
+
// editing the slug or the permalink: correcting a date refiles the file and
|
|
264
|
+
// leaves the URL where it was. An empty permalink field is a form that
|
|
265
|
+
// carried none, not a request to move.
|
|
266
|
+
const promised = promisedDocument(document, store.now());
|
|
267
|
+
const submitted = normalizePermalink(form.permalink);
|
|
268
|
+
const asked = promised !== undefined &&
|
|
269
|
+
(finalSlug !== promised.slug || (submitted !== undefined && submitted !== promised.permalink));
|
|
270
|
+
const permalink = promised !== undefined && !asked
|
|
271
|
+
? promised.permalink
|
|
272
|
+
: resolvePermalink({
|
|
282
273
|
kind,
|
|
283
274
|
form,
|
|
284
275
|
slug: finalSlug,
|
|
@@ -301,13 +292,14 @@ async function saveFromForm(c, options) {
|
|
|
301
292
|
...(date === undefined ? {} : { date }),
|
|
302
293
|
updated: store.now().toISOString(),
|
|
303
294
|
permalink,
|
|
295
|
+
...optional('redirectFrom', formerPermalinks(document, promised, permalink)),
|
|
304
296
|
tags: kind.tagged ? splitTags(form.tags) : [],
|
|
305
297
|
categories: kind.categorised ? splitTags(form.categories) : [],
|
|
306
298
|
draft,
|
|
307
299
|
...(form.description === '' ? {} : { description: form.description }),
|
|
308
300
|
...optional('author', chosenAuthor(c, form.author, document)),
|
|
309
301
|
...optional('inReplyTo', replyTo(kind, form, document)),
|
|
310
|
-
...optional('activitypub', document
|
|
302
|
+
...optional('activitypub', keptIdentity(document, promised, permalink, c.var.config.baseUrl)),
|
|
311
303
|
extra: resolveExtra(kind, document, form),
|
|
312
304
|
body: form.body,
|
|
313
305
|
};
|
|
@@ -373,19 +365,54 @@ function documentPath(input) {
|
|
|
373
365
|
return input.trashed ? `${TRASH_DIRECTORY}/${relative}` : relative;
|
|
374
366
|
}
|
|
375
367
|
/**
|
|
376
|
-
* The document whose
|
|
368
|
+
* The document whose URL has already been promised, or `undefined` when
|
|
377
369
|
* nothing has been promised yet.
|
|
378
370
|
*
|
|
379
|
-
* A published post
|
|
380
|
-
*
|
|
381
|
-
*
|
|
382
|
-
* and one whose date has not arrived have been shown to nobody, and
|
|
383
|
-
*
|
|
371
|
+
* A published post or page is at a URL readers, search engines and other
|
|
372
|
+
* sites may hold, and a post that was ever announced is at one its followers
|
|
373
|
+
* hold even while it is a draft. A draft nobody was told about, a trashed
|
|
374
|
+
* document and one whose date has not arrived have been shown to nobody, and
|
|
375
|
+
* may move without leaving anything behind.
|
|
384
376
|
*/
|
|
385
|
-
function promisedDocument(
|
|
386
|
-
if (document === undefined
|
|
377
|
+
function promisedDocument(document, now) {
|
|
378
|
+
if (document === undefined)
|
|
387
379
|
return undefined;
|
|
388
|
-
|
|
380
|
+
const announced = document.activitypub?.published !== undefined;
|
|
381
|
+
return isPublicDocument(document, now) || announced ? document : undefined;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* The URLs a document is saved as having lived at (TASK-127).
|
|
385
|
+
*
|
|
386
|
+
* Every entry names the document itself rather than the next hop, so a chain
|
|
387
|
+
* of renames collapses by construction: the URL it is leaving joins the ones
|
|
388
|
+
* it already left, and all of them redirect straight to where it is now. The
|
|
389
|
+
* URL it is arriving at leaves the list, because a document moved back to an
|
|
390
|
+
* old URL lives there again.
|
|
391
|
+
*/
|
|
392
|
+
function formerPermalinks(document, promised, permalink) {
|
|
393
|
+
const left = promised !== undefined && promised.permalink !== permalink ? [promised.permalink] : [];
|
|
394
|
+
const former = [...new Set([...(document?.redirectFrom ?? []), ...left])].filter((url) => url !== permalink);
|
|
395
|
+
return former.length === 0 ? undefined : former;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* The `activitypub` block to write, which pins the object id when a promised
|
|
399
|
+
* post moves (decision-20).
|
|
400
|
+
*
|
|
401
|
+
* decision-13 makes a post's object id its permalink, and a fediverse server
|
|
402
|
+
* cannot rename an object it holds. So the URL the post is leaving is written
|
|
403
|
+
* as its stored id, and the stored-id path does the rest: a peer at the old
|
|
404
|
+
* URL still gets the `Article`, a browser there is sent on, and every `Update`
|
|
405
|
+
* names the id the followers already have. An id the file already stores
|
|
406
|
+
* stays, since it is already what they hold.
|
|
407
|
+
*/
|
|
408
|
+
function keptIdentity(document, promised, permalink, baseUrl) {
|
|
409
|
+
const block = document?.activitypub;
|
|
410
|
+
if (promised === undefined || promised.type !== 'post' || promised.permalink === permalink) {
|
|
411
|
+
return block;
|
|
412
|
+
}
|
|
413
|
+
if (block?.id !== undefined)
|
|
414
|
+
return block;
|
|
415
|
+
return { ...block, id: absoluteUrl(promised.permalink, baseUrl) };
|
|
389
416
|
}
|
|
390
417
|
/**
|
|
391
418
|
* The permalink to write.
|