Commit Graph

1144 Commits

Author SHA1 Message Date
Eric Huss b423bf7ddd Update toml to 0.7.6 2023-07-16 12:48:01 -07:00
zica 9eba0f6ab2
Fix theme-color meta tag not syncing with the theme 2023-07-09 08:57:46 +08:00
Em Zhan 72b3227824 Fix flicker when setting sidebar scroll position
Previously, sidebar scroll was set in an external script which caused a
flicker as the sidebar is initially rendered without any scroll before
being scrolled to the desired location.

Switching to an inline script right after the HTML tags for the sidebar
seems to avoid the flicker in most cases. In addition, logic is added to
avoid scrolling jumps when navigating via links within the sidebar.
2023-06-21 19:25:21 -05:00
Em Zhan 1ef8d70ac4 Avoid menu border flash during page navigation
Partially addresses #443
2023-06-17 21:42:54 -05:00
Eric Huss c9cfe22fd6 Apply some code style changes. 2023-05-28 14:04:58 -07:00
Jannik Obermann 7df1d8c838 Support hidden lines in languages other than Rust
Co-Authored-By: thecodewarrior <5467669+thecodewarrior@users.noreply.github.com>
2023-05-28 14:04:54 -07:00
Eric Huss 1db52ff531 Fix search for custom heading attributes 2023-05-28 12:03:03 -07:00
Eric Huss 34e5ef22a0 Don't include empty class attribute. 2023-05-28 11:33:00 -07:00
ImUrX c8a5adcee9 fix more mistakes 2023-05-28 10:47:14 -07:00
ImUrX ecdb411711 fix mistakes 2023-05-28 10:47:14 -07:00
ImUrX a4e206168d Add working heading extension 2023-05-28 10:47:13 -07:00
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