{% extends "base.html" %} {% block title %}Wikis — Jamgraf{% endblock %} {% block content %}

Wikis

{% if error %}{% endif %} {% if ok %}{% endif %} {% if migration %} {# Waikiki became Jamgraf. Only shown when moving the old data needs a person; see config.migrate_legacy_data_dir for the cases. #} {% endif %}

Each wiki is a fully isolated database file — pages, search, and [[links]] never cross between them. Save a wiki to a file to back it up or move it; open one to bring it in. Open takes any shape Jamgraf writes — a .wiki save, a wiki bundle, or a folder (or zip) of exported .md pages — and reads the file's shape, not its name.

{# Browser fallback for Open (the desktop app uses a native dialog instead). #} {% for w in wikis %} {% endfor %}
{{ w.name }} /{{ w.slug }} {% if w.slug == current_wiki %}active{% endif %} {% set s = stats[w.slug] %} {% if s.unreadable %} {# A file SQLite can't open. Say so here rather than 500 the page: this is where someone comes to open a backup or move to a wiki that works, so it has to render. See issue #71. #} can’t be read
{{ s.reason }} · {{ (s.bytes / 1048576) | round(1) }} MB on disk, left untouched
{# The restore route, spelled out where the damage is reported. Settings explains it too, but Settings reads the active wiki — which may be this one. #}
How to get this wiki back
    {% if restore.latest %}
  1. Open {{ restore.dir }} and take the newest folder — {{ restore.latest.when }}.
  2. {% else %}
  3. Open {{ restore.dir }}: one folder per date, each holding a {{ w.slug }}.db. {% if not restore.enabled %}Automatic backups are currently switched off, so there may be none — any .wiki file you exported works here too.{% endif %}
  4. {% endif %}
  5. Use Open wiki file… above on its {{ w.slug }}.db.
  6. It opens as a separate wiki, so you can compare before deciding anything. The damaged file is left as it is.
{% else %}
{{ s.articles }} article{{ '' if s.articles == 1 else 's' }} · {{ s.links }} link{{ '' if s.links == 1 else 's' }} {% if s.links_broken %}({{ s.links_broken }} broken){% endif %} · {{ (s.bytes / 1048576) | round(1) }} MB {% if s.trashed %} · {{ s.trashed }} in trash{% endif %}
{% endif %}
Rename…

The name is just the label. The address is in every link to this wiki and is the name of its file, so changing it renames the file and any tab with this wiki open needs a reload.

{% if w.slug == help_wiki %}

The Help wiki's address is built in — the app re-creates it whenever it is missing, so a renamed one would come back as a second copy.

{% endif %}
{% if s.unreadable %} Export .md {% else %} Export .md {% endif %}

Create a wiki

{% endblock %}