Commit Graph

990 Commits

Author SHA1 Message Date
Eric Huss fae0759626 Split lang on tab to be consistent with rustdoc and GitHub. 2021-07-10 09:33:34 -07:00
Tuyen Pham cc74ca2e6e Update mod.rs 2021-07-10 09:26:41 -07:00
Tuyen Pham 7cae3a058d Support space as seperator between language and additional class in code block
This PR try to resolve this issue: https://github.com/rust-lang/mdBook/issues/1384
2021-07-10 09:26:41 -07:00
Eric Huss 8fb6ac7987
Merge pull request #1599 from notriddle/notriddle/play-button-no-output
feat(playground): show "No output" on playgrounds that print nothing
2021-07-08 13:17:15 -07:00
Michael Howell 82d32ee761 feat(playground): show "No output" on playgrounds that print nothing
Fixes #1594
2021-07-07 10:44:51 -07:00
Eric Huss 56652e8fa6
Merge pull request #1559 from joshrotenberg/title_ignore_flags_init
Add --title option and --gitignore flag to mdbook init
2021-07-06 09:22:38 -07:00
Eric Huss 96b6f02834
Merge pull request #1425 from alexmaco/completions
Add ability to generate shell completions via clap
2021-07-06 08:59:06 -07:00
josh rotenberg ebdab38a32 remove debugging 2021-07-04 20:25:04 -07:00
josh rotenberg b87c231fc3 first pass at 2021 support 2021-07-04 14:44:23 -07:00
josh rotenberg 8024b08f93 format 2021-07-04 12:00:13 -07:00
josh rotenberg 8ec0bf6e30 ignore now takes a value 2021-07-04 11:57:46 -07:00
josh rotenberg 86d390032b drop short flags 2021-07-04 08:15:51 -07:00
Eric Huss dc2062ab36
Merge pull request #1541 from ehuss/id-chapter_begin
Remove chapter_begin id from print output.
2021-06-08 14:55:06 -07:00
josh rotenberg b59aab56f2 Revert "book: use non_exhaustive attribute for struct Book"
This reverts commit c1b2bec7d7.
2021-06-08 12:46:27 -07:00
Eric Huss d325c601bb
Merge pull request #1554 from joshrotenberg/edit_url_custom_src
Use the configured book src directory for the edit url template path
2021-06-01 18:36:32 -07:00
josh rotenberg e5e10c681a add init flags
add init flags

update init command in guide
2021-05-31 20:47:51 -07:00
josh rotenberg 05edc4421b clippy: PathBuf to Path 2021-05-31 20:27:52 -07:00
Riccardo Magliocchetti 714c5fb81e renderer: remove redundant clone in CmdRenderer
As suggested by clippy:
https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
2021-05-30 19:33:46 +02:00
Riccardo Magliocchetti 56ceb627b8 book: simplify is_draft_chapter
As suggested by clippy:
https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
2021-05-30 19:33:46 +02:00
Riccardo Magliocchetti c1b2bec7d7 book: use non_exhaustive attribute for struct Book
As suggested by clippy:
https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive
2021-05-30 19:33:46 +02:00
josh rotenberg fcf8f938d2 use panic::set_hook to exit 2021-05-28 07:40:56 -07:00
josh rotenberg 60aaa7ae31 use book_config.src for edit path
use book_config.src for edit path

use book_config.src for edit path

fmt

