-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mdbook docs page #11849
Merged
Merged
Add mdbook docs page #11849
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bf5162f
Add mdbook docs page
ericholscher 3237134
Merge branch 'main' into mdbook-example
ericholscher 9779094
Update docs/user/intro/mdbook.rst
ericholscher 9d63e24
Add back to toctree
ericholscher cb5f63f
Remove Limitations
ericholscher c59f5c2
Note additional-css
ericholscher File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
mdBook | ||
====== | ||
|
||
.. meta:: | ||
:description lang=en: Learn how to host mdBook documentation on Read the Docs. | ||
|
||
`mdBook`_ is a command line tool to create books with Markdown. | ||
|
||
Minimal configuration is required to build an existing mdBook project on Read the Docs. | ||
|
||
.. code-block:: yaml | ||
:caption: .readthedocs.yaml | ||
version: 2 | ||
build: | ||
os: ubuntu-lts-latest | ||
tools: | ||
rust: latest | ||
commands: | ||
- cargo --version | ||
ericholscher marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- cargo install mdbook | ||
# For an example book.. | ||
# - mdbook init docs | ||
- mdbook build docs --dest-dir $READTHEDOCS_OUTPUT/html | ||
.. _mdBook: https://rust-lang.github.io/mdBook/ | ||
|
||
Limitations | ||
----------- | ||
|
||
All Read the Docs features are supported for mdBook projects, | ||
as it builds static HTML files that can be hosted on Read the Docs. | ||
ericholscher marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Getting started | ||
--------------- | ||
|
||
- If you have an existing mdBook project you want to host on Read the Docs, check out our :doc:`/intro/add-project` guide. | ||
- If you're new to mdBook, check out the official `Getting started with mdBook`_ guide. | ||
|
||
.. _Getting started with mdBook: https://rust-lang.github.io/mdBook/guide/creating.html | ||
|
||
Example repository and demo | ||
--------------------------- | ||
|
||
Example repository | ||
https://github.com/readthedocs/test-builds/tree/mdbook | ||
|
||
Demo | ||
https://test-builds.readthedocs.io/en/mdbook/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should add custom CSS files to make the flyout looks nice; it's pretty small now: See an example for MkDocs: https://docs.readthedocs.io/en/latest/intro/mkdocs.html#adjust-the-flyout-menu-font-size |
||
|
||
Further reading | ||
--------------- | ||
|
||
* `mdBook documentation`_ | ||
|
||
.. _mdBook documentation: https://rust-lang.github.io/mdBook/ |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried using
build.jobs.build.html
instead? I think we should be recommending as much as possible that approach.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't, but thought this was blocked on #11819