Commit Graph

1133 Commits

Author SHA1 Message Date
Eric Huss d8f171a996 Apply clippy::manual_while_let_some 2023-05-13 09:50:32 -07:00
Eric Huss 0ef3bb1cc6 Apply clippy::needless_borrowed_reference 2023-05-13 09:46:30 -07:00
Eric Huss 54df8234ed Apply clippy::let_unit_value 2023-05-13 09:45:46 -07:00
Eric Huss dc08e37320 Apply clippy::borrow_deref_ref 2023-05-13 09:44:50 -07:00
Eric Huss 45a8575b95 Apply clippy::needless_borrow 2023-05-13 09:44:11 -07:00
Eric Huss f4507aeb9b
Merge pull request #2080 from t2y/fix-copy-fonts-message
Fix handling of copy-fonts=true when fonts.css is overridden
2023-05-13 09:19:06 -07:00
Eric Huss 01047846a9 Don't copy the stock fonts if the user has overridden fonts.css.
This wasn't behaving as I was really intending.
2023-05-13 09:05:25 -07:00
Eric Huss 75a6d65e5a Don't warn on copy-fonts=true (the default) when fonts.css is overridden. 2023-05-13 08:51:04 -07:00
Eric Huss af036d9f45
Merge pull request #2057 from seanpoulter/init-skip
fix(cli): init --force skips confirmation prompts
2023-04-30 14:18:30 -07:00
Tetsuya Morimoto 04016f3be6 Refactor the warning message related to copy_fonts so that a user simply configures it 2023-04-28 12:46:49 +09:00
Eric Huss 35fdd00203 Switch from gitignore to ignore 2023-04-22 12:53:54 -07:00
Sean Poulter bffdb0b03d fix(cli): init --force skips confirmation prompts 2023-04-03 03:05:24 -04:00
Andreas Deininger a2c88ae0f1 Convert links from http to https protocol 2023-04-02 21:35:08 +02:00
Eric Huss 4c59405e5c
Merge pull request #1986 from mgeisler/preprocessors-for-test
Run preprocessors in `mdbook test`
2023-03-04 14:55:10 -08:00
Eric Huss 703a215ef8
Merge pull request #2039 from Skwodo/master
Change overflow-x hidden to clip
2023-03-04 14:05:01 -08:00
Skwodo f5f96bc4f4 change overflow-x hidden to clip 2023-03-02 21:01:38 +01:00
Eric Huss c15220d1a1
Merge pull request #2017 from thanatos/roy/fix-sidebar
Default the sidebar to visible in large screens
2023-02-13 12:42:15 -08:00
Eric Huss 1517435441
Merge pull request #2021 from rust-lang/revert-2009-deps/toml
Revert "bump 'toml' dependency"
2023-02-13 07:44:45 -08:00
Eric Huss 90fbe112af
Revert "bump 'toml' dependency" 2023-02-13 07:31:33 -08:00
Martin Geisler c150529c7c
Remove spammy `debug!` log from `path_to_root`
The log statement is empty and simply fills up the logs when you run `mdbook` with `RUST_LOG=debug`.
2023-02-13 16:17:31 +01:00
Roy Wellington Ⅳ fa6aa2ced8 Default the sidebar to visible in large screens
The code here leads me to believe that the intention is for the sidebar
to be default visible on large screens (where `clientWidth` > 1080) and
hidden otherwise.

However, as previously written, if the `localStorage.getItem` call fails
(for example, if the user agent is not accepting cookies), then we fall
back to `sidebar = sidebar || 'visible';` — but `sidebar` is already set
to `hidden`, so the `|| 'visible'` never happens.

This results in the sidebar hiding itself on every navigation through an
mdBook, meaning if you're just switching between sections trying to find
something that you keep needing to re-open the sidebar.
2023-02-11 18:04:58 -05:00
Eric Huss 2c710d3b7d
Merge pull request #1987 from ehuss/theme-fonts
Make fonts part of the theme.
2023-02-08 15:56:40 -08:00
Eric Huss e352e4f59c
Merge pull request #1994 from Skwodo/master
fix overflow-x on mobile
2023-02-08 15:37:53 -08:00
Eric Huss 734936d819 Add some comments about overflow-x 2023-02-08 15:25:14 -08:00
Daniel Eades 2160613c6a bump 'toml' dependency 2023-02-08 15:40:15 +00:00
Skwodo ca46086e79 fix overflow-x on mobile 2023-01-21 22:41:01 +01:00
Noritada Kobayashi dcc9efea0a Remove the WebKit-specific scrollbar styling altogether
It is preferable to remove WebKit-specific styling and use the browser
and OS default scrollbars.
Thanks to comments from @julianfortune, @arniu, and @ehuss.

