Documents
Documents
The Documents page is a full-featured writing workspace. It uses a multi-panel layout that adapts to your screen size, giving you a file tree, editor, and metadata panel all in one place.
Layout
On desktop, the page is split into two resizable panels:
- Left panel -- A collapsible file tree showing your entire document hierarchy.
- Main panel -- The editor area where you read and write content.
On smaller screens, the file tree moves into a slide-out drawer accessible via the folder icon in the toolbar.
File Tree
The file tree loads your full directory structure and displays files with context-appropriate icons (markdown, code, JSON, images, etc.). You can:
- Search files by name using the search input at the top.
- Create files by right-clicking and choosing "New File." Files without an extension automatically get
.mdappended. - Create folders via the right-click context menu.
- Rename files and folders through the context menu.
- Delete files or folders with a confirmation prompt. Deleting a folder removes everything inside it.
- Drag and drop files and folders to reorganize your structure. Drag an item onto a folder to move it there.
Editor
When you select a file, the editor opens in the main panel. The experience depends on the file type.
Markdown Files
Markdown files offer a mode toggle in the toolbar:
- Editor Mode -- A rich-text WYSIWYG editor with a formatting toolbar (headings, bold, italic, code, lists, blockquotes, links, code blocks, horizontal rules, undo/redo).
- Code Mode -- A CodeMirror-based source editor for working directly with the raw markdown.
Your preferred mode is remembered across sessions.
Other Text Files
Non-markdown text files (TypeScript, JSON, CSS, etc.) open directly in the CodeMirror editor with syntax highlighting based on the file extension.
Auto-Save
Changes are automatically saved after 2 seconds of inactivity. A status indicator in the toolbar shows:
- Unsaved changes -- You have edits that have not been saved yet.
- Saving... -- A save is in progress.
- Saved -- The file has been written to disk.
- Error saving -- Something went wrong; try saving manually.
You can also force an immediate save with Cmd+S (Mac) or Ctrl+S (Windows/Linux).
Metadata Panel
A collapsible panel above the editor lets you manage document metadata:
- Project -- Assign the document to a project using a dropdown.
- Visibility -- Control who can see this document (Hidden, Private, or Public).
- Tags -- Add freeform tags for organization. Type a tag and press Enter to add it.
Toggle the metadata panel with the expand/collapse button in the toolbar.
Sharing
Click the share icon in the editor toolbar to manage document visibility:
| Visibility | Behavior |
|---|---|
| Hidden | Only you can view it. Not accessible via any link. |
| Private | Anyone with the link can view it, but search engines will not index it. |
| Public | Visible to everyone and indexed by search engines. |
When you enable sharing (Private or Public), the share link is automatically copied to your clipboard. If the document is already shared, clicking the share icon copies the link again.
Shared documents are viewable at /view/<document-id>. The public view renders markdown with a table of contents sidebar, displays document metadata (author, dates, tags), and provides Copy, Download, and Source/Preview toggle buttons. Authenticated users also see an Edit button to jump back into the editor.
The Documents page remembers which file you had open last. When you return, it automatically re-opens that file.
See API Reference for endpoint details.