# mdbook-open-on-gh A preprocessor for [mdbook][] to add a open-on-github link on every page. [mdbook]: https://github.com/rust-lang/mdBook It adds an "Edit this file on GitHub" link on the bottom of every page, linking directly to the source file. It uses the configured `git-repository-url` as the base. ## Installation If you want to use only this preprocessor, install the tool: ``` cargo install mdbook-open-on-gh ``` Add it as a preprocessor to your `book.toml`: ``` [preprocessor.open-on-gh] command = "mdbook-open-on-gh" renderer = ["html"] ``` Add a repository URL to use as a base in your `book.toml`: ```toml [output.html] git-repository-url = "https://github.com/mozilla/glean" ``` To style the footer add a custom CSS file for your HTML output: ```toml [output.html] additional-css = ["open-in.css"] ``` And in `open-in.css` style the `