ArchieML

An experiment with ArchieML on the web.

Here’s the Google Doc:

https://docs.google.com/document/d/1GIth0dexxcFBKUr5Tchcd2uz4Az-YbtipHKj6I7SinM/edit?usp=sharing


Fetching data

I’ve set up a Doc-to-JSON converter so we can fetch it.

const response = await fetch(
  "https://archieml-to-json.vercel.app/1GIth0dexxcFBKUr5Tchcd2uz4Az-YbtipHKj6I7SinM",
)
const data = await response.json()

display(data)

Let’s try formatting the JSON:

html`<pre>${JSON.stringify(data, null, 2)}</pre>`

Markdown processing

We can then process any Markdown:

const markup = await parseMarkdown(data.INTRO)
const wrapper = document.createElement("div")

wrapper.classList.add("card")
wrapper.innerHTML = markup.value

display(wrapper)