about summary refs log tree commit diff
path: root/templates
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2024-08-17 16:30:11 +0300
committerVika <vika@fireburn.ru>2024-08-18 00:12:56 +0300
commitfba93f69b14353a0ba331081d60404909d0c09b7 (patch)
treeb1cd8872b2f07222174c61694ff5df6610a094b1 /templates
parent9debc34ff000d7b2a54f71887da237725fb45826 (diff)
downloadkittybox-fba93f69b14353a0ba331081d60404909d0c09b7.tar.zst
onboarding: provide official alternate onboarding flow for no-JS
This documents the onboarding request schema so somebody unwilling or
unable to run JavaScript (why would you subject yourself to this?) is
still able to use Kittybox.

Since JavaScript is used to provide form interactivity and complex
data structures in the onboarding flow, whoever cannot run JS will
have to manually compose the onboarding request, and this will help
them a little.

I just need to remember to update this if the schema ever changes.
Diffstat (limited to 'templates')
-rw-r--r--templates/src/onboarding.rs38
1 files changed, 38 insertions, 0 deletions
diff --git a/templates/src/onboarding.rs b/templates/src/onboarding.rs
index e2f07df..6ee90bf 100644
--- a/templates/src/onboarding.rs
+++ b/templates/src/onboarding.rs
@@ -34,6 +34,44 @@ markup::define! {
                     b { "please enable JavaScript for this page to work properly." }
                     small { "sorry T__T" }
                 }
+                hr;
+                p {
+                    "Alternatively, you can POST a following JSON document to this URL:"
+                }
+                pre[class="language-json"] { code {
+                   r#"{
+    // An h-card with your profile information, in MF2-JSON format.
+    "user": {
+        "type": [ "h-card" ],
+        "properties": {
+            "name": [ "Aiden" ],
+            "pronouns": [ "they/them" ],
+            "note": [ "A new blogger on the street." ],
+            "url": [ "https://example.com/" ]
+        }
+    },
+    // Your first post as an h-entry, in MF2-JSON format.
+    "first_post": {
+        "type": [ "h-entry" ],
+        "properties": {
+            "content": [ "Hello world! (_This supports Markdown, by the way._)" ],
+        }
+    },
+    // Self-explanatory.
+    "blog_name": "Aiden's Kitty Box!",
+    // Custom feeds to be created, if any. May be left empty.
+    "feeds": [
+        { "name": "My adventures", "slug": "adventure-log" }
+    ]
+}"#
+                } }
+                p {
+                    "This can be done using any tool you want, such as "
+                    code { "curl" }
+                    " or "
+                    code { "httpie" }
+                    "."
+                }
             }
             ul #progressbar[style="display: none"] {
                 li #intro { "Introduction" }