Commit Graph

1739 Commits

Author SHA1 Message Date
Flavio Castelli 94e797fba0
mdbook book: show edit link
Add "edit" links to the pages of mdbook own book
2021-04-19 19:08:15 +02:00
Flavio Castelli c3beecc96a
Update docs to include example of edit links feature
Add a working example of the edit links feature to the examples
2021-04-19 19:07:37 +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
Eric Huss e6568a70eb
Merge pull request #1485 from Evian-Zhang/add-pagebreak
Add page-break
2021-03-17 09:45:30 -07: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 536873ca26
Merge pull request #1478 from camelid/patch-1
docs: Use inline code for regex
2021-03-01 08:15:20 -08:00
Camelid d6ea4e3f7a
docs: Use inline code for regex
And fix a typo.
2021-02-27 20:17:36 -08:00
mbartlett21 fcceee4761
Update examples with hidden lines (#1476)
* Update example.rs to have correct indent

The three hidden lines in example.rs now have four spaces indent for the hidden lines.

* Update mdbook.md
2021-02-27 02:40:14 +01:00
Eric Huss 3f39ba82f9
Merge pull request #1474 from ehuss/bump-version
Update to 0.4.7
2021-02-22 15:44:42 -08:00
Eric Huss 7da38715c1 Update to 0.4.7 2021-02-22 14:56:44 -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
Eric Huss fad3c663f4
Merge pull request #1461 from ehuss/guide-repo-link
Add git repository url link to user guide.
2021-02-22 14:50:05 -08:00
Eric Huss f8b9054265
Merge pull request #1470 from tim-seoss/light_theme_contrast_enhancement
Enhance text contrast of `light` theme to improve accessibility.
2021-02-22 14:49:07 -08:00
Fenhl f26116a491
Upgrade to shlex 1 (#1471) 2021-02-22 00:15:16 +01: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 2b5890e2ed Add git repository url link to user guide. 2021-02-12 07:34:20 -08:00
Eric Huss 0b9570b160
Merge pull request #1456 from danieleades/typo
fix small typos on 'syntax-highlighting' page
2021-01-30 09:09:37 -08:00
Daniel Eades 90396c5b76 fix small typos on 'syntax-highlighting' page 2021-01-30 08:11:45 +00:00
Eric Huss 24b76dd879
Fix sentence on installation page. 2021-01-15 07:50:06 -08:00
Eric Huss 9a9eb0124a
Merge pull request #1447 from ehuss/bump-version
Update to 0.4.6.
2021-01-14 17:36:08 -08:00
Eric Huss 257374d76b Update to 0.4.6. 2021-01-14 17:27:54 -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 b1c2e466e7
Merge pull request #1438 from pierwill/edit-docs
Add intra-docs links to docs
2021-01-13 14:26:44 -08:00
Eric Huss cdea0f6b61 Add missing parenthesis in doc comment. 2021-01-13 14:26:14 -08:00
pierwill e9b0be7090 Add intra-docs links to docs
Also fixes some punctuation and changes some wording.
2021-01-10 14:51:30 -08:00
Tatsuya Kawano d402a12e88 Skip HTML comments in the summary 2021-01-08 18:16:03 +08:00
Tatsuya Kawano 218e200117
Fix a wrong version 0.4.4 in Cargo.toml (Should be 0.4.5) (#1435) 2021-01-07 14:56:21 +01:00
Eric Huss 3d55375f61
Update theme CSS docs. (#1431) 2021-01-07 01:56:20 +01:00
Eric Huss 77e7cfd22b
Change `init --theme` to place theme in root. (#1432) 2021-01-07 01:29:38 +01:00
Eric Huss 76cd39e5e2
Merge pull request #1390 from sburris0/gitlabci
Guide: Add instructions for publishing via GitLab Pages
2021-01-06 13:11:58 -08:00
Eric Huss 09e7bb76dc
Remove mark from URL on escape. (#1427) 2021-01-05 19:31:16 +01:00
Eric Huss 28387130c0 Fix search highlighting with multiple words. 2021-01-04 14:20:36 -08:00
Eric Huss 33d3d9c3ec
Merge pull request #1389 from avitex/search-chapter-name
Add chapter name to search result breadcrumbs
2021-01-04 14:01:30 -08:00
Alexandru Macovei beec17e55d Add ability to generate shell completions via clap 2021-01-04 23:51:02 +02:00
Eric Huss e651f4d734
Merge pull request #1420 from apatniv/clippy_remove_clone
Clippy lint: Remove unnecessary clone
2021-01-04 11:33:37 -08:00
Eric Huss 87d2cd9845
Merge pull request #1421 from apatniv/clippy_use_single_char
clippy: use char instead of str
2021-01-04 11:31:06 -08:00
Pietro Albini 32abeef088 fix xss in the search page
Thanks to Kamil Vavra for responsibly disclosing the vulnerability
according to Rust's Security Policy.
2021-01-04 07:14:57 -08:00
Eric Huss 5de9b6841e Update changelog for 0.4.5 2021-01-04 07:13:30 -08:00
apatniv 95e0743bc0 clippy: use char instead of str 2020-12-31 15:37:34 -05:00
apatniv 3c97525743 Clippy lint: Remove unnecessary clone 2020-12-31 15:18:37 -05:00
Eric Huss 9a65c8ab92 Fix relative paths for renderer commands. 2020-12-30 17:46:29 -08:00