Closes #1483.
2023-01-18 23:51:09 +09:00
Eric Huss c2d973997a Make fonts part of the theme. 2023-01-15 11:42:46 -08:00
Martin Geisler b09aa0e65c Run preprocessors in `mdbook test`
While adding support for translations[1] to Comprehensive Rust 🦀, I
noticed that `mdbook test` doesn’t execute preprocessors the same way
as `mdbook build`.

This PR makes the two commands use the same code to find and execute
preprocessors.

[1]: https://github.com/google/comprehensive-rust/pull/130
2023-01-15 11:44:46 +01:00
Noritada Kobayashi 1ba2c063e0 Thin scrollbars in Chrome and Safari to make them less assertive (#1483) 2022-12-22 15:40:03 +09:00
Eric Huss fcf0cebf6c Fix test with multiple library paths 2022-12-17 07:11:13 -08:00
David 87a381e0a7 upgrade clap to 4.0 2022-12-14 17:11:08 -08:00
Eric Huss 21ab85cd03 Update notify
Update notify from 4.0.17 to 5.0.0
https://github.com/notify-rs/notify/blob/main/UPGRADING_V4_TO_V5.md
https://github.com/notify-rs/notify/blob/main/CHANGELOG.md#notify-500-2022-08-28
2022-12-14 14:01:27 -08:00
armandocumate cf1557e454 update for hidden only on clipboard 2022-12-14 06:54:45 -08:00
LePichu e3c484af01 fix: random ref in 2022-12-06 12:05:11 +05:30
Eric Huss 8a02fc755f Fix broken doc link 2022-11-28 09:53:47 -08:00
Eric Huss f32bd6f945 Show the currently selected theme. 2022-11-21 15:27:39 -08:00
Eric Huss f64fcbc07d Fix clipping in theme popup 2022-11-21 14:00:18 -08:00
Eric Huss d45f02d38c
Merge pull request #1924 from averms-forks/html-conformance
Better HTML5 conformance
2022-11-13 13:29:18 -08:00
Eric Huss 666975a1ef
Merge pull request #1884 from willcrichton/master
Add support for watching additional directories
2022-11-13 12:53:19 -08:00
Will Crichton 8b486dfc71 Fix compilation failure 2022-11-12 14:23:05 -08:00
Aman Verma db092a404e State canonical URL using <link> not <meta>.
The Google SEO docs describe using the link element to specify the canonical
page in a redirect. They don't mention anything about <meta>.
2022-11-12 14:54:28 -06:00
Aman Verma edda3d1b51 Fix formatting of content attr in <meta http-equiv=refresh>
According to the HTML specification[1], there needs to be a space after the
semicolon and the URL must be unquoted.

[1]: https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-refresh
2022-11-12 14:47:21 -06:00
Aman Verma 27a11e7b35 Don't generate obsolete charset attrs in <script>.
According to the HTML specification[1], the charset attribute is obsolete in
script elements.

[1]: https://html.spec.whatwg.org/multipage/obsolete.html#HTMLScriptElement-partial
2022-11-12 14:45:09 -06:00
Aman Verma cfd4c93d88 Don't generate redundant <meta http-equiv=content-type>.
Quoting from the HTML specification[1]:

  A document must not contain both a meta element with an http-equiv attribute
  in the Encoding declaration state and a meta element with the charset
  attribute present.

So we remove the <meta> with the http-equiv attribute from our template.

[1]: https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-content-type
2022-11-12 14:27:52 -06:00
Will Crichton 852a882fab Improve error handling of extra-watch-dirs watching, fix not watching whitelisted files outside book root 2022-11-07 12:20:59 -08:00
Will Crichton fb0cbc90e3 Add support for watching additional directories 2022-10-28 11:47:33 -07:00
armandocumate 3fc036e01a fi xcopying invisible text 2022-10-14 16:53:59 -07:00
Brett Chalupa 79c159d123 Add styles for <kbd> elements
Allows for special styles to call them out since they're different than
normal text and different than code. They can make use of styles they
inherit for font style and weight.

Notes on changes:

- Added new CSS variables for reused elements
- The font-* rules are separate for each aspect so that they can inherit
  bold/italic/etc

Closes https://github.com/rust-lang/mdBook/issues/1813
2022-10-06 16:02:29 -04:00
Kian-Meng Ang cb01f11ad1 Fix typos
Found via `codespell -S ./src/theme -L crate,nam,varius,phasis`
2022-09-29 22:41:12 +08:00