toolkit for mdBook [mirror of my GitHub repo] docs.tonywu.dev/mdbookkit/
permalinks rust-analyzer mdbook
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: update workflows

Tony Wu 0e30863d c857a192

+65 -82
+16 -9
.github/workflows/bin.yml
··· 57 57 timeout-minutes: 60 58 58 59 59 steps: 60 + - name: Which package? 61 + run: | 62 + case "${{ github.event.release.tag_name }}" in 63 + mdbook-rustdoc-links*) 64 + echo "mdbook-rustdoc-links=true" >> "$GITHUB_OUTPUT" 65 + ;; 66 + mdbook-permalinks*) 67 + echo "mdbook-permalinks=true" >> "$GITHUB_OUTPUT" 68 + ;; 69 + esac 70 + id: bins 71 + 60 72 - uses: actions/checkout@v4 61 73 - uses: dtolnay/rust-toolchain@stable 74 + id: rustup 62 75 63 76 - uses: taiki-e/setup-cross-toolchain-action@v1 64 77 with: 65 78 target: ${{ matrix.target }} 66 79 if: runner.os == 'Linux' 67 80 68 - - name: Get Cargo version 69 - run: echo "cargo-version=$(cargo --version)" >> "$GITHUB_OUTPUT" 70 - shell: bash 71 - id: cargo-version 72 - 73 81 - uses: tonywu6/cache-hit-please@v1.1.0 74 82 id: cache 75 83 env: ··· 78 86 deps: | 79 87 ${{runner.os}} 80 88 ${{runner.arch}} 81 - ${{steps.cargo-version.outputs.cargo-version}} 89 + ${{steps.rustup.outputs.cachekey}} 82 90 ${{hashFiles('**/Cargo.toml')}} 83 91 ${{hashFiles('**/Cargo.lock')}} 84 - ${{hashFiles('**/package.json')}} 85 - ${{hashFiles('**/pnpm-lock.yaml')}} 86 92 ${{github.workflow}} 87 93 ${{github.run_id}} 88 94 path: | 89 95 .bin/ 90 96 target/ 91 - node_modules/ 92 97 93 98 - name: Build mdbook-rustdoc-links 94 99 uses: taiki-e/upload-rust-binary-action@v1 ··· 101 106 codesign: "-" 102 107 token: ${{ secrets.GITHUB_TOKEN }} 103 108 dry-run: ${{ github.event_name != 'release' }} 109 + if: ${{ github.event_name != 'release' || steps.bins.outputs.mdbook-rustdoc-links }} 104 110 105 111 - name: Build mdbook-permalinks 106 112 uses: taiki-e/upload-rust-binary-action@v1 ··· 113 119 codesign: "-" 114 120 token: ${{ secrets.GITHUB_TOKEN }} 115 121 dry-run: ${{ github.event_name != 'release' }} 122 + if: ${{ github.event_name != 'release' || steps.bins.outputs.mdbook-permalinks }} 116 123 117 124 - uses: actions/upload-artifact@v4 118 125 with:
+2 -9
.github/workflows/ci.yml
··· 62 62 with: 63 63 toolchain: stable 64 64 components: rust-src # speeds up rust-analyzer indexing 65 + id: rustup 65 66 66 67 - uses: cargo-bins/cargo-binstall@b9bf4400702f721d469eec4d280125f650c85638 67 - 68 - - name: Get Cargo version 69 - run: echo "cargo-version=$(cargo --version)" >> "$GITHUB_OUTPUT" 70 - shell: bash 71 - id: cargo-version 72 68 73 69 - uses: tonywu6/cache-hit-please@v1.1.0 74 70 id: cache ··· 78 74 deps: | 79 75 ${{runner.os}} 80 76 ${{runner.arch}} 81 - ${{steps.cargo-version.outputs.cargo-version}} 77 + ${{steps.rustup.outputs.cachekey}} 82 78 ${{hashFiles('**/Cargo.toml')}} 83 79 ${{hashFiles('**/Cargo.lock')}} 84 - ${{hashFiles('**/package.json')}} 85 - ${{hashFiles('**/pnpm-lock.yaml')}} 86 80 ${{github.workflow}} 87 81 ${{github.run_id}} 88 82 path: | 89 83 .bin/ 90 84 target/ 91 - node_modules/ 92 85 93 86 - name: Prepare binaries 94 87 run: |
+41 -12
.github/workflows/docs.yml
··· 28 28 fetch-tags: true 29 29 30 30 - uses: dtolnay/rust-toolchain@stable 31 + with: 32 + components: rust-src # speeds up rust-analyzer indexing 33 + id: rustup 31 34 - uses: cargo-bins/cargo-binstall@b9bf4400702f721d469eec4d280125f650c85638 32 - - uses: actions/setup-node@v6 33 - with: 34 - node-version: 24 35 35 - uses: pnpm/action-setup@v4 36 36 with: 37 37 version: 10 38 - 39 - - name: Get Cargo version 40 - run: echo "cargo-version=$(cargo --version)" >> "$GITHUB_OUTPUT" 41 - shell: bash 42 - id: cargo-version 38 + - uses: actions/setup-node@v6 39 + with: 40 + node-version: 24 41 + cache: pnpm 43 42 44 43 - uses: tonywu6/cache-hit-please@v1.1.0 45 44 id: cache ··· 49 48 deps: | 50 49 ${{runner.os}} 51 50 ${{runner.arch}} 52 - ${{steps.cargo-version.outputs.cargo-version}} 51 + ${{steps.rustup.outputs.cachekey}} 53 52 ${{hashFiles('**/Cargo.toml')}} 54 53 ${{hashFiles('**/Cargo.lock')}} 55 54 ${{hashFiles('**/package.json')}} ··· 59 58 path: | 60 59 .bin/ 61 60 target/ 61 + 62 + - uses: tonywu6/cache-hit-please@v1.1.0 63 + id: cache2 64 + env: 65 + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} 66 + with: 67 + deps: | 68 + ${{runner.os}} 69 + ${{runner.arch}} 70 + ${{hashFiles('**/package.json')}} 71 + ${{hashFiles('**/pnpm-lock.yaml')}} 72 + ${{github.workflow}} 73 + ${{github.run_id}} 74 + path: | 75 + .pnpm-store/ 62 76 node_modules/ 63 77 64 78 - run: pnpm install ··· 67 81 68 82 - run: cargo bin mdbook build 69 83 working-directory: docs 70 - 71 84 - run: cargo run -- postprocess 72 85 working-directory: docs 73 86 74 - - uses: actions/upload-pages-artifact@v3 87 + # - uses: actions/upload-artifact@v4 88 + # with: 89 + # path: docs/dist 90 + # retention-days: 1 91 + # if-no-files-found: warn 92 + 93 + - uses: cloudflare/wrangler-action@v3 94 + name: wrangler versions upload 75 95 with: 76 - path: docs/dist 96 + command: versions upload --cwd docs 97 + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} 98 + if: ${{ github.event_name == 'workflow_dispatch' }} 99 + 100 + - uses: cloudflare/wrangler-action@v3 101 + name: wrangler deploy 102 + with: 103 + command: deploy --cwd docs 104 + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} 105 + if: ${{ github.event_name == 'release' }}
-50
TODO.md
··· 1 - - [x] mdbookkit install compat 2 - - [x] lib.rs docstring 3 - 4 - - [x] package readme 5 - - [x] permalinks 6 - - [x] rustdoc-links 7 - - [x] mdbookkit 8 - - [x] link check 9 - 10 - - [x] images 11 - - [x] permalinks 12 - - [x] rustdoc-links 13 - - [x] mdbookkit 14 - 15 - - [x] package metadata 16 - - [x] permalinks 17 - - [x] rustdoc-links 18 - - [x] mdbookkit 19 - 20 - - [x] preprocess 21 - - [x] ra-version 22 - - [x] describe 23 - 24 - - [x] postprocess 25 - - [x] anchors 26 - - [x] external links 27 - - [x] socials 28 - 29 - - [x] upgrade deps 30 - - [x] msrv 31 - - [x] mdbook v0.4 warnings 32 - 33 - - [ ] CI 34 - - [x] changelog 35 - - [x] release-plz template 36 - - [x] binstall 37 - 38 - - [ ] cloudflare 39 - - [x] URLs 40 - - [x] socials 41 - - [x] cache-control 42 - - [x] .html compat 43 - 44 - - [ ] versions 45 - - [x] changelog 46 - 47 - - [ ] tokens 48 - - [ ] GitHub 49 - - [ ] crates.io 50 - - [ ] Cloudflare
+2 -2
docs/book.toml
··· 32 32 [preprocessor.rustdoc-links] 33 33 after = ["links"] 34 34 cache-dir = "build" 35 - command = "cargo run --package mdbook-rustdoc-links" 35 + command = "cargo run --package mdbook-rustdoc-links --all-features" 36 36 manifest-dir = "." 37 37 rust-analyzer = "cargo run --package util-rust-analyzer -- analyzer" 38 38 ··· 40 40 after = ["rustdoc-links"] 41 41 always-link = [".rs"] 42 42 book-url = "https://docs.tonywu.dev/mdbookkit/" 43 - command = "cargo run --package mdbook-permalinks" 43 + command = "cargo run --package mdbook-permalinks --all-features" 44 44 45 45 [preprocessor.app] 46 46 command = "node scripts/preprocessor.ts"
+4
pnpm-workspace.yaml
··· 1 + onlyBuiltDependencies: 2 + - esbuild 3 + - workerd 4 + - sharp # miniflare