concat the path, this is a url
2021-05-27 21:54:58 -07:00
Eric Huss 3c2b8cd10f
Merge pull request #1539 from joshrotenberg/report_config_errors
Report book.toml parse error when invalid fields are found
2021-05-24 13:25:07 -07:00
josh rotenberg 6b0b42ebcc update build and rust config change 2021-05-24 12:01:56 -07:00
josh rotenberg 7a3513200f
Update src/config.rs
Co-authored-by: Eric Huss <eric@huss.org>
2021-05-24 11:59:32 -07:00
Eldred Habert 3ee22fb430
Apply max width to video as well as images
Since videos are essentially animated images, this same max width makes sense for both.
2021-05-23 16:10:26 +02:00
Eric Huss 16c5ec4d74 Remove chapter_begin id from print output. 2021-05-22 15:12:54 -07:00
Eric Huss 7e7e779ef7
Merge pull request #1526 from apatniv/add_log_messages
Add useful messages when command line preprocessor fails
2021-05-21 10:06:36 -07:00
Andrea Gelmini b364e8ea2c
Fix typos (#1540)
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-05-21 12:56:32 +02:00
josh rotenberg 78325aaccb report book.toml parse errors
check config for book parse errors

add invalid_title_type

handle build and rust config errors
2021-05-19 09:32:24 -07:00
apatniv b21446898a Add useful messages when command line preprocessor fails 2021-05-08 12:48:57 -04:00
Eric Huss 84b3b7218e
Merge pull request #1437 from rust-lang-ja/summary-with-html-comments
Skip HTML nodes in SUMMARY.md
2021-05-04 07:26:03 -07:00
Eric Huss a72d6002b7
Merge pull request #1506 from flavio/feature/suggest-an-edit-link
Feature/suggest an edit link
2021-04-26 11:03:50 -07:00
Flavio Castelli 7525b35383
Rename git-repository-edit-url-template
Change the name of the git-repository-edit-url-template to be more
generic: `edit-url-template`

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
2021-04-26 09:59:08 +02:00
Guillaume Gomez c1d982d92b Remove duplicate "name" attribute on input 2021-04-24 17:27:49 +02:00
Flavio Castelli 7aff98a859
Fix generation of edit links
The `IndexPreprocessor` rewrites the path for files
named `README.md` to be `index.md`. This breaks the edit link
in some circumstances.

To address this issues, the `Chapter` struct has now a new attribute
called `source_path`. This is initialized with the same value as
`path`, but is never ever changed.

Finally, the edit link is built by using the `source_path` rather
than the `path`.
2021-04-19 18:58:15 +02:00
Jonas Berlin bbf54d7459
[ReviewFix] Replace edit baseurl with template and make visibility independent of git_repository_url. 2021-04-19 16:16:08 +02:00
Jonas Berlin dcc642e66d
[ReviewFix] cargo fmt 2021-04-19 14:51:16 +02:00
Jonas Berlin 2b738d4425
[ReviewFix] Fix variable naming 2021-04-19 14:51:16 +02:00
Jonas Berlin b3670ece0e
Add "Suggest an edit" link next to "Git repository"
Includes new configuration option `git-repository-edit-baseurl` for
supporting non-GitHub repository layouts.
2021-04-19 14:51:14 +02:00
Tatsuya Kawano 30ce7e79ac Skip HTML comments in the summary
- Revert changes in parse_numbered(). They were unnecessary.
2021-04-05 18:31:11 +08:00
David Tolnay 94f7578576
Add page title override: {{#title My Title}} (#1381)
* Add page title override: {{#title My Title}}

* Document {{#title}} in guide
2021-03-24 02:36:45 +01:00
Evian-Zhang 0eb23efd44 Make page-break not configurable 2021-03-16 09:33:19 +08:00
Evian-Zhang e78a8471c7 Add page-break option 2021-03-12 14:00:29 +08:00
Eric Huss c83bbd6319
Merge pull request #1463 from ehuss/fix-header-scroll
Fix some issues with fragment scrolling and linking.
2021-02-22 14:50:17 -08:00
Tim Small 7f59fdd9bd Enhance text contrast of `light` theme to improve accessibility.
The existing light theme has relatively low contrast between the text
(and other UI elements) and background (especially within code blocks).
This presents difficulties for people with reduced visual contrast
perception (common in older adults).

This patch makes changes to the default `light` theme to meet the
minimum contrast requirement of the v2.1 W3C WCAG (Web Content
Accessibility Guidelines)
https://www.w3.org/WAI/WCAG21/quickref/#contrast-minimum

The small size, and slender font used for the title text makes it hard
to read, even with the increased contrast colour scheme, so this patch
also increases the size of the title text font by 20%.

Closes #1442
2021-02-21 14:35:10 +00:00
Eric Huss 45d41eac5f Fix some issues with fragment scrolling and linking. 2021-02-12 16:37:07 -08:00
Eric Huss 1a0c296532
Merge pull request #1426 from ehuss/search-mark-words
Fix search highlighting with multiple words.
2021-01-14 17:01:52 -08:00
Eric Huss 9b4ab72a80
Merge pull request #1418 from ehuss/relative-renderer-command
Fix relative paths for renderer commands.
2021-01-14 17:01:41 -08:00
Eric Huss cdea0f6b61 Add missing parenthesis in doc comment. 2021-01-13 14:26:14 -08:00