Skip to content

Multi-user Wiki Template

This wiki is a minimal collaborative website. It maintains a list of authors (selected by the wiki owner) who set the content of the wiki.

This wiki uses a frontend to virtually construct pages: /index.html is the app shell, declared as the manifest fallback, so every page path (which has no real file in this drive) serves the shell. When you visit a page, you are viewing a constructed result rather than a file that lives on this drive.

Each author maintains a folder under /nomad-wiki/{wiki-drive-key}/. When a page is visited at some path, the wiki’s frontend runs the following query:

/users/*/nomad-wiki/{wiki-drive-key}/{path}

The matching file with the highest mtime is then chosen for rendering.

<!doctype html>
<html>
<head>
<link rel="icon" type="image/png" sizes="32x32" href="/thumb">
</head>
<body>
<page-controls></page-controls>
<page-content></page-content>
</body>
<script type="module" src="/ui.js"></script>
<style>
body {
max-width: 800px;
margin: 8px auto;
}
main {
padding: 0 2px;
min-height: calc(100vh - 92px);
}
main.loading:before {
content: 'Loading...';
display: block;
padding: 20px 10px;
}
textarea.editor {
width: 100%;
min-height: calc(100vh - 130px);
outline: 0;
box-sizing: border-box;
padding: 6px;
font-size: 15px;
}
footer {
font-size: 85%;
padding: 10px;
border-top: 1px solid #bbb;
}
</style>
</html>