mdbook-permalinks
For best results, view this page at https://docs.tonywu.dev/mdbookkit/permalinks.
Permalinks in mdBook!
With this preprocessor, you can easily link to any file in your Git repository in your mdBook documentation, without having to hard-code URLs or worry about broken links.
You simply write ...
Here is a link to the project's [Cargo.toml](/Cargo.toml).
... and you will get:
Here is a link to the project's Cargo.toml.
Overview
Follow the quickstart tutorial to try out the preprocessor!
Feature highlights:
-
Use file paths as links. The preprocessor converts them to links to your Git repository.
-
Links are anchored to the Git commit at the time your book is built.
-
Supports repositories on GitHub, Codeberg, and Tangled out of the box, but you can also define your own permalink format.
-
Use permalinks to display images and media files.
-
Get warnings when links become broken.
.fg { fill: #B2B2B2 } .bg { fill: #1A1A1A } .fg-bright-blue { fill: #5CADF1 } .fg-yellow { fill: #D19A66 } .container { padding: 0 10px; line-height: 18px; } .bold { font-weight: bold; } tspan { font: 14px Menlo, Roboto Mono, Ubuntu Mono, Liberation Mono, Consolas, ui-monospace, monospace; white-space: pre; line-height: 18px; } warning: broken link to "../nook.toml" ╭▸ src/tutorial.md:1:19 │ 1 │ See [`book.toml`](../nook.toml) for more info. │ ┯━━━━━━━━━━━ │ │ │ resolves to a path that doesn't exist: ╰╴ "nook.toml" WARN mdbook-permalinks: finished with warnings
Link rot happens all the time. The preprocessor will tell you about it.
License
This project is released under the Apache 2.0 License and the MIT License.