From fba93f69b14353a0ba331081d60404909d0c09b7 Mon Sep 17 00:00:00 2001 From: Vika Date: Sat, 17 Aug 2024 16:30:11 +0300 Subject: 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. --- templates/src/onboarding.rs | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'templates') 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" } -- cgit 1.4.1