How to make a web page with txti

The only thing you have to give txti is the “Content.” txti takes care of the rest, but you can take advantage of these options:

Custom link
This is the part that goes after “txti.illumin.us/” like txti.illumin.us/barry. It only accepts lowercase letters (a-z), numbers (0-9), and dashes (-), and must be 2 to 64 characters long. If you put anything else in there, txti will change it. Leave it blank and txti gives you a short random link.
Edit code
txti gives you a random edit code. You have to have this to make changes to the txti, and it can never EVER be retrieved if lost. It is shown to you once, when you create the page, so save it then. (Only a one-way hash is stored, so even we can’t look it up.) Without it the page stays public but read-only.
Title
Give your txti a relevant title so it shows up better when shared on social media, in search results, and in browser windows.
Description
A short (around 200 character) summary of the page. This shows up in link-preview cards and search results. It’s optional, so leave it blank if you don’t need one.

Make your txti easy to read and understand

You can make your txti robust and full-featured with links, images, lists, headings, and more. txti uses a popular set of rules called Markdown. Here is what you write and what you get:

Images: write ![alt text](https://example.com/cat.jpg) and the page shows a link named “alt text” that opens the image. Images are not loaded inline: fetching a picture from someone else’s server would tell that server who is reading your page. Readers who want to see the image just click the link.

Raw HTML in your Markdown is stripped. Every page is sanitised, so a page can never run a script or load active content.

Embed a txti anywhere

Append /html to any page link to get the bare sanitised HTML fragment (no page chrome) for embedding:

https://txti.illumin.us/{slug}/html

A small JSON API

Build on txti with a clean JSON API (no edit code = read-only):

POST   https://txti.illumin.us/api/pages          {"content","title?","description?","custom_url?"}
GET    https://txti.illumin.us/api/pages/{slug}   raw markdown + metadata
PATCH  https://txti.illumin.us/api/pages/{slug}   {"edit_code","content?","title?","description?"}
DELETE https://txti.illumin.us/api/pages/{slug}   {"edit_code"}
POST   https://txti.illumin.us/api/render         {"content"}  returns sanitised HTML

Every write sends Content-Type: application/json and names txti as its origin:

curl -X POST https://txti.illumin.us/api/pages -H 'Content-Type: application/json' \
  -H 'Origin: https://txti.illumin.us' -d '{"content":"# hello"}'

Important notes

create a page