window.onload = async () => {
    let pages_data = await fetch("/index.json")
    let pages = await pages_data.json()
    pages.sort((a, b) => a.id.localeCompare(b.id, "en"))
    let l = document.getElementById("list")
    if (l) {
        l.innerHTML = ""
        for (let page of pages) {
            l.innerHTML += `<li><a href="/${page.id}.html">${page.id}: ${page.title}</a></li>`
        }
    }
}