Skip to content

Commit 898578e

Browse files
authored
Merge branch 'master' into patch-2
2 parents c538432 + dc21f14 commit 898578e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2220
-934
lines changed

.github/workflows/deploy.yml

+22-7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ on:
33
release:
44
types: [created]
55

6+
defaults:
7+
run:
8+
shell: bash
9+
10+
permissions:
11+
contents: write
12+
613
jobs:
714
release:
815
name: Deploy Release
@@ -28,17 +35,14 @@ jobs:
2835
os: windows-latest
2936
steps:
3037
- uses: actions/checkout@master
31-
- name: Install hub
32-
run: ci/install-hub.sh ${{ matrix.os }}
33-
shell: bash
3438
- name: Install Rust
3539
run: ci/install-rust.sh stable ${{ matrix.target }}
36-
shell: bash
37-
- name: Build and deploy artifacts
40+
- name: Build asset
41+
run: ci/make-release-asset.sh ${{ matrix.os }} ${{ matrix.target }}
42+
- name: Update release with new asset
3843
env:
3944
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40-
run: ci/make-release.sh ${{ matrix.os }} ${{ matrix.target }}
41-
shell: bash
45+
run: gh release upload $MDBOOK_TAG $MDBOOK_ASSET
4246
pages:
4347
name: GitHub Pages
4448
runs-on: ubuntu-latest
@@ -56,3 +60,14 @@ jobs:
5660
curl -LsSf https://raw.githubusercontent.com/rust-lang/simpleinfra/master/setup-deploy-keys/src/deploy.rs | rustc - -o /tmp/deploy
5761
cd guide/book
5862
/tmp/deploy
63+
publish:
64+
name: Publish to crates.io
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@master
68+
- name: Install Rust (rustup)
69+
run: rustup update stable --no-self-update && rustup default stable
70+
- name: Publish
71+
env:
72+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
73+
run: cargo publish --no-verify

.github/workflows/main.yml

+19-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
name: CI
22
on:
3-
# Only run when merging to master, or open/synchronize/reopen a PR.
4-
push:
5-
branches:
6-
- master
73
pull_request:
4+
merge_group:
85

96
jobs:
107
test:
@@ -32,7 +29,7 @@ jobs:
3229
- build: msrv
3330
os: ubuntu-20.04
3431
# sync MSRV with docs: guide/src/guide/installation.md and Cargo.toml
35-
rust: 1.63.0
32+
rust: 1.66.0
3633
steps:
3734
- uses: actions/checkout@v3
3835
- name: Install Rust
@@ -50,3 +47,20 @@ jobs:
5047
- name: Install Rust
5148
run: rustup update stable && rustup default stable && rustup component add rustfmt
5249
- run: cargo fmt --check
50+
51+
# The success job is here to consolidate the total success/failure state of
52+
# all other jobs. This job is then included in the GitHub branch protection
53+
# rule which prevents merges unless all other jobs are passing. This makes
54+
# it easier to manage the list of jobs via this yml file and to prevent
55+
# accidentally adding new jobs without also updating the branch protections.
56+
success:
57+
name: Success gate
58+
if: always()
59+
needs:
60+
- test
61+
- rustfmt
62+
runs-on: ubuntu-latest
63+
steps:
64+
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
65+
- name: Done
66+
run: exit 0

CHANGELOG.md

+104-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,108 @@
11
# Changelog
22

