Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.11.1 — 2026-10-04

### Fixed
- **Inline code in table cells no longer shows its backticks.** `` `GET /sync` `` in a cell printed with the markdown backticks around it; it now shows just the code, as inline code does everywhere else.

### Changed
- **Shorter README, fuller docs.** The README is now a quick tour: the main features, install, a quick start and links. The detail moved to focused pages under `docs/`: install, features, themes and color, configuration and keybindings, command line, and troubleshooting. The themes page adds a complete custom-theme template, and the configuration page lists every keybinding action name.
- **New website.** [borghei.github.io/ink](https://borghei.github.io/ink/) is redesigned around fresh recordings of the current release: a demo you can pause, install commands with copy buttons, screenshots of diagrams, the table of contents, the theme picker and the terminal theme on light and dark terminals, and links into the docs. It also gets a favicon, a 404 page and a new social preview image.

## 0.11.0 — 2026-10-03

### Added
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink-md"
version = "0.11.0"
version = "0.11.1"
edition = "2021"
# Highest rust-version declared by any resolved dependency (quantette, via
# ratatui-image). CI's msrv job builds with exactly this toolchain.
Expand Down
529 changes: 52 additions & 477 deletions README.md

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions docs/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Page not found: ink</title>
<meta name="robots" content="noindex">
<link rel="icon" href="/ink/favicon.svg" type="image/svg+xml">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500&family=Geist+Mono&family=Instrument+Serif&display=swap" rel="stylesheet">
<style>
:root { color-scheme: dark; }
body {
margin: 0;
min-height: 100dvh;
display: grid;
place-items: center;
padding: 24px;
box-sizing: border-box;
background: #121110;
color: #ecebe6;
font: 400 17px/1.6 "Geist", ui-sans-serif, system-ui, sans-serif;
}
main { max-width: 34rem; }
pre {
margin: 0 0 28px;
font: 14px/1.7 "Geist Mono", ui-monospace, monospace;
color: #8a877e;
white-space: pre-wrap;
}
pre b { color: #e2614a; font-weight: 400; }
h1 { margin: 0 0 12px; font: 400 clamp(40px, 8vw, 64px)/1 "Instrument Serif", Georgia, serif; letter-spacing: -0.02em; }
p { margin: 0 0 24px; color: #b4b1a8; }
a {
display: inline-flex;
align-items: center;
min-height: 40px;
padding: 0 16px;
border: 1px solid #3a3733;
border-radius: 8px;
color: #ecebe6;
text-decoration: none;
font-weight: 500;
transition: border-color 0.2s, background-color 0.2s;
}
a:hover { border-color: #8a877e; background: #191816; }
a:focus-visible { outline: 2px solid #e2614a; outline-offset: 3px; }
</style>
</head>
<body>
<main>
<pre>$ ink this-page.md
<b>error:</b> no such file</pre>
<h1>This page doesn't exist.</h1>
<p>The link may be old, or the docs moved. Everything lives on the home page or in the docs on GitHub.</p>
<a href="/ink/">Back to ink</a>
</main>
</body>
</html>
12 changes: 12 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# ink documentation

| Page | What's in it |
|---|---|
| [Install](install.md) | Every install route, prebuilt binaries, verifying downloads |
| [Features](features.md) | What ink renders and everything you can do in the reader |
| [Themes and color](themes.md) | Built-in themes, the terminal theme, color depth, ASCII mode, custom themes |
| [Configuration](configuration.md) | The config file, every setting, keybindings and presets |
| [Command line](cli.md) | Flags, subcommands, pager use, scripting recipes, shell setup |
| [Troubleshooting](troubleshooting.md) | `ink doctor`, images, colors, clipboard, security model |

Release notes are in the [changelog](../CHANGELOG.md). Want to help? Read [CONTRIBUTING](../CONTRIBUTING.md).
Binary file modified docs/assets/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/demo.mp4
Binary file not shown.
Binary file modified docs/assets/og-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/shot-mermaid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/shot-reader.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/shot-terminal-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/shot-terminal-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/shot-themes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/shot-toc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions docs/assets/showcase.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Release checklist

Shipping **v2.4** of the sync service on Friday. Everything below has to be
green first. Build notes live in `docs/release.md`, and the on-call rota is
on the [team wiki](https://example.com/wiki/oncall).

> [!WARNING]
> The schema change locks the `events` table. Run it outside peak hours.

## Tasks

- [x] Freeze the `main` branch
- [x] Run the load test against staging
- [ ] Rotate the API signing key
- [ ] Post the changelog in #releases

## Latency budget

| Endpoint | p50 | p99 | Status |
|:-------------|:-----:|------:|:------:|
| GET /sync | 12 ms | 48 ms | ok |
| POST /push | 31 ms | 95 ms | ok |
| GET /diff | 54 ms | 210 ms| slow |

## Retry logic

```rust
fn backoff(attempt: u32) -> Duration {
let base = Duration::from_millis(100);
base * 2u32.pow(attempt.min(6))
}
```

Worst-case wait after $n$ retries is $\sum_{k=0}^{n} 100 \cdot 2^k$ ms.

## Rollout

```mermaid
flowchart LR
A[Build] --> B[Staging]
B --> C{Load test}
C -->|pass| D[Canary 5%]
C -->|fail| A
D --> E[Everyone]
```

## After the release

Watch the error budget for 24 hours. If p99 on `/sync` goes over
**100 ms**, roll back first and debug second.
132 changes: 132 additions & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Command line

- [Usage](#usage)
- [Options](#options)
- [Subcommands](#subcommands)
- [Using ink as a pager](#using-ink-as-a-pager)
- [Color in plain output](#color-in-plain-output)
- [Rendering part of a file](#rendering-part-of-a-file)
- [Recipes](#recipes)
- [Shell integration](#shell-integration)

## Usage

```
ink [OPTIONS] [FILE|URL]... [COMMAND]
```

With no file, ink reads stdin when something is piped in and opens the file browser otherwise. `-` means stdin explicitly.

## Options

| Option | What it does |
|---|---|
| `-t`, `--theme <THEME>` | Color theme. Default `auto`, which matches the terminal background. See [Themes](themes.md). |
| `-w`, `--width <WIDTH>` | Max text width: 20 to 1000 columns, or `narrow`, `wide`, `full` |
| `-s`, `--slides` | Presentation mode, split on `---` |
| `-p`, `--plain` | Print rendered output instead of opening the reader. Automatic when stdout isn't a terminal. |
| `--color <WHEN>` | `auto`, `always` or `never`. Default `auto`. See [Color in plain output](#color-in-plain-output). |
| `--watch` | Re-render when the file changes |
| `--toc` | Open with the table of contents showing |
| `--no-images` | Don't render images |
| `--remote-images` | Allow `http` and `https` images. Off by default. |
| `--image-protocol <P>` | `auto`, `kitty`, `iterm2`, `sixel` or `halfblocks` |
| `--list-themes` | List built-in and custom themes, then exit |
| `--no-pager` | Never page `--plain` output, even on a terminal |
| `--frontmatter` | Show frontmatter as a box at the top |
| `--line-range <START:END>` | Render only these source lines. Repeatable. Implies `--plain`. |
| `--spacing <MODE>` | `compact`, `normal` or `relaxed` |
| `--no-mouse` | Leave the mouse to your terminal for this session |
| `--ascii` | Plain ASCII borders, bullets and markers |
| `-h`, `--help` | Help. `--help` is longer than `-h`. |
| `-V`, `--version` | Version |

Most options have a config equivalent. See [Configuration](configuration.md).

## Subcommands

| Command | What it does |
|---|---|
| `ink outline <FILE>` | Print the heading structure |
| `ink stats <FILE>` | Word count, reading time and element counts |
| `ink diff <OLD> <NEW>` | Diff two markdown files |
| `ink keybindings` | Print the active key map, preset plus your overrides |
| `ink config init` | Write a commented starter config |
| `ink config path` | Print where the config lives |
| `ink doctor [--save FILE]` | Diagnostic report for bug reports. See [Troubleshooting](troubleshooting.md). |
| `ink shell-setup <SHELL>` | Print shell snippets: aliases, fzf preview, git setup |
| `ink completions <SHELL>` | Shell completions: `bash`, `zsh`, `fish`, `powershell`, `elvish` |
| `ink man` | Man page (troff) on stdout |

## Using ink as a pager

`ink --plain` renders the document and prints it, styled, without the interactive reader.

- On a terminal, long output goes through `$PAGER` (default `less -R`), so ink works as a markdown `cat` or `less`.
- Piped or redirected, it prints straight through. Scripts, fzf previews and git get clean output.
- `--no-pager` always prints directly.

You rarely need the flag: when stdout isn't a terminal, `ink file.md` already behaves like `ink --plain file.md`, as `bat` and `glow` do.

## Color in plain output

`--color` decides whether `--plain` and `ink diff` emit color and OSC 8 hyperlinks. In order:

1. `--color=always` or `--color=never` wins.
2. `NO_COLOR` turns color off.
3. `CLICOLOR_FORCE=1` or `FORCE_COLOR` turns it on.
4. `TERM=dumb` turns it off.
5. Otherwise, color only when stdout is a terminal.

So redirects, pipes and `git` textconv get clean text by default. A tool that shows ANSI from a pipe, like fzf or `less -R`, needs `--color=always`.

24-bit colors drop to the 256-color palette on terminals that don't advertise truecolor.

## Rendering part of a file

`--line-range` works like `bat`'s. It picks lines of the markdown source (1-based, inclusive) and always prints plain output.

```bash
ink --line-range 40:80 README.md # lines 40 to 80
ink --line-range 40: README.md # line 40 to the end
ink --line-range :80 README.md # start to line 80
ink --line-range 12 README.md # one line
ink --line-range 1:5 --line-range 40:50 README.md
```

A range that cuts through a fenced code block keeps the block intact and highlighted, inside a blockquote too.

## Recipes

```bash
# fzf with a rendered preview
fzf --preview 'ink --plain --color=always {}'

# page a file yourself
ink --plain --color=always notes.md | less -R

# readable markdown in git diffs (clean text, no escapes)
git config --global diff.markdown.textconv "ink --plain"
echo '*.md diff=markdown' >> ~/.gitattributes

# read a README from the web
ink https://raw.githubusercontent.com/borghei/ink/main/README.md
```

## Shell integration

```bash
ink shell-setup zsh # or bash, fish
```

This prints snippets for your shell profile: aliases, an fzf preview and git setup. Read them, then paste the parts you want.

Completions and the man page:

```bash
ink completions zsh > ~/.zfunc/_ink
ink completions fish > ~/.config/fish/completions/ink.fish
ink man > /usr/local/share/man/man1/ink.1
```

The release archives and the `.deb` and `.rpm` packages already include both.
Loading
Loading