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
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ mdBook builds on stable Rust, if you want to build mdBook from source, here are

The resulting binary can be found in `mdBook/target/debug/` under the name `mdbook` or `mdbook.exe`.

## Code Quality
## Code quality

We love code quality and Rust has some excellent tools to assist you with contributions.

### Formatting Code with rustfmt
### Formatting code with rustfmt

Before you make your Pull Request to the project, please run it through the `rustfmt` utility.
This will ensure we have good quality source code that is better for us all to maintain.
Expand All @@ -84,7 +84,7 @@ The quick guide is

For more information, such as running it from your favourite editor, please see the `rustfmt` project. [rustfmt](https://github.com/rust-lang/rustfmt)

### Finding Issues with Clippy
### Finding issues with clippy

[Clippy](https://doc.rust-lang.org/clippy/) is a code analyser/linter detecting mistakes, and therefore helps to improve your code.
Like formatting your code with `rustfmt`, running clippy regularly and before your Pull Request will help us maintain awesome code.
Expand Down
20 changes: 10 additions & 10 deletions guide/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

[Introduction](README.md)

# User Guide
# User guide

- [Installation](guide/installation.md)
- [Reading Books](guide/reading.md)
- [Creating a Book](guide/creating.md)
- [Reading books](guide/reading.md)
- [Creating a book](guide/creating.md)

# Reference Guide
# Reference guide

- [Command Line Tool](cli/README.md)
- [Command-line tool](cli/README.md)
- [init](cli/init.md)
- [build](cli/build.md)
- [watch](cli/watch.md)
Expand All @@ -25,18 +25,18 @@
- [General](format/configuration/general.md)
- [Preprocessors](format/configuration/preprocessors.md)
- [Renderers](format/configuration/renderers.md)
- [Environment Variables](format/configuration/environment-variables.md)
- [Environment variables](format/configuration/environment-variables.md)
- [Theme](format/theme/README.md)
- [index.hbs](format/theme/index-hbs.md)
- [Syntax highlighting](format/theme/syntax-highlighting.md)
- [Editor](format/theme/editor.md)
- [MathJax Support](format/mathjax.md)
- [MathJax support](format/mathjax.md)
- [mdBook-specific features](format/mdbook.md)
- [Markdown](format/markdown.md)
- [Continuous Integration](continuous-integration.md)
- [For Developers](for_developers/README.md)
- [Continuous integration](continuous-integration.md)
- [For developers](for_developers/README.md)
- [Preprocessors](for_developers/preprocessors.md)
- [Alternative Backends](for_developers/backends.md)
- [Alternative backends](for_developers/backends.md)

-----------

Expand Down
2 changes: 1 addition & 1 deletion guide/src/cli/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Command Line Tool
# Command-line tool

The `mdbook` command-line tool is used to create and build books.
After you have [installed](../guide/installation.md) `mdbook`, you can run the `mdbook help` command in your terminal to view the available commands.
Expand Down
2 changes: 1 addition & 1 deletion guide/src/continuous-integration.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Running `mdbook` in Continuous Integration
# Running `mdbook` in continuous integration

There are a variety of services such as [GitHub Actions] or [GitLab CI/CD] which can be used to test and deploy your book automatically.

Expand Down
6 changes: 3 additions & 3 deletions guide/src/for_developers/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# For Developers
# For developers

While `mdbook` is mainly used as a command line tool, you can also import the
underlying libraries directly and use those to manage a book. It also has a fairly
Expand All @@ -14,7 +14,7 @@ The two main ways a developer can hook into the book's build process is via,
- [Preprocessors](preprocessors.md)
- [Alternative Backends](backends.md)

## The Build Process
## The build process

The process of rendering a book project goes through several steps.

Expand All @@ -27,7 +27,7 @@ The process of rendering a book project goes through several steps.
1. Run all the preprocessors.
2. Call the backend to render the processed result.

## Using `mdbook` as a Library
## Using `mdbook` as a library

The `mdbook` binary is just a wrapper around the underlying mdBook crates,
exposing their functionality as a command-line program. If you want to
Expand Down
12 changes: 6 additions & 6 deletions guide/src/for_developers/backends.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Alternative Backends
# Alternative backends

A "backend" is simply a program which `mdbook` will invoke during the book
rendering process. This program is passed a JSON representation of the book and
Expand All @@ -10,7 +10,7 @@ See [Configuring Renderers](../format/configuration/renderers.md) for more infor
The community has developed several backends.
See the [Third Party Plugins] wiki page for a list of available backends.

## Setting Up
## Setting up

This page will step you through creating your own alternative backend in the form
of a simple word counting program. Although it will be written in Rust, there's
Expand Down Expand Up @@ -50,7 +50,7 @@ fn main() {
> It is recommended that backends use the [`semver`] crate to inspect this field
> and emit a warning if there may be a compatibility issue.

## Inspecting the Book
## Inspecting the book

Now our backend has a copy of the book, lets count how many words are in each
chapter!
Expand Down Expand Up @@ -79,7 +79,7 @@ fn count_words(ch: &Chapter) -> usize {
```


## Enabling the Backend
## Enabling the backend

Now we've got the basics running, we want to actually use it. First, install the
program.
Expand Down Expand Up @@ -216,7 +216,7 @@ and then add a check to make sure we skip ignored chapters.
```


## Output and Signalling Failure
## Output and signalling failure

While it's nice to print word counts to the terminal when a book is built, it
might also be a good idea to output them to a file somewhere. `mdbook` tells a
Expand Down Expand Up @@ -319,7 +319,7 @@ generation or a warning).
All environment variables are passed through to the backend, allowing you to use
the usual `RUST_LOG` to control logging verbosity.

## Wrapping Up
## Wrapping up

Although contrived, hopefully this example was enough to show how you'd create
an alternative backend for `mdbook`. If you feel it's missing something, don't
Expand Down
4 changes: 2 additions & 2 deletions guide/src/for_developers/preprocessors.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ the book. Possible use cases are:

See [Configuring Preprocessors](../format/configuration/preprocessors.md) for more information about using preprocessors.

## Hooking Into MDBook
## Hooking into MDBook

MDBook uses a fairly simple mechanism for discovering third party plugins.
A new table is added to `book.toml` (e.g. `[preprocessor.foo]` for the `foo`
Expand Down Expand Up @@ -43,7 +43,7 @@ be adapted for other preprocessors.
```
</details>

## Hints For Implementing A Preprocessor
## Hints for implementing a preprocessor

By pulling in `mdbook-preprocessor` as a library, preprocessors can have access to the
existing infrastructure for dealing with books.
Expand Down
2 changes: 1 addition & 1 deletion guide/src/format/configuration/environment-variables.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Environment Variables
# Environment variables

All configuration values can be overridden from the command line by setting the
corresponding environment variable. Because many operating systems restrict
Expand Down
2 changes: 1 addition & 1 deletion guide/src/format/configuration/general.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# General Configuration
# General configuration

You can configure the parameters for your book in the ***book.toml*** file.

Expand Down
8 changes: 4 additions & 4 deletions guide/src/format/configuration/preprocessors.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ For information on how to create a new preprocessor, see the [Preprocessors for
[Third Party Plugins]: https://github.com/rust-lang/mdBook/wiki/Third-party-plugins
[Preprocessors for Developers]: ../../for_developers/preprocessors.md

## Custom Preprocessor Configuration
## Custom preprocessor configuration

Preprocessors can be added by including a `preprocessor` table in `book.toml` with the name of the preprocessor.
For example, if you have a preprocessor called `mdbook-example`, then you can include it with:
Expand All @@ -42,7 +42,7 @@ For example, if our example preprocessor needed some extra configuration options
some-extra-feature = true
```

## Locking a Preprocessor dependency to a renderer
## Locking a preprocessor dependency to a renderer

You can explicitly specify that a preprocessor should run for a renderer by
binding the two together.
Expand All @@ -52,7 +52,7 @@ binding the two together.
renderers = ["html"] # example preprocessor only runs with the HTML renderer
```

## Provide Your Own Command
## Provide your own command

By default when you add a `[preprocessor.foo]` table to your `book.toml` file,
`mdbook` will try to invoke the `mdbook-foo` executable. If you want to use a
Expand All @@ -76,7 +76,7 @@ optional = true

This demotes the error to a warning.

## Require A Certain Order
## Require a certain order

The order in which preprocessors are run can be controlled with the `before` and `after` fields.
For example, suppose you want your `linenos` preprocessor to process lines that may have been `{{#include}}`d; then you want it to run after the built-in `links` preprocessor, which you can require using either the `before` or `after` field:
Expand Down
2 changes: 1 addition & 1 deletion guide/src/format/configuration/renderers.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ This will generate an HTML page which will automatically redirect to the given l

When fragment redirects are specified, the page must use JavaScript to redirect to the correct location. This is useful if you rename or move a section header. Fragment redirects work with existing pages and deleted pages.

## Markdown Renderer
## Markdown renderer

The Markdown renderer will run preprocessors and then output the resulting
Markdown. This is mostly useful for debugging preprocessors, especially in
Expand Down
2 changes: 1 addition & 1 deletion guide/src/format/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ or [try out](https://spec.commonmark.org/dingus/) CommonMark in real time. A com
this documentation, but below is a high level overview of some of the basics. For a more in-depth experience, check out the
[Markdown Guide](https://www.markdownguide.org).

## Text and Paragraphs
## Text and paragraphs

Text is rendered relatively predictably:

Expand Down
2 changes: 1 addition & 1 deletion guide/src/format/mathjax.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# MathJax Support
# MathJax support

mdBook has optional support for math equations through
[MathJax](https://www.mathjax.org/).
Expand Down
2 changes: 1 addition & 1 deletion guide/src/format/mdbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ nothidden():
```
~~~

## Rust Playground
## Rust playground

Rust language code blocks will automatically get a play button (<i class="fa fa-play"></i>) which will execute the code and display the output just below the code block.
This works by sending the code to the [Rust Playground].
Expand Down
2 changes: 1 addition & 1 deletion guide/src/format/theme/editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn main() {

Note the new `Undo Changes` button in the editable playgrounds.

## Customizing the Editor
## Customizing the editor

By default, the editor is the [Ace](https://ace.c9.io/) editor, but, if desired,
the functionality may be overridden by providing a different folder:
Expand Down
2 changes: 1 addition & 1 deletion guide/src/format/theme/index-hbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Here is a list of the properties that are exposed:
containing all the chapters of the book. It is used for example to construct
the table of contents (sidebar).

## Handlebars Helpers
## Handlebars helpers

In addition to the properties you can access, there are some handlebars helpers
at your disposal.
Expand Down
2 changes: 1 addition & 1 deletion guide/src/format/theme/syntax-highlighting.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Syntax Highlighting
# Syntax highlighting

mdBook uses [Highlight.js](https://highlightjs.org) with a custom theme
for syntax highlighting.
Expand Down
2 changes: 1 addition & 1 deletion guide/src/guide/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# User Guide
# User guide

This user guide provides an introduction to basic concepts of using mdBook.

Expand Down
4 changes: 2 additions & 2 deletions guide/src/guide/creating.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Creating a Book
# Creating a book

Once you have the `mdbook` CLI tool installed, you can use it to create and render a book.

Expand Down Expand Up @@ -106,4 +106,4 @@ mdbook build
This will generate a directory named `book` which contains the HTML content of your book.
You can then place this directory on any web server to host it.

For more information about publishing and deploying, check out the [Continuous Integration chapter](../continuous-integration.md) for more.
For more information about publishing and deploying, check out the [Continuous Integration chapter](../continuous-integration.md) for more.
2 changes: 1 addition & 1 deletion guide/src/guide/reading.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Reading Books
# Reading books

This chapter gives an introduction on how to interact with a book produced by mdBook.
This assumes you are reading an HTML book.
Expand Down
Loading