3+
## mdBook 0.4.35
4+
[v0.4.34...v0.4.35](https://github.com/rust-lang/mdBook/compare/v0.4.34...v0.4.35)
5+
6+
### Added
7+
- Added the `book.text-direction` setting for explicit support for right-to-left languages.
8+
[#1641](https://github.com/rust-lang/mdBook/pull/1641)
9+
- Added `rel=prefetch` to the "next" links to potentially improve browser performance.
10+
[#2168](https://github.com/rust-lang/mdBook/pull/2168)
11+
- Added a `.warning` CSS class which is styled for displaying warning blocks.
12+
[#2187](https://github.com/rust-lang/mdBook/pull/2187)
13+
14+
### Changed
15+
- Better support of the sidebar when JavaScript is disabled.
16+
[#2175](https://github.com/rust-lang/mdBook/pull/2175)
17+
18+
## mdBook 0.4.34
19+
[v0.4.33...v0.4.34](https://github.com/rust-lang/mdBook/compare/v0.4.33...v0.4.34)
20+
21+
### Fixed
22+
- Fixed file change watcher failing on macOS with a large number of files.
23+
[#2157](https://github.com/rust-lang/mdBook/pull/2157)
24+
25+
## mdBook 0.4.33
26+
[v0.4.32...v0.4.33](https://github.com/rust-lang/mdBook/compare/v0.4.32...v0.4.33)
27+
28+
### Added
29+
- The `color-scheme` CSS property is now set based on the light/dark theme, which applies some slight color differences in browser elements like scroll bars on some browsers.
30+
[#2134](https://github.com/rust-lang/mdBook/pull/2134)
31+
32+
### Fixed
33+
- Fixed watching of extra-watch-dirs when not running in the book root directory.
34+
[#2146](https://github.com/rust-lang/mdBook/pull/2146)
35+
- Reverted the dependency update to the `toml` crate (again!). This was an unintentional breaking change in 0.4.32.
36+
[#2021](https://github.com/rust-lang/mdBook/pull/2021)
37+
- Changed macOS change notifications to use the kqueue implementation which should fix some issues with repeated rebuilds when a file changed.
38+
[#2152](https://github.com/rust-lang/mdBook/pull/2152)
39+
- Don't set a background color in the print page for code blocks in a header.
40+
[#2150](https://github.com/rust-lang/mdBook/pull/2150)
41+
42+
## mdBook 0.4.32
43+
[v0.4.31...v0.4.32](https://github.com/rust-lang/mdBook/compare/v0.4.31...v0.4.32)
44+
45+
### Fixed
46+
- Fixed theme-color meta tag not syncing with the theme.
47+
[#2118](https://github.com/rust-lang/mdBook/pull/2118)
48+
49+
### Changed
50+
- Updated all dependencies.
51+
[#2121](https://github.com/rust-lang/mdBook/pull/2121)
52+
[#2122](https://github.com/rust-lang/mdBook/pull/2122)
53+
[#2123](https://github.com/rust-lang/mdBook/pull/2123)
54+
[#2124](https://github.com/rust-lang/mdBook/pull/2124)
55+
[#2125](https://github.com/rust-lang/mdBook/pull/2125)
56+
[#2126](https://github.com/rust-lang/mdBook/pull/2126)
57+
58+
## mdBook 0.4.31
59+
[v0.4.30...v0.4.31](https://github.com/rust-lang/mdBook/compare/v0.4.30...v0.4.31)
60+
61+
### Fixed
62+
- Fixed menu border render flash during page navigation.
63+
[#2101](https://github.com/rust-lang/mdBook/pull/2101)
64+
- Fixed flicker setting sidebar scroll position.
65+
[#2104](https://github.com/rust-lang/mdBook/pull/2104)
66+
- Fixed compile error with proc-macro2 on latest Rust nightly.
67+
[#2109](https://github.com/rust-lang/mdBook/pull/2109)
68+
69+
## mdBook 0.4.30
70+
[v0.4.29...v0.4.30](https://github.com/rust-lang/mdBook/compare/v0.4.29...v0.4.30)
71+
72+
### Added
73+
- Added support for heading attributes.
74+
Attributes are specified in curly braces just after the heading text.
75+
An HTML ID can be specified with `#` and classes with `.`.
76+
For example: `## My heading {#custom-id .class1 .class2}`
77+
[#2013](https://github.com/rust-lang/mdBook/pull/2013)
78+
- Added support for hidden code lines for languages other than Rust.
79+
The `output.html.code.hidelines` table allows you to define the prefix character that will be used to hide code lines based on the language.
80+
[#2093](https://github.com/rust-lang/mdBook/pull/2093)
81+
82+
### Fixed
83+
- Fixed a few minor markdown rendering issues.
84+
[#2092](https://github.com/rust-lang/mdBook/pull/2092)
85+
86+
## mdBook 0.4.29
87+
[v0.4.28...v0.4.29](https://github.com/rust-lang/mdBook/compare/v0.4.28...v0.4.29)
88+
89+
### Changed
90+
- Built-in fonts are no longer copied when `fonts/fonts.css` is overridden in the theme directory.
91+
Additionally, the warning about `copy-fonts` has been removed if `fonts/fonts.css` is specified.
92+
[#2080](https://github.com/rust-lang/mdBook/pull/2080)
93+
- `mdbook init --force` now skips all interactive prompts as intended.
94+
[#2057](https://github.com/rust-lang/mdBook/pull/2057)
95+
- Updated dependencies
96+
[#2063](https://github.com/rust-lang/mdBook/pull/2063)
97+
[#2086](https://github.com/rust-lang/mdBook/pull/2086)
98+
[#2082](https://github.com/rust-lang/mdBook/pull/2082)
99+
[#2084](https://github.com/rust-lang/mdBook/pull/2084)
100+
[#2085](https://github.com/rust-lang/mdBook/pull/2085)
101+
102+
### Fixed
103+
- Switched from the `gitignore` library to `ignore`. This should bring some improvements with gitignore handling.
104+
[#2076](https://github.com/rust-lang/mdBook/pull/2076)
105+
3106
## mdBook 0.4.28
4107
[v0.4.27...v0.4.28](https://github.com/rust-lang/mdBook/compare/v0.4.27...v0.4.28)
5108

@@ -176,7 +279,7 @@
176279
[#1771](https://github.com/rust-lang/mdBook/pull/1771)
177280
- The 404 not-found page now includes the books title in the HTML title tag.
178281
[#1693](https://github.com/rust-lang/mdBook/pull/1693)
179-
- Migrated to clap 3.0 which which handles CLI option parsing.
282+
- Migrated to clap 3.0 which handles CLI option parsing.
180283
[#1731](https://github.com/rust-lang/mdBook/pull/1731)
181284

182285
### Fixed

CONTRIBUTING.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,28 @@ The following are instructions for updating [highlight.js](https://highlightjs.o
148148
1. Clone the repository at <https://github.com/highlightjs/highlight.js>
149149
1. Check out a tagged release (like `10.1.1`).
150150
1. Run `npm install`
151-
1. Run `node tools/build.js :common apache armasm coffeescript d handlebars haskell http julia nginx properties r scala x86asm yaml`
151+
1. Run `node tools/build.js :common apache armasm coffeescript d handlebars haskell http julia nginx nim properties r scala x86asm yaml`
152152
1. Compare the language list that it spits out to the one in [`syntax-highlighting.md`](https://github.com/camelid/mdBook/blob/master/guide/src/format/theme/syntax-highlighting.md). If any are missing, add them to the list and rebuild (and update these docs). If any are added to the common set, add them to `syntax-highlighting.md`.
153153
1. Copy `build/highlight.min.js` to mdbook's directory [`highlight.js`](https://github.com/rust-lang/mdBook/blob/master/src/theme/highlight.js).
154154
1. Be sure to check the highlight.js [CHANGES](https://github.com/highlightjs/highlight.js/blob/main/CHANGES.md) for any breaking changes. Breaking changes that would affect users will need to wait until the next major release.
155155
1. Build mdbook with the new file and build some books with the new version and compare the output with a variety of languages to see if anything changes. The [test_book](https://github.com/rust-lang/mdBook/tree/master/test_book) contains a chapter with many languages to examine.
156+
157+
## Publishing new releases
158+
159+
Instructions for mdBook maintainers to publish a new release:
160+
161+
1. Create a PR to update the version and update the CHANGELOG:
162+
1. Update the version in `Cargo.toml`
163+
2. Run `cargo test` to verify that everything is passing, and to update `Cargo.lock`.
164+
3. Double-check for any SemVer breaking changes.
165+
Try [`cargo-semver-checks`](https://crates.io/crates/cargo-semver-checks), though beware that the current version of mdBook isn't properly adhering to SemVer due to the lack of `#[non_exhaustive]` and other issues. See https://github.com/rust-lang/mdBook/issues/1835.
166+
4. Update `CHANGELOG.md` with any changes that users may be interested in.
167+
5. Update `continuous-integration.md` to update the version number for the installation instructions.
168+
6. Commit the changes, and open a PR.
169+
2. After the PR has been merged, create a release in GitHub. This can either be done in the GitHub web UI, or on the command-line:
170+
```bash
171+
MDBOOK_VERS="`cargo read-manifest | jq -r .version`" ; \
172+
gh release create -R rust-lang/mdbook v$MDBOOK_VERS \
173+
--title v$MDBOOK_VERS \
174+
--notes "See https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-${MDBOOK_VERS//.} for a complete list of changes."
175+
```

0 commit comments

Comments
 (0)