Commit Graph

1327 Commits

Author SHA1 Message Date
Mathieu David 34bdcaf8b3
Merge pull request #660 from THeK3nger/doc-mathjax-note
Add a note in MathJax documentation
2018-04-16 02:24:49 +02:00
Michael Bryan 41399fc29c
Revert "Fixes the search box overlapping with content when first shown (#666)" (#667)
This reverts commit 7f82a197b9.
2018-04-11 10:23:56 +08:00
Michael Bryan 7f82a197b9
Fixes the search box overlapping with content when first shown (#666) 2018-04-10 22:02:27 +08:00
Gwen Lofman 71d44933f0 Replace his with their in reference to reader (#665)
The reader should not be assumed male; I'm a developer and user,
I'm not male.  Makes documentation's language gender neutral to
make it more welcoming to people that do not use he/him pronouns.
2018-04-10 07:02:53 +08:00
Matt Ickstadt f01bf88e69 Fix several theme issues (#648)
* Don't hide page content when displaying search

* Decrease sidebar animation time

* Fix search key event handler
which wasn't completely de-jqueryified.

* Avoid reflowing page content on small screens
This reduces jank caused by reflowing the page text while animating the
sidebar, and it looks nicer.

* Don't use HTMLParentNode.prepend()
since edge doesn't support it yet

* Don't animate menu border bottom color
since it's the same color as the background, which isn't animated.

* Small CSS improvments
- Remove invalid `pointer: cursor` style
- Disable transitions for noscript to stop page from spazzing on every load
- Add `cursor: pointer` to mark
- Disable `cursor: pointer` on noscript menu-title

* JS fixes

- Load MathJax async
- Always use local fontawesome and clipboard.js
- Move js class to html element to make theme switching easier

* Give the print button a bit more margin
2018-04-09 12:10:44 +08:00
Michael Bryan b5ea84c60d
Remove unnecessary travis jobs (#664)
* Removed all the unnecessary CI jobs

* Updated dependencies

* Removed a deprecation warning
2018-04-07 15:47:08 +08:00
Nils 148c806e34 Prevent search from triggering when editing code (#653) 2018-04-07 06:31:51 +08:00
Davide Aversa 38279deed7 Add a note in MathJax documentation 2018-04-03 10:17:06 +02:00
Bastien Orivel 55f7ed1c37 Replace tempdir by tempfile (#650)
The former has been deprecated in favor of the latter
2018-03-27 07:47:37 +08:00
Anders Rasmussen eb0f7179ab Use `git config` to get author name in `mdbook init` (#649)
* Use `git config` to get author name in `mdbook init`

* Return `None` if `git` command fails

* Use `.ok()?` to convert from Result to Option and return early if `None`
2018-03-26 22:37:11 +08:00
Matt Ickstadt 5fb3675151 Update elasticlunr-rs (#646)
* Update dependencies

* Use config structs from elasticlunr-rs

* Update searchindex fixture
2018-03-20 20:22:35 +08:00
Michael Bryan 77b4f6a940
(cargo-release) start next development iteration 0.1.6-alpha.0 2018-03-16 07:38:05 +08:00
Michael Bryan 6308da699a
(cargo-release) version 0.1.5 2018-03-16 07:36:40 +08:00
Guillaume Gomez 62a727c041 Fix search (#645) 2018-03-16 07:37:08 +08:00
Michael Bryan 3bc5d907f4
Merge pull request #641 from rust-lang-nursery/pre-release
Pre release
2018-03-15 09:24:26 +08:00
Michael Bryan 3cd12e7092
(cargo-release) start next development iteration 0.1.5-alpha.0 2018-03-15 09:22:59 +08:00
Michael Bryan c8bbfd4bc1
(cargo-release) version 0.1.4 2018-03-15 09:21:49 +08:00
Michael Bryan d48a27f94f
Updated the appveyor CI image 2018-03-15 09:19:58 +08:00
Michael Bryan 8c456666ff
Added a stability warning to the API docs 2018-03-14 23:48:57 +08:00
Michael Bryan 48b0f547c5
Updated serde dependencies 2018-03-14 23:48:57 +08:00
Michael Bryan 867fbfec05
Updated the call site for handlebars rendering 2018-03-14 23:48:56 +08:00
Michael Bryan 951c873df6
Updated deps 2018-03-14 23:48:56 +08:00
Michael Bryan 4af155e963
Exposed the sections inside a book (#642) 2018-03-14 23:47:17 +08:00
Dylan Maccora 07719a8e0e Adding for content to book.toml on init (#627)
* Obtaining author name from gitconfig

* Writing theme to config on init

* Addressing a FIXME came across

* Add request for book title.
2018-03-14 23:27:56 +08:00
Guillaume Gomez cc92d665ca Improve css so anchor don't go under sidebar (#638) 2018-03-14 23:23:55 +08:00
Pawel Duzinkiewicz b86533b2a1 pulldown-cmark updated to 0.1.2, fixmes removed, new cargo.lock generated. (#639) 2018-03-11 22:17:38 +08:00
Matt Ickstadt b2ad669c61 Search with Elasticlunr, updated (#604)
* Add search with elasticlunr.js

This commit adds search functionality to mdBook, based on work done by @phaiax. The in-browser search code uses elasticlunr.js to execute the search, using an index generated at book build time by elasticlunr-rs.

* Add generator comment
Someone on Reddit was wondering how the rust book was generated and said they checked the source. Thought I'd put this here. Might be a good idea to have a little footer "made with mdBook", but this'll do for now.

* Remove search/editor file override behavior

* Use for loop for book iterator

* Improve HTML regex

* Fix search CORS in file URIs

* Use ammonia to sanitize HTML

* Filter html5ever log messages
2018-03-07 21:02:06 +08:00
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