Commit Graph

900 Commits

Author SHA1 Message Date
Sebastian Thiel bb043ef660 Add complete preprocessor example (#629)
* First version of preprocessor example, with quicli

It seems it's not worth it right now.

* Remove quicli, just to simplify everything

* Finish de-emphasise example

* Finish preprocessor example in book

* Rename preprocessor type

* Apply changes requested in review

* Update preprocessor docs with latest code

[skip CI]
2018-02-24 18:14:52 +08:00
Sorin Davidoi 82aef1bc3f fix(theme/book): Workaround focusout bug in macOS and iOS (#630) 2018-02-24 17:23:45 +08:00
Dylan Maccora 38c883e1ef Changing clap settings (#624) 2018-02-18 15:10:47 +08:00
Sorin Davidoi 8a00a004d8 Handle some cases when JavaScript is disabled (#614)
* feat(theme/index): Assume the sidebar is initially visible

In case the inline script does not execute, the fallback is to show the sidebar.

* feat(theme/index): Hide sidebar toggle and theme selector buttons when JavaScript is disabled

Makes no sense to show them in this case since they do not work.
2018-02-18 15:05:15 +08:00
Bulat Musin 6af77a7792 Update documentation to reflect addition of `clean` subcommand. (#607)
* update documentation

Update README.md and User Guide to reflect addition of `clean`
subcommand. Do minor spelling fixes too.

* fix grammar in `clean` documentation
2018-02-18 15:04:04 +08:00
Michael Bryan b5ca820345
(cargo-release) start next development iteration 0.1.4-alpha.0 2018-02-16 07:47:35 +08:00
Michael Bryan b765023da3
(cargo-release) version 0.1.3 2018-02-16 07:45:52 +08:00
Sorin Davidoi d306aed587 Accessibility improvements (#611)
* fix(theme/book/themes): Check for control keys in event listener

* fix(theme/index): Menu role for theme selector

* fix(theme/book/themes): Handle focus when toggling theme list

* feat(theme/book/themes): Handle ArrowUp, ArrowDown, Home and End
2018-02-15 07:37:19 +08:00
Sorin Davidoi 89a5dbaf9a fix(theme/stylus/sidebar): Contain scrolling to the sidebar (#612)
> A position fixed left navigation bar does not want to hand off scrolling to the document because a scroll gesture performed on the navigation bar is almost never meant to scroll the document. In this case, the author can use contain on the sidebar to prevent scrolling from being chained to the parent document element.

https://wicg.github.io/overscroll-behavior/#motivating-examples
2018-02-15 07:24:39 +08:00
Ryan Scheel 6961247f56 Include Cargo.lock (#620) 2018-02-15 07:03:10 +08:00
Sorin Davidoi 07551760c9 feat(theme/stylus/sidebar): Reduce padding on non-touch devices (#615)
Closes #594.
2018-02-15 06:59:55 +08:00
Sorin Davidoi 990daceed5 feat(theme/book): Scroll to top when clicking the page title (#613)
Common pattern, especially on mobile devices where the page can be quite long.
2018-02-09 18:34:18 +08:00
Mathieu David 2989096188
Merge pull request #609 from bchatard/typo
Fix typo in format configuration
2018-02-05 15:17:24 +01:00
bchatard 03c6c44e5b Fix typo in format configuration 2018-02-05 13:01:17 +01:00
Ofek Lev 31a370d149 fix readme (#606) 2018-02-05 07:11:55 +08:00
Bulat Musin 0bc1030a02 implement `clean` subcommand (#583) 2018-02-04 21:00:29 +08:00
boxdot 43fcd00cd5 Inline footnotes. (#600) 2018-02-02 20:15:48 +08:00
Mathieu David 3d83b784b3
Merge pull request #601 from tshepang/patch-1
doc: small fixes
2018-02-01 11:31:55 +01:00
Tshepang Lekhonkhobe 5d42738a79
doc: small fixes 2018-02-01 03:29:39 +02:00
Michael Bryan 1f4dab3e5c
(cargo-release) start next development iteration 0.1.3-alpha.0 2018-01-31 19:19:50 +08:00
Michael Bryan 7181993b43
(cargo-release) version 0.1.2 2018-01-31 19:18:02 +08:00
boxdot bf9f58e11b Add docs for mdBook specific include feature (#593)
* Add docs for mdBook specific include feature.

Also:
* Fix bug in take_lines taking `end`-many lines instead of
  `end-start` many.
* Handle special case `include:number` as including a single line.
* Start counting lines at 1 and not 0.

* Merge mdBook and rust specific features into one chapter.
2018-01-31 18:57:47 +08:00
Steve Klabnik 3ba71c570c Handle input path with regards to custom css (#598)
* Handle input path with regards to custom css

Before, when someone like the Reference set their extra css as
"theme/reference.css" in their book.toml, this path would be treated as
relative to the invocation of mdbook, and not respect the input path. This
PR modifies these relative paths to do so.

Fixes the build of https://github.com/rust-lang/rust/pull/47753 which
blocks updating rustc to mdbook 0.1

* don't use file-name

the style name is theme/reference.css, this results in a Err(StripPrefixError(())), which means that we push only the file_name, losing the theme bit
2018-01-30 12:29:09 +08:00
Sorin Davidoi 674e58e747 fix(theme): Use aria-label alonside title (#568)
Tested this on macOS with VoiceOver, and it does not pick up the title as the text of the button. Kind of makes sense, since title and aria-label are not the same. This will make sure that the buttons and links are labeled properly.
2018-01-27 18:52:47 +08:00
Michael Bryan 348c5d07c5
(cargo-release) start next development iteration 0.1.2-alpha.0 2018-01-27 11:56:22 +08:00
Michael Bryan 1790b04e03
(cargo-release) version 0.1.1 2018-01-27 11:54:27 +08:00
Michael Bryan 50ee15472b
Updated the light theme to have a lighter scrollbar (#590) 2018-01-27 11:52:43 +08:00
Michael Bryan ffb90bb9e2
Made sure we create the themes directory (#586) 2018-01-26 14:38:53 +08:00
Sorin Davidoi 186e649530 feat(src/theme): Scrollbar theme (#563) 2018-01-26 01:17:02 +08:00
Michael Bryan adc1f4ade7
Reverted #549 (#565) 2018-01-26 01:12:10 +08:00
Michael Bryan b777a318f7
Expose functionality for creating core types (#578)
* You can now add chapters to a Book

* Made the RenderContext::new() constructor public
2018-01-26 01:11:48 +08:00
Michael Bryan 30e3b83167
Updated Cargo.toml metadata to make releases easier (#584) 2018-01-26 01:11:32 +08:00
Sorin Davidoi f082187844 fix(theme/book): Use passive listeners for touchstart, touchmove (#575) 2018-01-25 18:44:22 +08:00
Michael Bryan 6119972fa7
Merge pull request #581 from bmusin/patch-3
fix typo
2018-01-25 17:49:40 +08:00
Michael Bryan a910435fd9
Merge pull request #577 from Michael-F-Bryan/missing-backends-arent-fatal
Missing backends shouldn't be fatal
2018-01-25 07:33:54 +08:00
Bulat Musin 53b902b479 remove dot for consistency (#580) 2018-01-25 07:32:52 +08:00
Bulat Musin 2e9d8671a0 fix typo (insert dash) (#582) 2018-01-25 07:32:33 +08:00
Bulat Musin 50cdfc9623 fix typo (#579) 2018-01-25 07:25:56 +08:00
Bulat Musin d47f4dce7f
fix typo 2018-01-24 21:52:51 +03:00
Michael Bryan bda23f0183
Missing backends are no longer fatal 2018-01-25 01:15:29 +08:00
Michael Bryan 1fbad982d8
(cargo-release) start next development iteration 0.1.1-alpha.0 2018-01-23 22:06:55 +08:00
Michael Bryan fada73eb74
(cargo-release) version 0.1.0 2018-01-23 22:05:07 +08:00
Michael Bryan dee91b146b
Added Michael-F-Bryan to the authors list 2018-01-23 22:04:45 +08:00
Michael Bryan 492f393c0b
Escaped the book's example {{#include ...}} tag 2018-01-23 21:13:33 +08:00
Sorin Davidoi bcfb37d964 fix(theme): Sticky header support in Safari (#572)
Safari scrolls on body, not on the html tag. It also needs sticky to be prefixed.
2018-01-23 21:13:11 +08:00
Markus Kohlhase b1b8ba4b98 fix(doc): make installation from git work again (#570)
cargo install --git https://github.com/rust-lang-nursery/mdBook.git
leads to error: multiple packages with binaries found: mdbook, mdbook-wordcount
Fix: append name of binary (`mdbook`).
2018-01-23 21:07:14 +08:00
Sorin Davidoi 0531b585e4 fix(theme/index): Use localStorage, not store (#574)
* fix(theme/index): Use localStorage, not store

* fix(theme/index): Handle quotes values in localStorage
2018-01-23 20:30:50 +08:00
Michael Bryan 5379a0bdf8
Made the logging a lot quieter by default (#569) 2018-01-23 01:28:37 +08:00
Michael Bryan 0d146ffa82
Improve SUMMARY parser error messages (fixes #566) (#567) 2018-01-22 20:47:29 +08:00
Sorin Davidoi 0bc3544c81 refactor: Remove store.js (use localStorage) (#550) 2018-01-22 07:04:16 +08:00