@geekity/cms 0.3.0 → 0.4.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 +2091 -214
- package/admin/components/fields.njk +165 -0
- package/admin/layouts/base.njk +1 -1
- package/admin/layouts/settings-page.njk +26 -0
- package/admin/layouts/shell.njk +17 -3
- package/admin/pages/account/forgot.njk +47 -0
- package/admin/pages/account/login.njk +26 -0
- package/admin/pages/account/reset.njk +38 -0
- package/admin/pages/account/setup.njk +28 -0
- package/admin/pages/appearance/themes.njk +69 -0
- package/admin/pages/comments/all.njk +133 -0
- package/admin/{layouts/dashboard.njk → pages/dashboard/home.njk} +8 -15
- package/admin/{layouts/document-conflict.njk → pages/documents/conflict.njk} +1 -0
- package/admin/pages/documents/editor.njk +196 -0
- package/admin/{layouts/document-list.njk → pages/documents/list.njk} +19 -2
- package/admin/pages/documents/taxonomy.njk +95 -0
- package/admin/pages/federation/followers.njk +238 -0
- package/admin/pages/media/library.njk +160 -0
- package/admin/pages/messages/all.njk +110 -0
- package/admin/{layouts → pages}/placeholder.njk +5 -1
- package/admin/pages/settings/discussion.njk +99 -0
- package/admin/pages/settings/email.njk +203 -0
- package/admin/pages/settings/federation.njk +75 -0
- package/admin/pages/settings/general.njk +29 -0
- package/admin/pages/settings/permalinks.njk +50 -0
- package/admin/pages/settings/reading.njk +72 -0
- package/admin/pages/users/edit.njk +239 -0
- package/admin/pages/users/list.njk +48 -0
- package/admin/pages/users/new.njk +41 -0
- package/admin/static/admin.css +498 -3
- package/admin/static/copy.js +52 -0
- package/admin/static/editor.js +16 -16
- package/admin/static/slug.js +61 -0
- package/dist/admin/accounts.d.ts +413 -0
- package/dist/admin/accounts.d.ts.map +1 -0
- package/dist/admin/accounts.js +680 -0
- package/dist/admin/accounts.js.map +1 -0
- package/dist/admin/appearance.d.ts +80 -0
- package/dist/admin/appearance.d.ts.map +1 -0
- package/dist/admin/appearance.js +136 -0
- package/dist/admin/appearance.js.map +1 -0
- package/dist/admin/comments.d.ts +90 -0
- package/dist/admin/comments.d.ts.map +1 -0
- package/dist/admin/comments.js +244 -0
- package/dist/admin/comments.js.map +1 -0
- package/dist/admin/credentials.d.ts +26 -2
- package/dist/admin/credentials.d.ts.map +1 -1
- package/dist/admin/credentials.js +35 -2
- package/dist/admin/credentials.js.map +1 -1
- package/dist/admin/documents.d.ts +127 -10
- package/dist/admin/documents.d.ts.map +1 -1
- package/dist/admin/documents.js +360 -41
- package/dist/admin/documents.js.map +1 -1
- package/dist/admin/federation.d.ts +151 -50
- package/dist/admin/federation.d.ts.map +1 -1
- package/dist/admin/federation.js +225 -93
- package/dist/admin/federation.js.map +1 -1
- package/dist/admin/formatting.d.ts +20 -0
- package/dist/admin/formatting.d.ts.map +1 -0
- package/dist/admin/formatting.js +72 -0
- package/dist/admin/formatting.js.map +1 -0
- package/dist/admin/headers.d.ts +65 -0
- package/dist/admin/headers.d.ts.map +1 -0
- package/dist/admin/headers.js +104 -0
- package/dist/admin/headers.js.map +1 -0
- package/dist/admin/index.d.ts +38 -12
- package/dist/admin/index.d.ts.map +1 -1
- package/dist/admin/index.js +25 -7
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/media.d.ts +168 -0
- package/dist/admin/media.d.ts.map +1 -0
- package/dist/admin/media.js +295 -0
- package/dist/admin/media.js.map +1 -0
- package/dist/admin/menu.d.ts +79 -0
- package/dist/admin/menu.d.ts.map +1 -0
- package/dist/admin/menu.js +126 -0
- package/dist/admin/menu.js.map +1 -0
- package/dist/admin/messages.d.ts +80 -0
- package/dist/admin/messages.d.ts.map +1 -0
- package/dist/admin/messages.js +152 -0
- package/dist/admin/messages.js.map +1 -0
- package/dist/admin/preview.d.ts.map +1 -1
- package/dist/admin/preview.js +31 -7
- package/dist/admin/preview.js.map +1 -1
- package/dist/admin/recovery.d.ts +92 -0
- package/dist/admin/recovery.d.ts.map +1 -0
- package/dist/admin/recovery.js +229 -0
- package/dist/admin/recovery.js.map +1 -0
- package/dist/admin/routes.d.ts +0 -20
- package/dist/admin/routes.d.ts.map +1 -1
- package/dist/admin/routes.js +155 -105
- package/dist/admin/routes.js.map +1 -1
- package/dist/admin/settings-discussion.d.ts +37 -0
- package/dist/admin/settings-discussion.d.ts.map +1 -0
- package/dist/admin/settings-discussion.js +117 -0
- package/dist/admin/settings-discussion.js.map +1 -0
- package/dist/admin/settings-email.d.ts +54 -0
- package/dist/admin/settings-email.d.ts.map +1 -0
- package/dist/admin/settings-email.js +189 -0
- package/dist/admin/settings-email.js.map +1 -0
- package/dist/admin/settings-federation.d.ts +39 -0
- package/dist/admin/settings-federation.d.ts.map +1 -0
- package/dist/admin/settings-federation.js +103 -0
- package/dist/admin/settings-federation.js.map +1 -0
- package/dist/admin/settings-general.d.ts +12 -0
- package/dist/admin/settings-general.d.ts.map +1 -0
- package/dist/admin/settings-general.js +48 -0
- package/dist/admin/settings-general.js.map +1 -0
- package/dist/admin/settings-page.d.ts +102 -0
- package/dist/admin/settings-page.d.ts.map +1 -0
- package/dist/admin/settings-page.js +126 -0
- package/dist/admin/settings-page.js.map +1 -0
- package/dist/admin/settings-pages.d.ts +19 -0
- package/dist/admin/settings-pages.d.ts.map +1 -0
- package/dist/admin/settings-pages.js +33 -0
- package/dist/admin/settings-pages.js.map +1 -0
- package/dist/admin/settings-permalinks.d.ts +16 -0
- package/dist/admin/settings-permalinks.d.ts.map +1 -0
- package/dist/admin/settings-permalinks.js +32 -0
- package/dist/admin/settings-permalinks.js.map +1 -0
- package/dist/admin/settings-reading.d.ts +33 -0
- package/dist/admin/settings-reading.d.ts.map +1 -0
- package/dist/admin/settings-reading.js +48 -0
- package/dist/admin/settings-reading.js.map +1 -0
- package/dist/admin/settings.d.ts +325 -96
- package/dist/admin/settings.d.ts.map +1 -1
- package/dist/admin/settings.js +650 -308
- package/dist/admin/settings.js.map +1 -1
- package/dist/admin/store.d.ts +606 -152
- package/dist/admin/store.d.ts.map +1 -1
- package/dist/admin/store.js +863 -268
- package/dist/admin/store.js.map +1 -1
- package/dist/admin/taxonomy.d.ts +114 -0
- package/dist/admin/taxonomy.d.ts.map +1 -0
- package/dist/admin/taxonomy.js +289 -0
- package/dist/admin/taxonomy.js.map +1 -0
- package/dist/admin/templates.d.ts +44 -14
- package/dist/admin/templates.d.ts.map +1 -1
- package/dist/admin/templates.js +44 -14
- package/dist/admin/templates.js.map +1 -1
- package/dist/admin/throttle.d.ts +84 -0
- package/dist/admin/throttle.d.ts.map +1 -0
- package/dist/admin/throttle.js +143 -0
- package/dist/admin/throttle.js.map +1 -0
- package/dist/admin/uploads.d.ts +28 -2
- package/dist/admin/uploads.d.ts.map +1 -1
- package/dist/admin/uploads.js +43 -4
- package/dist/admin/uploads.js.map +1 -1
- package/dist/admin/users.d.ts +100 -13
- package/dist/admin/users.d.ts.map +1 -1
- package/dist/admin/users.js +412 -39
- package/dist/admin/users.js.map +1 -1
- package/dist/cache.d.ts +141 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +207 -0
- package/dist/cache.js.map +1 -0
- package/dist/cli.d.ts +14 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +424 -21
- package/dist/cli.js.map +1 -1
- package/dist/comments/akismet.d.ts +130 -0
- package/dist/comments/akismet.d.ts.map +1 -0
- package/dist/comments/akismet.js +274 -0
- package/dist/comments/akismet.js.map +1 -0
- package/dist/comments/conversation.d.ts +29 -0
- package/dist/comments/conversation.d.ts.map +1 -0
- package/dist/comments/conversation.js +60 -0
- package/dist/comments/conversation.js.map +1 -0
- package/dist/comments/form.d.ts +75 -0
- package/dist/comments/form.d.ts.map +1 -0
- package/dist/comments/form.js +64 -0
- package/dist/comments/form.js.map +1 -0
- package/dist/comments/index.d.ts +15 -0
- package/dist/comments/index.d.ts.map +1 -0
- package/dist/comments/index.js +9 -0
- package/dist/comments/index.js.map +1 -0
- package/dist/comments/markdown.d.ts +8 -0
- package/dist/comments/markdown.d.ts.map +1 -0
- package/dist/comments/markdown.js +85 -0
- package/dist/comments/markdown.js.map +1 -0
- package/dist/comments/moderate.d.ts +71 -0
- package/dist/comments/moderate.d.ts.map +1 -0
- package/dist/comments/moderate.js +88 -0
- package/dist/comments/moderate.js.map +1 -0
- package/dist/comments/policy.d.ts +57 -0
- package/dist/comments/policy.d.ts.map +1 -0
- package/dist/comments/policy.js +80 -0
- package/dist/comments/policy.js.map +1 -0
- package/dist/comments/records.d.ts +266 -0
- package/dist/comments/records.d.ts.map +1 -0
- package/dist/comments/records.js +487 -0
- package/dist/comments/records.js.map +1 -0
- package/dist/comments/routes.d.ts +58 -0
- package/dist/comments/routes.d.ts.map +1 -0
- package/dist/comments/routes.js +177 -0
- package/dist/comments/routes.js.map +1 -0
- package/dist/comments/submission.d.ts +263 -0
- package/dist/comments/submission.d.ts.map +1 -0
- package/dist/comments/submission.js +241 -0
- package/dist/comments/submission.js.map +1 -0
- package/dist/config.d.ts +190 -5
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +118 -6
- package/dist/config.js.map +1 -1
- package/dist/contact/delivery.d.ts +60 -0
- package/dist/contact/delivery.d.ts.map +1 -0
- package/dist/contact/delivery.js +87 -0
- package/dist/contact/delivery.js.map +1 -0
- package/dist/contact/form.d.ts +130 -0
- package/dist/contact/form.d.ts.map +1 -0
- package/dist/contact/form.js +163 -0
- package/dist/contact/form.js.map +1 -0
- package/dist/contact/index.d.ts +17 -0
- package/dist/contact/index.d.ts.map +1 -0
- package/dist/contact/index.js +13 -0
- package/dist/contact/index.js.map +1 -0
- package/dist/contact/records.d.ts +124 -0
- package/dist/contact/records.d.ts.map +1 -0
- package/dist/contact/records.js +218 -0
- package/dist/contact/records.js.map +1 -0
- package/dist/contact/routes.d.ts +17 -0
- package/dist/contact/routes.d.ts.map +1 -0
- package/dist/contact/routes.js +127 -0
- package/dist/contact/routes.js.map +1 -0
- package/dist/contact/submission.d.ts +103 -0
- package/dist/contact/submission.d.ts.map +1 -0
- package/dist/contact/submission.js +166 -0
- package/dist/contact/submission.js.map +1 -0
- package/dist/content/document.d.ts +7 -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/index.d.ts +7 -2
- package/dist/content/index.d.ts.map +1 -1
- package/dist/content/index.js +4 -1
- package/dist/content/index.js.map +1 -1
- package/dist/content/markdown.d.ts.map +1 -1
- package/dist/content/markdown.js +24 -2
- package/dist/content/markdown.js.map +1 -1
- package/dist/content/parser.d.ts.map +1 -1
- package/dist/content/parser.js +11 -4
- package/dist/content/parser.js.map +1 -1
- package/dist/content/save.d.ts +5 -0
- package/dist/content/save.d.ts.map +1 -1
- package/dist/content/save.js +44 -1
- package/dist/content/save.js.map +1 -1
- package/dist/content/schedule.d.ts +125 -0
- package/dist/content/schedule.d.ts.map +1 -0
- package/dist/content/schedule.js +207 -0
- package/dist/content/schedule.js.map +1 -0
- package/dist/content/search.d.ts +64 -0
- package/dist/content/search.d.ts.map +1 -0
- package/dist/content/search.js +136 -0
- package/dist/content/search.js.map +1 -0
- package/dist/content/store.d.ts +202 -7
- package/dist/content/store.d.ts.map +1 -1
- package/dist/content/store.js +374 -67
- package/dist/content/store.js.map +1 -1
- package/dist/content/sync.d.ts +7 -1
- package/dist/content/sync.d.ts.map +1 -1
- package/dist/content/sync.js +18 -10
- package/dist/content/sync.js.map +1 -1
- package/dist/content/time.d.ts +56 -0
- package/dist/content/time.d.ts.map +1 -0
- package/dist/content/time.js +141 -0
- package/dist/content/time.js.map +1 -0
- package/dist/content/writer.d.ts.map +1 -1
- package/dist/content/writer.js +3 -0
- package/dist/content/writer.js.map +1 -1
- package/dist/env.d.ts +58 -4
- package/dist/env.d.ts.map +1 -1
- package/dist/federation/actor.d.ts +95 -41
- package/dist/federation/actor.d.ts.map +1 -1
- package/dist/federation/actor.js +180 -53
- package/dist/federation/actor.js.map +1 -1
- package/dist/federation/article.d.ts +44 -17
- package/dist/federation/article.d.ts.map +1 -1
- package/dist/federation/article.js +98 -46
- package/dist/federation/article.js.map +1 -1
- package/dist/federation/delivery.d.ts +63 -15
- package/dist/federation/delivery.d.ts.map +1 -1
- package/dist/federation/delivery.js +154 -80
- package/dist/federation/delivery.js.map +1 -1
- package/dist/federation/federation.d.ts +22 -17
- package/dist/federation/federation.d.ts.map +1 -1
- package/dist/federation/federation.js +98 -77
- package/dist/federation/federation.js.map +1 -1
- package/dist/federation/followers.d.ts +3 -2
- package/dist/federation/followers.d.ts.map +1 -1
- package/dist/federation/followers.js +6 -5
- package/dist/federation/followers.js.map +1 -1
- package/dist/federation/import-wordpress.d.ts +128 -0
- package/dist/federation/import-wordpress.d.ts.map +1 -0
- package/dist/federation/import-wordpress.js +426 -0
- package/dist/federation/import-wordpress.js.map +1 -0
- package/dist/federation/inbox.d.ts +36 -13
- package/dist/federation/inbox.d.ts.map +1 -1
- package/dist/federation/inbox.js +120 -49
- package/dist/federation/inbox.js.map +1 -1
- package/dist/federation/index.d.ts +22 -10
- package/dist/federation/index.d.ts.map +1 -1
- package/dist/federation/index.js +13 -8
- package/dist/federation/index.js.map +1 -1
- package/dist/federation/keys.d.ts +98 -20
- package/dist/federation/keys.d.ts.map +1 -1
- package/dist/federation/keys.js +269 -39
- package/dist/federation/keys.js.map +1 -1
- package/dist/federation/mount.d.ts +42 -10
- package/dist/federation/mount.d.ts.map +1 -1
- package/dist/federation/mount.js +266 -26
- package/dist/federation/mount.js.map +1 -1
- package/dist/federation/paths.d.ts +23 -35
- package/dist/federation/paths.d.ts.map +1 -1
- package/dist/federation/paths.js +26 -39
- package/dist/federation/paths.js.map +1 -1
- package/dist/federation/records.d.ts +223 -0
- package/dist/federation/records.d.ts.map +1 -0
- package/dist/federation/records.js +506 -0
- package/dist/federation/records.js.map +1 -0
- package/dist/federation/relays.d.ts +114 -0
- package/dist/federation/relays.d.ts.map +1 -0
- package/dist/federation/relays.js +290 -0
- package/dist/federation/relays.js.map +1 -0
- package/dist/federation/replies.d.ts +80 -0
- package/dist/federation/replies.d.ts.map +1 -0
- package/dist/federation/replies.js +166 -0
- package/dist/federation/replies.js.map +1 -0
- package/dist/federation/wordpress.d.ts +131 -0
- package/dist/federation/wordpress.d.ts.map +1 -0
- package/dist/federation/wordpress.js +341 -0
- package/dist/federation/wordpress.js.map +1 -0
- package/dist/files/atomic.d.ts +103 -0
- package/dist/files/atomic.d.ts.map +1 -0
- package/dist/files/atomic.js +150 -0
- package/dist/files/atomic.js.map +1 -0
- package/dist/files/index.d.ts +3 -0
- package/dist/files/index.d.ts.map +1 -0
- package/dist/files/index.js +2 -0
- package/dist/files/index.js.map +1 -0
- package/dist/forms/protection.d.ts +85 -0
- package/dist/forms/protection.d.ts.map +1 -0
- package/dist/forms/protection.js +116 -0
- package/dist/forms/protection.js.map +1 -0
- package/dist/images/icons.d.ts +59 -0
- package/dist/images/icons.d.ts.map +1 -0
- package/dist/images/icons.js +131 -0
- package/dist/images/icons.js.map +1 -0
- package/dist/images/index.d.ts +7 -0
- package/dist/images/index.d.ts.map +1 -0
- package/dist/images/index.js +4 -0
- package/dist/images/index.js.map +1 -0
- package/dist/images/markup.d.ts +47 -0
- package/dist/images/markup.d.ts.map +1 -0
- package/dist/images/markup.js +175 -0
- package/dist/images/markup.js.map +1 -0
- package/dist/images/paths.d.ts +34 -0
- package/dist/images/paths.d.ts.map +1 -0
- package/dist/images/paths.js +41 -0
- package/dist/images/paths.js.map +1 -0
- package/dist/images/variants.d.ts +104 -0
- package/dist/images/variants.d.ts.map +1 -0
- package/dist/images/variants.js +320 -0
- package/dist/images/variants.js.map +1 -0
- package/dist/index.d.ts +123 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +327 -25
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts +18 -0
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +34 -3
- package/dist/init.js.map +1 -1
- package/dist/mail/brevo.d.ts +35 -0
- package/dist/mail/brevo.d.ts.map +1 -0
- package/dist/mail/brevo.js +85 -0
- package/dist/mail/brevo.js.map +1 -0
- package/dist/mail/credentials.d.ts +62 -0
- package/dist/mail/credentials.d.ts.map +1 -0
- package/dist/mail/credentials.js +86 -0
- package/dist/mail/credentials.js.map +1 -0
- package/dist/mail/index.d.ts +15 -0
- package/dist/mail/index.d.ts.map +1 -0
- package/dist/mail/index.js +8 -0
- package/dist/mail/index.js.map +1 -0
- package/dist/mail/memory.d.ts +35 -0
- package/dist/mail/memory.d.ts.map +1 -0
- package/dist/mail/memory.js +29 -0
- package/dist/mail/memory.js.map +1 -0
- package/dist/mail/provider.d.ts +80 -0
- package/dist/mail/provider.d.ts.map +1 -0
- package/dist/mail/provider.js +23 -0
- package/dist/mail/provider.js.map +1 -0
- package/dist/mail/service.d.ts +156 -0
- package/dist/mail/service.d.ts.map +1 -0
- package/dist/mail/service.js +265 -0
- package/dist/mail/service.js.map +1 -0
- package/dist/mail/smtp.d.ts +39 -0
- package/dist/mail/smtp.d.ts.map +1 -0
- package/dist/mail/smtp.js +58 -0
- package/dist/mail/smtp.js.map +1 -0
- package/dist/mail/templates.d.ts +91 -0
- package/dist/mail/templates.d.ts.map +1 -0
- package/dist/mail/templates.js +69 -0
- package/dist/mail/templates.js.map +1 -0
- package/dist/notifications/comments.d.ts +66 -0
- package/dist/notifications/comments.d.ts.map +1 -0
- package/dist/notifications/comments.js +151 -0
- package/dist/notifications/comments.js.map +1 -0
- package/dist/notifications/digest.d.ts +135 -0
- package/dist/notifications/digest.d.ts.map +1 -0
- package/dist/notifications/digest.js +287 -0
- package/dist/notifications/digest.js.map +1 -0
- package/dist/notifications/index.d.ts +13 -0
- package/dist/notifications/index.d.ts.map +1 -0
- package/dist/notifications/index.js +8 -0
- package/dist/notifications/index.js.map +1 -0
- package/dist/notifications/links.d.ts +60 -0
- package/dist/notifications/links.d.ts.map +1 -0
- package/dist/notifications/links.js +63 -0
- package/dist/notifications/links.js.map +1 -0
- package/dist/notifications/optouts.d.ts +48 -0
- package/dist/notifications/optouts.d.ts.map +1 -0
- package/dist/notifications/optouts.js +93 -0
- package/dist/notifications/optouts.js.map +1 -0
- package/dist/notifications/preferences.d.ts +158 -0
- package/dist/notifications/preferences.d.ts.map +1 -0
- package/dist/notifications/preferences.js +195 -0
- package/dist/notifications/preferences.js.map +1 -0
- package/dist/notifications/routes.d.ts +28 -0
- package/dist/notifications/routes.d.ts.map +1 -0
- package/dist/notifications/routes.js +184 -0
- package/dist/notifications/routes.js.map +1 -0
- package/dist/notifications/tokens.d.ts +60 -0
- package/dist/notifications/tokens.d.ts.map +1 -0
- package/dist/notifications/tokens.js +125 -0
- package/dist/notifications/tokens.js.map +1 -0
- package/dist/notify.d.ts +84 -0
- package/dist/notify.d.ts.map +1 -0
- package/dist/notify.js +149 -0
- package/dist/notify.js.map +1 -0
- package/dist/web/archive.d.ts +49 -0
- package/dist/web/archive.d.ts.map +1 -0
- package/dist/web/archive.js +59 -0
- package/dist/web/archive.js.map +1 -0
- package/dist/web/assets.d.ts +6 -5
- package/dist/web/assets.d.ts.map +1 -1
- package/dist/web/assets.js +5 -7
- package/dist/web/assets.js.map +1 -1
- package/dist/web/authors.d.ts +143 -0
- package/dist/web/authors.d.ts.map +1 -0
- package/dist/web/authors.js +178 -0
- package/dist/web/authors.js.map +1 -0
- package/dist/web/comments.d.ts +60 -0
- package/dist/web/comments.d.ts.map +1 -0
- package/dist/web/comments.js +207 -0
- package/dist/web/comments.js.map +1 -0
- package/dist/web/context.d.ts +162 -28
- package/dist/web/context.d.ts.map +1 -1
- package/dist/web/context.js +123 -26
- package/dist/web/context.js.map +1 -1
- package/dist/web/conversation.d.ts +209 -0
- package/dist/web/conversation.d.ts.map +1 -0
- package/dist/web/conversation.js +557 -0
- package/dist/web/conversation.js.map +1 -0
- package/dist/web/documents.d.ts +36 -6
- package/dist/web/documents.d.ts.map +1 -1
- package/dist/web/documents.js +52 -10
- package/dist/web/documents.js.map +1 -1
- package/dist/web/feed-atom.d.ts +22 -0
- package/dist/web/feed-atom.d.ts.map +1 -0
- package/dist/web/feed-atom.js +83 -0
- package/dist/web/feed-atom.js.map +1 -0
- package/dist/web/feed-item.d.ts +145 -0
- package/dist/web/feed-item.d.ts.map +1 -0
- package/dist/web/feed-item.js +120 -0
- package/dist/web/feed-item.js.map +1 -0
- package/dist/web/feed-json.d.ts +79 -0
- package/dist/web/feed-json.d.ts.map +1 -0
- package/dist/web/feed-json.js +53 -0
- package/dist/web/feed-json.js.map +1 -0
- package/dist/web/feed-rss.d.ts +26 -0
- package/dist/web/feed-rss.d.ts.map +1 -0
- package/dist/web/feed-rss.js +203 -0
- package/dist/web/feed-rss.js.map +1 -0
- package/dist/web/feed-source.d.ts +244 -0
- package/dist/web/feed-source.d.ts.map +1 -0
- package/dist/web/feed-source.js +201 -0
- package/dist/web/feed-source.js.map +1 -0
- package/dist/web/feed-xml.d.ts +63 -0
- package/dist/web/feed-xml.d.ts.map +1 -0
- package/dist/web/feed-xml.js +116 -0
- package/dist/web/feed-xml.js.map +1 -0
- package/dist/web/feeds.d.ts +31 -96
- package/dist/web/feeds.d.ts.map +1 -1
- package/dist/web/feeds.js +94 -198
- package/dist/web/feeds.js.map +1 -1
- package/dist/web/health.d.ts +31 -0
- package/dist/web/health.d.ts.map +1 -0
- package/dist/web/health.js +44 -0
- package/dist/web/health.js.map +1 -0
- package/dist/web/index.d.ts +30 -10
- package/dist/web/index.d.ts.map +1 -1
- package/dist/web/index.js +18 -7
- package/dist/web/index.js.map +1 -1
- package/dist/web/navigation.d.ts +73 -0
- package/dist/web/navigation.d.ts.map +1 -0
- package/dist/web/navigation.js +110 -0
- package/dist/web/navigation.js.map +1 -0
- package/dist/web/negotiate.d.ts +9 -0
- package/dist/web/negotiate.d.ts.map +1 -1
- package/dist/web/negotiate.js +6 -1
- package/dist/web/negotiate.js.map +1 -1
- package/dist/web/recent.d.ts +43 -0
- package/dist/web/recent.d.ts.map +1 -0
- package/dist/web/recent.js +37 -0
- package/dist/web/recent.js.map +1 -0
- package/dist/web/render.d.ts +197 -9
- package/dist/web/render.d.ts.map +1 -1
- package/dist/web/render.js +334 -17
- package/dist/web/render.js.map +1 -1
- package/dist/web/routes.d.ts +25 -8
- package/dist/web/routes.d.ts.map +1 -1
- package/dist/web/routes.js +845 -93
- package/dist/web/routes.js.map +1 -1
- package/dist/web/sanitize.d.ts +19 -0
- package/dist/web/sanitize.d.ts.map +1 -0
- package/dist/web/sanitize.js +272 -0
- package/dist/web/sanitize.js.map +1 -0
- package/dist/web/search.d.ts +79 -0
- package/dist/web/search.d.ts.map +1 -0
- package/dist/web/search.js +94 -0
- package/dist/web/search.js.map +1 -0
- package/dist/web/sitemap.d.ts +120 -0
- package/dist/web/sitemap.d.ts.map +1 -0
- package/dist/web/sitemap.js +199 -0
- package/dist/web/sitemap.js.map +1 -0
- package/dist/web/taxonomy.d.ts +152 -0
- package/dist/web/taxonomy.d.ts.map +1 -0
- package/dist/web/taxonomy.js +237 -0
- package/dist/web/taxonomy.js.map +1 -0
- package/dist/web/templates.d.ts +54 -16
- package/dist/web/templates.d.ts.map +1 -1
- package/dist/web/templates.js +109 -28
- package/dist/web/templates.js.map +1 -1
- package/dist/web/themes.d.ts +205 -0
- package/dist/web/themes.d.ts.map +1 -0
- package/dist/web/themes.js +277 -0
- package/dist/web/themes.js.map +1 -0
- package/dist/webmention/discovery.d.ts +51 -0
- package/dist/webmention/discovery.d.ts.map +1 -0
- package/dist/webmention/discovery.js +176 -0
- package/dist/webmention/discovery.js.map +1 -0
- package/dist/webmention/html.d.ts +71 -0
- package/dist/webmention/html.d.ts.map +1 -0
- package/dist/webmention/html.js +285 -0
- package/dist/webmention/html.js.map +1 -0
- package/dist/webmention/index.d.ts +12 -0
- package/dist/webmention/index.d.ts.map +1 -0
- package/dist/webmention/index.js +8 -0
- package/dist/webmention/index.js.map +1 -0
- package/dist/webmention/links.d.ts +18 -0
- package/dist/webmention/links.d.ts.map +1 -0
- package/dist/webmention/links.js +64 -0
- package/dist/webmention/links.js.map +1 -0
- package/dist/webmention/microformats.d.ts +93 -0
- package/dist/webmention/microformats.d.ts.map +1 -0
- package/dist/webmention/microformats.js +376 -0
- package/dist/webmention/microformats.js.map +1 -0
- package/dist/webmention/receive.d.ts +141 -0
- package/dist/webmention/receive.d.ts.map +1 -0
- package/dist/webmention/receive.js +264 -0
- package/dist/webmention/receive.js.map +1 -0
- package/dist/webmention/routes.d.ts +37 -0
- package/dist/webmention/routes.d.ts.map +1 -0
- package/dist/webmention/routes.js +75 -0
- package/dist/webmention/routes.js.map +1 -0
- package/dist/webmention/service.d.ts +94 -0
- package/dist/webmention/service.d.ts.map +1 -0
- package/dist/webmention/service.js +207 -0
- package/dist/webmention/service.js.map +1 -0
- package/package.json +11 -6
- package/templates/site/content/_data/site.json +1 -0
- package/templates/site/content/posts/2026-01-01-hello-world.md +5 -3
- package/templates/site/geekity.config.ts +11 -1
- package/templates/site/tsconfig.json +1 -1
- package/themes/default/README.md +1096 -50
- package/themes/default/layouts/404.njk +2 -3
- package/themes/default/layouts/author.njk +37 -0
- package/themes/default/layouts/base.njk +172 -31
- package/themes/default/layouts/category.njk +27 -0
- package/themes/default/layouts/front-page.njk +57 -0
- package/themes/default/layouts/home.njk +17 -1
- package/themes/default/layouts/page.njk +57 -5
- package/themes/default/layouts/post.njk +78 -19
- package/themes/default/layouts/search.njk +57 -0
- package/themes/default/layouts/tag.njk +3 -6
- package/themes/default/mail/comment-digest.html.njk +37 -0
- package/themes/default/mail/comment-digest.subject.njk +3 -0
- package/themes/default/mail/comment-digest.txt.njk +40 -0
- package/themes/default/mail/comment-pending.html.njk +27 -0
- package/themes/default/mail/comment-pending.subject.njk +2 -0
- package/themes/default/mail/comment-pending.txt.njk +24 -0
- package/themes/default/mail/comment-reply.html.njk +21 -0
- package/themes/default/mail/comment-reply.subject.njk +2 -0
- package/themes/default/mail/comment-reply.txt.njk +22 -0
- package/themes/default/mail/contact-message.html.njk +24 -0
- package/themes/default/mail/contact-message.subject.njk +5 -0
- package/themes/default/mail/contact-message.txt.njk +20 -0
- package/themes/default/mail/password-changed.html.njk +18 -0
- package/themes/default/mail/password-changed.subject.njk +2 -0
- package/themes/default/mail/password-changed.txt.njk +17 -0
- package/themes/default/mail/password-reset.html.njk +22 -0
- package/themes/default/mail/password-reset.subject.njk +2 -0
- package/themes/default/mail/password-reset.txt.njk +18 -0
- package/themes/default/mail/test.html.njk +14 -0
- package/themes/default/mail/test.subject.njk +2 -0
- package/themes/default/mail/test.txt.njk +12 -0
- package/themes/default/partials/archive.njk +27 -0
- package/themes/default/partials/bio.njk +77 -0
- package/themes/default/partials/comment-form.njk +109 -0
- package/themes/default/partials/contact-form.njk +88 -0
- package/themes/default/partials/conversation.njk +139 -0
- package/themes/default/partials/feeds.njk +26 -0
- package/themes/default/partials/jsonld.njk +120 -0
- package/themes/default/partials/pagination.njk +12 -6
- package/themes/default/partials/post-list.njk +51 -18
- package/themes/default/partials/search-form.njk +17 -0
- package/themes/default/partials/tags.njk +26 -5
- package/themes/default/static/highlight.js +4 -0
- package/themes/default/static/style.css +1119 -194
- package/themes/default/theme.json +5 -0
- package/admin/layouts/document-editor.njk +0 -167
- package/admin/layouts/federation.njk +0 -145
- package/admin/layouts/login.njk +0 -23
- package/admin/layouts/settings.njk +0 -116
- package/admin/layouts/setup.njk +0 -27
- package/admin/layouts/users.njk +0 -91
- /package/admin/{layouts/_flash.njk → components/flash.njk} +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { Document } from '../content/document.ts';
|
|
2
|
+
import type { SiteData } from './context.ts';
|
|
3
|
+
/**
|
|
4
|
+
* The front-matter key a page opts into the menu with, and the one that orders
|
|
5
|
+
* it among the others.
|
|
6
|
+
*
|
|
7
|
+
* Neither is in `KNOWN_FRONT_MATTER_KEYS`, so the parser leaves both in
|
|
8
|
+
* {@link Document.extra} and the editor reads and writes them there, exactly
|
|
9
|
+
* as it does `eleventyExcludeFromCollections`. Eleventy sees them as ordinary
|
|
10
|
+
* data keys, which is what lets a build render the same menu.
|
|
11
|
+
*/
|
|
12
|
+
export declare const NAVIGATION_KEY = "navigation";
|
|
13
|
+
/** @see {@link NAVIGATION_KEY} */
|
|
14
|
+
export declare const NAVIGATION_ORDER_KEY = "navigationOrder";
|
|
15
|
+
/** One entry of the site menu, as the setting and `site.json` spell it. */
|
|
16
|
+
export interface NavigationItem {
|
|
17
|
+
/** The words on the link. */
|
|
18
|
+
label: string;
|
|
19
|
+
/** Where it goes: a site-root path, or an absolute URL for somewhere else. */
|
|
20
|
+
url: string;
|
|
21
|
+
}
|
|
22
|
+
/** One entry of the menu a theme renders. */
|
|
23
|
+
export interface MenuItem extends NavigationItem {
|
|
24
|
+
/** Whether this is the page being looked at, for `aria-current`. */
|
|
25
|
+
current: boolean;
|
|
26
|
+
}
|
|
27
|
+
/** What {@link navigationMenu} builds a menu out of. */
|
|
28
|
+
export interface NavigationMenuOptions {
|
|
29
|
+
/** The site data, whose `navigation` holds the explicit items. */
|
|
30
|
+
site: SiteData;
|
|
31
|
+
/** The public pages, of which the ones that opted in join the menu. */
|
|
32
|
+
pages: readonly Document[];
|
|
33
|
+
/** The path being rendered, which is what marks an item current. */
|
|
34
|
+
url: string;
|
|
35
|
+
}
|
|
36
|
+
/** The menu for one request: the explicit items, then the pages that opted in. */
|
|
37
|
+
export declare function navigationMenu(options: NavigationMenuOptions): MenuItem[];
|
|
38
|
+
/**
|
|
39
|
+
* The pages that put themselves in the menu, in the order they belong in.
|
|
40
|
+
*
|
|
41
|
+
* They come after the items the setting names, so the menu a site typed out
|
|
42
|
+
* stays as it was typed and a page opting in appends itself rather than
|
|
43
|
+
* landing in the middle of it. Among themselves they go by
|
|
44
|
+
* `navigationOrder` and then by title, and a page that names no order sorts
|
|
45
|
+
* after every page that does: an order is a way of pulling one page to the
|
|
46
|
+
* front, not something every page has to carry before any of them can.
|
|
47
|
+
*
|
|
48
|
+
* `homepage` is the slug of the page the site serves at `/`, if it has one:
|
|
49
|
+
* that page is linked at `/` rather than at its own permalink, which redirects
|
|
50
|
+
* there.
|
|
51
|
+
*/
|
|
52
|
+
export declare function navigationPages(pages: readonly Document[], homepage?: string): NavigationItem[];
|
|
53
|
+
/** A page's `navigationOrder`, when it carries a usable one. */
|
|
54
|
+
export declare function navigationOrder(document: Document): number | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* The items the site data names, ignoring anything that is not one.
|
|
57
|
+
*
|
|
58
|
+
* Tolerant on the way out, the way `taxonomyBasesOrDefault` is: the settings
|
|
59
|
+
* screen refuses a malformed item, so anything unreadable here came from a
|
|
60
|
+
* hand-edited `site.json`, and a menu that quietly loses a line is a better
|
|
61
|
+
* answer than a site that will not render.
|
|
62
|
+
*/
|
|
63
|
+
export declare function navigationItems(site: SiteData): NavigationItem[];
|
|
64
|
+
/**
|
|
65
|
+
* A `navigation` value as the items it names, ignoring anything that is not
|
|
66
|
+
* one.
|
|
67
|
+
*
|
|
68
|
+
* One spelling for the site data a render reads and the `navigation` the
|
|
69
|
+
* settings screen writes, so a menu means the same thing to the theme and to
|
|
70
|
+
* the form that edits it.
|
|
71
|
+
*/
|
|
72
|
+
export declare function navigationItemsOf(value: unknown): NavigationItem[];
|
|
73
|
+
//# sourceMappingURL=navigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/web/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,eAAe,CAAC;AAE3C,kCAAkC;AAClC,eAAO,MAAM,oBAAoB,oBAAoB,CAAC;AAEtD,2EAA2E;AAC3E,MAAM,WAAW,cAAc;IAC7B,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,GAAG,EAAE,MAAM,CAAC;CACb;AAED,6CAA6C;AAC7C,MAAM,WAAW,QAAS,SAAQ,cAAc;IAC9C,oEAAoE;IACpE,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,wDAAwD;AACxD,MAAM,WAAW,qBAAqB;IACpC,kEAAkE;IAClE,IAAI,EAAE,QAAQ,CAAC;IACf,uEAAuE;IACvE,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAC;IAC3B,oEAAoE;IACpE,GAAG,EAAE,MAAM,CAAC;CACb;AAED,kFAAkF;AAClF,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,QAAQ,EAAE,CAazE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,EAAE,QAAQ,SAAK,GAAG,cAAc,EAAE,CAc3F;AAED,gEAAgE;AAChE,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAGtE;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,GAAG,cAAc,EAAE,CAEhE;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,EAAE,CAYlE"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { frontPageSlugs } from './context.js';
|
|
2
|
+
/**
|
|
3
|
+
* The front-matter key a page opts into the menu with, and the one that orders
|
|
4
|
+
* it among the others.
|
|
5
|
+
*
|
|
6
|
+
* Neither is in `KNOWN_FRONT_MATTER_KEYS`, so the parser leaves both in
|
|
7
|
+
* {@link Document.extra} and the editor reads and writes them there, exactly
|
|
8
|
+
* as it does `eleventyExcludeFromCollections`. Eleventy sees them as ordinary
|
|
9
|
+
* data keys, which is what lets a build render the same menu.
|
|
10
|
+
*/
|
|
11
|
+
export const NAVIGATION_KEY = 'navigation';
|
|
12
|
+
/** @see {@link NAVIGATION_KEY} */
|
|
13
|
+
export const NAVIGATION_ORDER_KEY = 'navigationOrder';
|
|
14
|
+
/** The menu for one request: the explicit items, then the pages that opted in. */
|
|
15
|
+
export function navigationMenu(options) {
|
|
16
|
+
const here = comparablePath(options.url);
|
|
17
|
+
const items = [
|
|
18
|
+
...navigationItems(options.site),
|
|
19
|
+
// The page serving as the front page is linked at `/`, not at the URL that
|
|
20
|
+
// redirects there: a menu should point at where a reader lands.
|
|
21
|
+
...navigationPages(options.pages, frontPageSlugs(options.site).homepage),
|
|
22
|
+
];
|
|
23
|
+
return items.map((item) => ({
|
|
24
|
+
...item,
|
|
25
|
+
current: here !== undefined && comparablePath(item.url) === here,
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The pages that put themselves in the menu, in the order they belong in.
|
|
30
|
+
*
|
|
31
|
+
* They come after the items the setting names, so the menu a site typed out
|
|
32
|
+
* stays as it was typed and a page opting in appends itself rather than
|
|
33
|
+
* landing in the middle of it. Among themselves they go by
|
|
34
|
+
* `navigationOrder` and then by title, and a page that names no order sorts
|
|
35
|
+
* after every page that does: an order is a way of pulling one page to the
|
|
36
|
+
* front, not something every page has to carry before any of them can.
|
|
37
|
+
*
|
|
38
|
+
* `homepage` is the slug of the page the site serves at `/`, if it has one:
|
|
39
|
+
* that page is linked at `/` rather than at its own permalink, which redirects
|
|
40
|
+
* there.
|
|
41
|
+
*/
|
|
42
|
+
export function navigationPages(pages, homepage = '') {
|
|
43
|
+
return pages
|
|
44
|
+
.filter((document) => document.extra[NAVIGATION_KEY] === true)
|
|
45
|
+
.map((document) => ({
|
|
46
|
+
label: document.title,
|
|
47
|
+
url: homepage !== '' && document.slug === homepage ? '/' : document.permalink,
|
|
48
|
+
order: navigationOrder(document),
|
|
49
|
+
}))
|
|
50
|
+
.sort((a, b) => (a.order ?? Number.POSITIVE_INFINITY) - (b.order ?? Number.POSITIVE_INFINITY) ||
|
|
51
|
+
a.label.localeCompare(b.label))
|
|
52
|
+
.map(({ label, url }) => ({ label, url }));
|
|
53
|
+
}
|
|
54
|
+
/** A page's `navigationOrder`, when it carries a usable one. */
|
|
55
|
+
export function navigationOrder(document) {
|
|
56
|
+
const value = document.extra[NAVIGATION_ORDER_KEY];
|
|
57
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The items the site data names, ignoring anything that is not one.
|
|
61
|
+
*
|
|
62
|
+
* Tolerant on the way out, the way `taxonomyBasesOrDefault` is: the settings
|
|
63
|
+
* screen refuses a malformed item, so anything unreadable here came from a
|
|
64
|
+
* hand-edited `site.json`, and a menu that quietly loses a line is a better
|
|
65
|
+
* answer than a site that will not render.
|
|
66
|
+
*/
|
|
67
|
+
export function navigationItems(site) {
|
|
68
|
+
return navigationItemsOf(site['navigation']);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A `navigation` value as the items it names, ignoring anything that is not
|
|
72
|
+
* one.
|
|
73
|
+
*
|
|
74
|
+
* One spelling for the site data a render reads and the `navigation` the
|
|
75
|
+
* settings screen writes, so a menu means the same thing to the theme and to
|
|
76
|
+
* the form that edits it.
|
|
77
|
+
*/
|
|
78
|
+
export function navigationItemsOf(value) {
|
|
79
|
+
if (!Array.isArray(value))
|
|
80
|
+
return [];
|
|
81
|
+
const items = [];
|
|
82
|
+
for (const entry of value) {
|
|
83
|
+
if (typeof entry !== 'object' || entry === null)
|
|
84
|
+
continue;
|
|
85
|
+
const { label, url } = entry;
|
|
86
|
+
if (typeof label !== 'string' || label === '')
|
|
87
|
+
continue;
|
|
88
|
+
if (typeof url !== 'string' || url === '')
|
|
89
|
+
continue;
|
|
90
|
+
items.push({ label, url });
|
|
91
|
+
}
|
|
92
|
+
return items;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* A menu URL as the string two of them are compared by: its path without the
|
|
96
|
+
* trailing slash that is canonical here, or `undefined` when it is not a path
|
|
97
|
+
* on this site at all.
|
|
98
|
+
*
|
|
99
|
+
* An item pointing somewhere else is never the page being looked at, even when
|
|
100
|
+
* its URL happens to name this origin: it is a link off the site as far as the
|
|
101
|
+
* menu is concerned, and the request path it would be compared against is
|
|
102
|
+
* never absolute.
|
|
103
|
+
*/
|
|
104
|
+
function comparablePath(url) {
|
|
105
|
+
if (!url.startsWith('/'))
|
|
106
|
+
return undefined;
|
|
107
|
+
const path = url.split(/[?#]/)[0] ?? url;
|
|
108
|
+
return path.length > 1 && path.endsWith('/') ? path.slice(0, -1) : path;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=navigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../src/web/navigation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAC;AAE3C,kCAAkC;AAClC,MAAM,CAAC,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AA0BtD,kFAAkF;AAClF,MAAM,UAAU,cAAc,CAAC,OAA8B;IAC3D,MAAM,IAAI,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACzC,MAAM,KAAK,GAAG;QACZ,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC;QAChC,2EAA2E;QAC3E,gEAAgE;QAChE,GAAG,eAAe,CAAC,OAAO,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC;KACzE,CAAC;IAEF,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC1B,GAAG,IAAI;QACP,OAAO,EAAE,IAAI,KAAK,SAAS,IAAI,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI;KACjE,CAAC,CAAC,CAAC;AACN,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,eAAe,CAAC,KAA0B,EAAE,QAAQ,GAAG,EAAE;IACvE,OAAO,KAAK;SACT,MAAM,CAAC,CAA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AC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,KAAK,GAAqB,EAAE,CAAC;IACnC,KAAK,MAAM,KAAK,IAAI,KAAK,EAAE,CAAC;QAC1B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;YAAE,SAAS;QAC1D,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,KAAgC,CAAC;QACxD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,EAAE;YAAE,SAAS;QACxD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,EAAE;YAAE,SAAS;QACpD,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,cAAc,CAAC,GAAW;IACjC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IAC3C,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC;IACzC,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1E,CAAC"}
|
package/dist/web/negotiate.d.ts
CHANGED
|
@@ -141,6 +141,15 @@ export interface RepresentationResponseOptions {
|
|
|
141
141
|
href: string;
|
|
142
142
|
/** Which representations this resource offers, for the `Link` alternates. */
|
|
143
143
|
available: readonly Representation[];
|
|
144
|
+
/**
|
|
145
|
+
* Whole `Link` header values to advertise alongside the alternates — the
|
|
146
|
+
* webmention endpoint is the one that uses it (TASK-51).
|
|
147
|
+
*
|
|
148
|
+
* Spelled by the caller rather than built here, because they are not
|
|
149
|
+
* representations of this resource and nothing about them is this module's
|
|
150
|
+
* business beyond joining them to the header.
|
|
151
|
+
*/
|
|
152
|
+
links?: readonly string[] | undefined;
|
|
144
153
|
/** Validator for this representation. Omit when one cannot be trusted. */
|
|
145
154
|
etag?: string | undefined;
|
|
146
155
|
/** When the resource last changed. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"negotiate.d.ts","sourceRoot":"","sources":["../../src/web/negotiate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAIvD;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;AAE1D,uDAAuD;AACvD,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAIhE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAAS,cAAc,EAAiC,CAAC;AAEhG,mFAAmF;AACnF,eAAO,MAAM,uBAAuB,EAAE,SAAS,cAAc,EAAqB,CAAC;AAEnF;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,SAAS,EAAE,SAAS,cAAc,EAAE,GACnC,cAAc,GAAG,SAAS,CAsB5B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,4BAA4B,EAAE,SAAS,MAAM,EAGzD,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAmB1E;AAwBD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAGvF,CAAC;AAEF,mFAAmF;AACnF,MAAM,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;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAGrE;AAED,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,CAOnE;AAED,8EAA8E;AAC9E,wBAAgB,cAAc,CAAC,SAAS,EAAE,SAAS,QAAQ,EAAE,GAAG,IAAI,GAAG,SAAS,CAQ/E;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,WAAW,EAAE,kBAAkB,GAAG,SAAS,EAC3C,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,YAAY,EAAE,IAAI,GAAG,SAAS,GAC7B,OAAO,CAcT;AAED,+CAA+C;AAC/C,MAAM,WAAW,WAAW;IAC1B,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,EAAE,CAmBzD"}
|
package/dist/web/negotiate.js
CHANGED
|
@@ -204,7 +204,12 @@ const CONTENT_TYPES = {
|
|
|
204
204
|
export function representationResponse(options) {
|
|
205
205
|
const headers = new Headers({
|
|
206
206
|
vary: 'Accept',
|
|
207
|
-
link:
|
|
207
|
+
link: [
|
|
208
|
+
alternateLinks(options.href, options.representation, options.available),
|
|
209
|
+
...(options.links ?? []),
|
|
210
|
+
]
|
|
211
|
+
.filter((value) => value !== '')
|
|
212
|
+
.join(', '),
|
|
208
213
|
});
|
|
209
214
|
if (options.etag !== undefined)
|
|
210
215
|
headers.set('etag', options.etag);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"negotiate.js","sourceRoot":"","sources":["../../src/web/negotiate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,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QAC3D,IAAI,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;YAAE,OAAO,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED,wFAAwF;AACxF,SAAS,SAAS,CAAC,MAAc;IAC/B,OAAO,MAAM;SACV,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SAC1B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Document } from '../content/document.ts';
|
|
2
|
+
import type { ListOptions } from '../content/store.ts';
|
|
3
|
+
/**
|
|
4
|
+
* What the front page shows under its words: the newest posts, by the rule the
|
|
5
|
+
* andrewshell.org design uses (decision-16).
|
|
6
|
+
*
|
|
7
|
+
* The rule is "this month, unless this month is thin": a site that has been
|
|
8
|
+
* writing shows what it has been writing about, and one that has not still
|
|
9
|
+
* shows five posts rather than a short list or an empty box. It lives here,
|
|
10
|
+
* beside its test, rather than inside the renderer, because it is a decision
|
|
11
|
+
* about what is recent and not about how a page is drawn.
|
|
12
|
+
*/
|
|
13
|
+
/** How many posts the front page falls back to, and the month's threshold. */
|
|
14
|
+
export declare const RECENT_POSTS = 5;
|
|
15
|
+
/** What {@link recentPosts} asks: the archive, and what time it is. */
|
|
16
|
+
export interface RecentPostsSource {
|
|
17
|
+
/** The clock the listings hold a future-dated post against. */
|
|
18
|
+
now(): Date;
|
|
19
|
+
/** Published posts, newest first. */
|
|
20
|
+
listPosts(options?: ListOptions): Document[];
|
|
21
|
+
/** Published posts dated at or after an instant, newest first. */
|
|
22
|
+
listPostsSince(instant: string): Document[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The posts the front page lists: this month's when there are at least
|
|
26
|
+
* {@link RECENT_POSTS} of them, and the newest {@link RECENT_POSTS} otherwise.
|
|
27
|
+
*
|
|
28
|
+
* Two bounded queries at worst and never a walk of the archive, which is why
|
|
29
|
+
* the month is asked for first: on a site that writes often the answer is the
|
|
30
|
+
* month and the second query never happens.
|
|
31
|
+
*/
|
|
32
|
+
export declare function recentPosts(source: RecentPostsSource): Document[];
|
|
33
|
+
/**
|
|
34
|
+
* Midnight on the first of the month an instant falls in, as the UTC instant
|
|
35
|
+
* the index sorts by.
|
|
36
|
+
*
|
|
37
|
+
* UTC because that is what a date in a file means (decision-11): the site's
|
|
38
|
+
* timezone setting decides how a date is printed and nothing else, so "this
|
|
39
|
+
* month" is the month the stored instants are in rather than the one a reader
|
|
40
|
+
* happens to be living through.
|
|
41
|
+
*/
|
|
42
|
+
export declare function startOfMonth(now: Date): string;
|
|
43
|
+
//# sourceMappingURL=recent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recent.d.ts","sourceRoot":"","sources":["../../src/web/recent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;;;;;;GASG;AAEH,8EAA8E;AAC9E,eAAO,MAAM,YAAY,IAAI,CAAC;AAE9B,uEAAuE;AACvE,MAAM,WAAW,iBAAiB;IAChC,+DAA+D;IAC/D,GAAG,IAAI,IAAI,CAAC;IACZ,qCAAqC;IACrC,SAAS,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,QAAQ,EAAE,CAAC;IAC7C,kEAAkE;IAClE,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,EAAE,CAAC;CAC7C;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,QAAQ,EAAE,CAGjE;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,IAAI,GAAG,MAAM,CAE9C"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the front page shows under its words: the newest posts, by the rule the
|
|
3
|
+
* andrewshell.org design uses (decision-16).
|
|
4
|
+
*
|
|
5
|
+
* The rule is "this month, unless this month is thin": a site that has been
|
|
6
|
+
* writing shows what it has been writing about, and one that has not still
|
|
7
|
+
* shows five posts rather than a short list or an empty box. It lives here,
|
|
8
|
+
* beside its test, rather than inside the renderer, because it is a decision
|
|
9
|
+
* about what is recent and not about how a page is drawn.
|
|
10
|
+
*/
|
|
11
|
+
/** How many posts the front page falls back to, and the month's threshold. */
|
|
12
|
+
export const RECENT_POSTS = 5;
|
|
13
|
+
/**
|
|
14
|
+
* The posts the front page lists: this month's when there are at least
|
|
15
|
+
* {@link RECENT_POSTS} of them, and the newest {@link RECENT_POSTS} otherwise.
|
|
16
|
+
*
|
|
17
|
+
* Two bounded queries at worst and never a walk of the archive, which is why
|
|
18
|
+
* the month is asked for first: on a site that writes often the answer is the
|
|
19
|
+
* month and the second query never happens.
|
|
20
|
+
*/
|
|
21
|
+
export function recentPosts(source) {
|
|
22
|
+
const month = source.listPostsSince(startOfMonth(source.now()));
|
|
23
|
+
return month.length >= RECENT_POSTS ? month : source.listPosts({ limit: RECENT_POSTS });
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Midnight on the first of the month an instant falls in, as the UTC instant
|
|
27
|
+
* the index sorts by.
|
|
28
|
+
*
|
|
29
|
+
* UTC because that is what a date in a file means (decision-11): the site's
|
|
30
|
+
* timezone setting decides how a date is printed and nothing else, so "this
|
|
31
|
+
* month" is the month the stored instants are in rather than the one a reader
|
|
32
|
+
* happens to be living through.
|
|
33
|
+
*/
|
|
34
|
+
export function startOfMonth(now) {
|
|
35
|
+
return new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), 1)).toISOString();
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=recent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recent.js","sourceRoot":"","sources":["../../src/web/recent.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AAEH,8EAA8E;AAC9E,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC;AAY9B;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CAAC,MAAyB;IACnD,MAAM,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAChE,OAAO,KAAK,CAAC,MAAM,IAAI,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;AAC1F,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,GAAS;IACpC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AACtF,CAAC"}
|
package/dist/web/render.d.ts
CHANGED
|
@@ -1,16 +1,47 @@
|
|
|
1
1
|
import type { Environment } from 'nunjucks';
|
|
2
|
+
import type { User } from '../admin/accounts.ts';
|
|
2
3
|
import type { ResolvedConfig } from '../config.ts';
|
|
3
4
|
import type { Document } from '../content/document.ts';
|
|
4
|
-
import type {
|
|
5
|
+
import type { DocumentNeighbours, SearchHit } from '../content/store.ts';
|
|
6
|
+
import type { AuthorContext } from './authors.ts';
|
|
7
|
+
import type { CommentFormContext } from '../comments/form.ts';
|
|
8
|
+
import type { ContactFormContext } from '../contact/form.ts';
|
|
9
|
+
import type { Conversation } from './conversation.ts';
|
|
10
|
+
import type { FrontPageSlugs, SiteData } from './context.ts';
|
|
5
11
|
import type { Pagination } from './pagination.ts';
|
|
12
|
+
import type { TaxonomyBases, TaxonomyRedirect } from './taxonomy.ts';
|
|
13
|
+
import type { ThemeSource } from './themes.ts';
|
|
6
14
|
/** Templates the default theme ships and the public routes ask for by name. */
|
|
7
15
|
export declare const TEMPLATES: {
|
|
8
16
|
readonly home: 'layouts/home.njk';
|
|
9
17
|
readonly post: 'layouts/post.njk';
|
|
10
18
|
readonly page: 'layouts/page.njk';
|
|
11
19
|
readonly tag: 'layouts/tag.njk';
|
|
20
|
+
readonly category: 'layouts/category.njk';
|
|
21
|
+
readonly author: 'layouts/author.njk';
|
|
22
|
+
readonly search: 'layouts/search.njk';
|
|
12
23
|
readonly notFound: 'layouts/404.njk';
|
|
13
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* The two templates named for the Reading choice, which a theme may write and
|
|
27
|
+
* which fall back to an ordinary layout when it has not.
|
|
28
|
+
*
|
|
29
|
+
* They are WordPress's own `front-page.php` and `home.php`, and they exist for
|
|
30
|
+
* the same reason: a front page is often the one page of a site that looks
|
|
31
|
+
* like nothing else, and saying so should not mean overriding the layout every
|
|
32
|
+
* other page uses. The default theme ships `front-page.njk` (TASK-85) and no
|
|
33
|
+
* posts page layout, so a site that sets a posts page gets the listing layout
|
|
34
|
+
* until it writes one.
|
|
35
|
+
*/
|
|
36
|
+
export declare const OPTIONAL_TEMPLATES: {
|
|
37
|
+
/**
|
|
38
|
+
* The front page alone. The default theme ships one (TASK-85), so the
|
|
39
|
+
* fallback is only reached by a theme that replaced it with nothing.
|
|
40
|
+
*/
|
|
41
|
+
readonly frontPage: 'layouts/front-page.njk';
|
|
42
|
+
/** The listing on the posts page. Falls back to {@link TEMPLATES.home}. */
|
|
43
|
+
readonly postsPage: 'layouts/posts-page.njk';
|
|
44
|
+
};
|
|
14
45
|
/** A listing of documents, ready to render. */
|
|
15
46
|
export interface Listing {
|
|
16
47
|
/** Heading for the page, and the basis of its `<title>`. */
|
|
@@ -23,8 +54,33 @@ export interface Listing {
|
|
|
23
54
|
pagination: Pagination;
|
|
24
55
|
/** The tag, on a tag archive. Absent on the home page. */
|
|
25
56
|
tag?: string | undefined;
|
|
57
|
+
/** The category, on a category archive. Absent on the home page. */
|
|
58
|
+
category?: string | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Whose archive this is, on an author archive: the same profile a post's
|
|
61
|
+
* byline is given, so a theme prints the heading of an archive with what it
|
|
62
|
+
* already knows how to print under a post.
|
|
63
|
+
*/
|
|
64
|
+
author?: AuthorContext | undefined;
|
|
26
65
|
/** Which template to use. Defaults to the home layout. */
|
|
27
66
|
template?: string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* The page whose permalink this listing is at, when the site has a posts
|
|
69
|
+
* page. Its front matter and its rendered body go on the context under the
|
|
70
|
+
* listing's own title and URL, so a theme prints the words above the posts.
|
|
71
|
+
*/
|
|
72
|
+
document?: Document | undefined;
|
|
73
|
+
}
|
|
74
|
+
/** One page of search results, ready to render (TASK-22). */
|
|
75
|
+
export interface SearchPage {
|
|
76
|
+
/** What the reader searched for, as the page read it. Empty before a search. */
|
|
77
|
+
query: string;
|
|
78
|
+
/** The page's own URL, query included, for `page.url`. */
|
|
79
|
+
url: string;
|
|
80
|
+
/** The documents on this page of the results, best match first. */
|
|
81
|
+
hits: readonly SearchHit[];
|
|
82
|
+
/** Where this page sits among all the results. */
|
|
83
|
+
pagination: Pagination;
|
|
28
84
|
}
|
|
29
85
|
/**
|
|
30
86
|
* The HTML side of the public site: everything that turns a document or a
|
|
@@ -39,27 +95,159 @@ export interface Renderer {
|
|
|
39
95
|
site(): SiteData;
|
|
40
96
|
/** How many documents a listing page holds, per the site data. */
|
|
41
97
|
pageSize(): number;
|
|
42
|
-
/**
|
|
43
|
-
|
|
44
|
-
|
|
98
|
+
/**
|
|
99
|
+
* Where the taxonomy archives live, per the site data. The routes read it
|
|
100
|
+
* per request rather than at boot, so a base saved on the settings screen
|
|
101
|
+
* moves the archives on the very next one.
|
|
102
|
+
*/
|
|
103
|
+
taxonomyBases(): TaxonomyBases;
|
|
104
|
+
/**
|
|
105
|
+
* The archive renames the site records, per the site data. Read per request
|
|
106
|
+
* for the same reason the bases are: a rename made on the taxonomy screen
|
|
107
|
+
* has to answer at the old URL on the very next one.
|
|
108
|
+
*/
|
|
109
|
+
termRedirects(): readonly TaxonomyRedirect[];
|
|
110
|
+
/**
|
|
111
|
+
* The Reading choice, per the site data: which page is served at `/`, and
|
|
112
|
+
* which one's URL carries the listing. Read per request for the reason the
|
|
113
|
+
* bases are — a save on the settings screen moves the front page on the very
|
|
114
|
+
* next one — and answered as slugs, because only the index knows whether one
|
|
115
|
+
* still names a published page.
|
|
116
|
+
*/
|
|
117
|
+
frontPageSlugs(): FrontPageSlugs;
|
|
118
|
+
/**
|
|
119
|
+
* One document through its type's layout.
|
|
120
|
+
*
|
|
121
|
+
* `extra` goes on the context last and so wins: it is how the comment
|
|
122
|
+
* endpoint puts a refused form back on the page it came from, and how the
|
|
123
|
+
* redirect after a submission gets its thank-you onto the post.
|
|
124
|
+
*/
|
|
125
|
+
renderDocument(document: Document, extra?: Record<string, unknown>): string;
|
|
126
|
+
/**
|
|
127
|
+
* One page as the site's front page: the same context its own URL would give
|
|
128
|
+
* it, at `/`, through the theme's front-page template if it has one and its
|
|
129
|
+
* page layout if it has not.
|
|
130
|
+
*/
|
|
131
|
+
renderFrontPage(document: Document, extra?: Record<string, unknown>): string;
|
|
132
|
+
/** A listing through the home, tag or category layout. */
|
|
45
133
|
renderListing(listing: Listing): string;
|
|
134
|
+
/**
|
|
135
|
+
* A page of search results, or the empty search form, through the search
|
|
136
|
+
* layout. Each result is the document context a listing entry is, with a
|
|
137
|
+
* `snippet` of HTML showing where the words were found.
|
|
138
|
+
*/
|
|
139
|
+
renderSearch(search: SearchPage): string;
|
|
46
140
|
/** The 404 page, for a path that resolved to nothing. */
|
|
47
141
|
renderNotFound(url: string): string;
|
|
48
142
|
/** Any template by name, with the site data already in the context. */
|
|
49
143
|
render(template: string, context?: Record<string, unknown>): string;
|
|
144
|
+
/**
|
|
145
|
+
* The theme directories a render reads from right now, in order: what the
|
|
146
|
+
* `/theme/` route serves the site's static files out of, so a stylesheet and
|
|
147
|
+
* the page that links to it can never come from two different themes.
|
|
148
|
+
*/
|
|
149
|
+
themeDirs(): readonly string[];
|
|
50
150
|
/** The Nunjucks environment, for a site that wants to add its own filters. */
|
|
51
151
|
readonly environment: Environment;
|
|
52
152
|
}
|
|
53
153
|
/** How to build a {@link Renderer}. */
|
|
54
154
|
export interface CreateRendererOptions {
|
|
55
|
-
/** Config after defaults, for the
|
|
155
|
+
/** Config after defaults, for the themes directory, base URL and content directory. */
|
|
56
156
|
config: ResolvedConfig;
|
|
57
157
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
158
|
+
* Which theme the site is rendering through, asked per render (decision-15).
|
|
159
|
+
*
|
|
160
|
+
* Injected so that one CMS has one answer: the pages, the `/theme/` assets
|
|
161
|
+
* and the site's email all read the same source, so a theme that has gone
|
|
162
|
+
* missing is reported once rather than three times. A renderer built without
|
|
163
|
+
* one makes its own from the config, and follows the setting just as well.
|
|
164
|
+
*/
|
|
165
|
+
themes?: ThemeSource | undefined;
|
|
166
|
+
/**
|
|
167
|
+
* The public pages, for the ones that put themselves in the site menu. Read
|
|
168
|
+
* per render rather than at boot, because a page saved in the editor should
|
|
169
|
+
* be in the menu on the very next request.
|
|
170
|
+
*
|
|
171
|
+
* A renderer built without it has a menu of exactly what the setting names,
|
|
172
|
+
* which is what the tests over one template want and what a site with no
|
|
173
|
+
* index would get anyway.
|
|
174
|
+
*/
|
|
175
|
+
pages?: (() => readonly Document[]) | undefined;
|
|
176
|
+
/**
|
|
177
|
+
* What has been said about a post: the replies, likes and boosts the theme
|
|
178
|
+
* renders under it (TASK-49).
|
|
179
|
+
*
|
|
180
|
+
* Injected rather than read here for the same reason the pages are — the
|
|
181
|
+
* renderer holds no store — and read per render, so a reply that arrives
|
|
182
|
+
* while the page is cached in nobody's browser is on the very next one. A
|
|
183
|
+
* renderer built without it renders no conversation at all, which is what
|
|
184
|
+
* every test over one template wants.
|
|
185
|
+
*/
|
|
186
|
+
conversation?: ((document: Document) => Conversation) | undefined;
|
|
187
|
+
/**
|
|
188
|
+
* The comment form for a post that is taking comments, and `undefined` for
|
|
189
|
+
* one that is not (TASK-50).
|
|
190
|
+
*
|
|
191
|
+
* Injected for the same reason the conversation is, and asked per render for
|
|
192
|
+
* a sharper reason: whether a post is still open depends on the clock, so a
|
|
193
|
+
* form decided at boot would go on being offered for a post that closed an
|
|
194
|
+
* hour ago. A renderer built without it renders no form at all.
|
|
195
|
+
*/
|
|
196
|
+
commentForm?: ((document: Document) => CommentFormContext | undefined) | undefined;
|
|
197
|
+
/**
|
|
198
|
+
* The contact form for a page whose front matter asks for one, and
|
|
199
|
+
* `undefined` for every other document (TASK-56).
|
|
200
|
+
*
|
|
201
|
+
* Injected for the same reason the comment form is, and asked per render for
|
|
202
|
+
* the same one: a `contact: true` saved in the editor a moment ago puts a
|
|
203
|
+
* form on the page the next request draws. A renderer built without it
|
|
204
|
+
* renders no contact form at all.
|
|
205
|
+
*/
|
|
206
|
+
contactForm?: ((document: Document) => ContactFormContext | undefined) | undefined;
|
|
207
|
+
/**
|
|
208
|
+
* Who may sign in, for the byline (TASK-67).
|
|
209
|
+
*
|
|
210
|
+
* Injected and read per render for the reason the pages are: `data/users.json`
|
|
211
|
+
* is the truth about who exists (decision-9), a display name saved a moment
|
|
212
|
+
* ago should be on the very next page, and the renderer holds no store. It
|
|
213
|
+
* is asked once per render rather than once per document, so a listing of
|
|
214
|
+
* ten posts costs one read of the file.
|
|
215
|
+
*
|
|
216
|
+
* A renderer built without it resolves no author at all, which is what a
|
|
217
|
+
* test over one template wants: the front matter's own name is still printed,
|
|
218
|
+
* it simply links nowhere.
|
|
219
|
+
*/
|
|
220
|
+
users?: (() => readonly User[]) | undefined;
|
|
221
|
+
/**
|
|
222
|
+
* The published posts either side of one, for `previous` and `next` under an
|
|
223
|
+
* entry (TASK-79).
|
|
224
|
+
*
|
|
225
|
+
* Injected for the reason the conversation is — the renderer holds no index
|
|
226
|
+
* — and asked per render rather than at boot, because a post published a
|
|
227
|
+
* minute ago is the neighbour the post before it should already be linking
|
|
228
|
+
* to. A renderer built without it draws no such links, which is what a test
|
|
229
|
+
* over one template wants.
|
|
230
|
+
*/
|
|
231
|
+
neighbours?: ((document: Document) => DocumentNeighbours) | undefined;
|
|
232
|
+
/**
|
|
233
|
+
* The newest posts, for `recentPosts` on the front page (TASK-79).
|
|
234
|
+
*
|
|
235
|
+
* Which posts are recent is `web/recent.ts`'s rule and the query behind it
|
|
236
|
+
* is the index's; this is only how the answer reaches a template. Asked per
|
|
237
|
+
* render, and only while drawing the front page, so a site whose `/` is its
|
|
238
|
+
* listing never runs it at all.
|
|
239
|
+
*/
|
|
240
|
+
recentPosts?: (() => readonly Document[]) | undefined;
|
|
241
|
+
/**
|
|
242
|
+
* Every published post, for a page whose front matter says `archive: true`
|
|
243
|
+
* (TASK-85).
|
|
244
|
+
*
|
|
245
|
+
* Injected for the reason the recent posts are, and asked per render and
|
|
246
|
+
* only for a page that asked for the list: an archive is the one listing
|
|
247
|
+
* with no paging, so a site with a thousand posts runs the query on the one
|
|
248
|
+
* page that prints a thousand links and on no other.
|
|
61
249
|
*/
|
|
62
|
-
|
|
250
|
+
archivePosts?: (() => readonly Document[]) | undefined;
|
|
63
251
|
}
|
|
64
252
|
/**
|
|
65
253
|
* Build the renderer for one site.
|