├── .editorconfig ├── .github └── workflows │ ├── build.yml │ ├── release.yml │ └── website.yml ├── .gitignore ├── .release-please-manifest.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── assets ├── catwalk.webp ├── frappe.webp ├── latte.webp ├── macchiato.webp └── mocha.webp ├── example ├── .gitignore ├── book.toml ├── src │ ├── SUMMARY.md │ ├── admonish.md │ ├── alerts.md │ ├── landing.md │ └── secret.md └── theme │ ├── catppuccin-admonish.css │ ├── catppuccin-alerts.css │ ├── catppuccin.css │ ├── index.hbs │ └── mdbook-admonish.css ├── package.json ├── pnpm-lock.yaml ├── release-please-config.json ├── renovate.json └── src ├── catppuccin-admonish.scss ├── catppuccin-alerts.scss └── catppuccin.scss /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # EditorConfig is awesome: https://EditorConfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | charset = utf-8 9 | indent_size = 2 10 | indent_style = space 11 | end_of_line = lf 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | 15 | # go 16 | [*.go] 17 | indent_style = tab 18 | indent_size = 4 19 | 20 | # python 21 | [*.{ini,py,py.tpl,rst}] 22 | indent_size = 4 23 | 24 | # rust 25 | [*.rs] 26 | indent_size = 4 27 | 28 | # documentation, utils 29 | [*.{md,mdx,diff}] 30 | trim_trailing_whitespace = false 31 | 32 | # windows shell scripts 33 | [*.{cmd,bat,ps1}] 34 | end_of_line = crlf 35 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: build 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: ["main"] 7 | pull_request: 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Checkout Repository 14 | uses: actions/checkout@v4 15 | - name: Setup PNPM 16 | uses: pnpm/action-setup@v4 17 | - name: Setup Node 18 | uses: actions/setup-node@v4 19 | with: 20 | node-version: "lts/*" 21 | cache: "pnpm" 22 | - name: Install dependencies 23 | run: pnpm install 24 | - name: Build 25 | run: pnpm build 26 | - name: Upload CSS 27 | uses: actions/upload-artifact@v4 28 | with: 29 | name: "catppuccin-mdbook-css-files" 30 | path: dist/ 31 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: release 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: 7 | - main 8 | 9 | permissions: 10 | contents: write 11 | pull-requests: write 12 | 13 | jobs: 14 | release-please: 15 | runs-on: ubuntu-latest 16 | outputs: 17 | release_created: ${{ steps.release.outputs.release_created }} 18 | tag_name: ${{ steps.release.outputs.tag_name }} 19 | steps: 20 | - uses: googleapis/release-please-action@v4 21 | id: release 22 | 23 | build: 24 | needs: ["release-please"] 25 | if: needs.release-please.outputs.release_created 26 | runs-on: ubuntu-latest 27 | steps: 28 | - name: Checkout Repository 29 | uses: actions/checkout@v4 30 | - name: Setup PNPM 31 | uses: pnpm/action-setup@v4 32 | - name: Setup Node 33 | uses: actions/setup-node@v4 34 | with: 35 | node-version: "lts/*" 36 | cache: "pnpm" 37 | - name: Install dependencies 38 | run: pnpm install 39 | - name: Build 40 | run: pnpm build 41 | - name: Upload Artifacts to Release 42 | run: gh release upload ${{ needs.release-please.outputs.tag_name }} dist/*.css 43 | env: 44 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 45 | -------------------------------------------------------------------------------- /.github/workflows/website.yml: -------------------------------------------------------------------------------- 1 | name: website 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: ["main"] 7 | 8 | jobs: 9 | website: 10 | runs-on: ubuntu-latest 11 | permissions: 12 | id-token: write 13 | pages: write 14 | environment: 15 | name: github-pages 16 | url: ${{ steps.deploy.outputs.page_url }} 17 | steps: 18 | - name: Checkout repository 19 | uses: actions/checkout@v4 20 | - name: Setup mdBook 21 | uses: peaceiris/actions-mdbook@v2 22 | with: 23 | mdbook-version: "0.4.47" 24 | - name: Download mdbook-admonish 25 | run: | 26 | mkdir ${{ env.TARGET }} 27 | curl -sSL https://github.com/tommilligan/mdbook-admonish/releases/download/${{ env.VERSION }}/${{ env.TARGET }}.tar.gz | tar -xz --directory=${{ env.TARGET }} 28 | echo `pwd`/${{ env.TARGET }} >> $GITHUB_PATH 29 | env: 30 | VERSION: "v1.19.0" 31 | TARGET: "mdbook-admonish-v1.19.0-x86_64-unknown-linux-gnu" 32 | - name: Download mdbook-alerts 33 | run: | 34 | mkdir ${{ env.TARGET }} 35 | curl -sSLo ${{ env.TARGET }}/${{ env.BINARY }} https://github.com/lambdalisue/rs-mdbook-alerts/releases/download/${{ env.VERSION }}/${{ env.TARGET }} 36 | chmod +x ${{ env.TARGET }}/${{ env.BINARY }} 37 | echo `pwd`/${{ env.TARGET }} >> $GITHUB_PATH 38 | env: 39 | VERSION: "v0.6.9" 40 | BINARY: "mdbook-alerts" 41 | TARGET: "mdbook-alerts-x86_64-unknown-linux-gnu" 42 | - name: Setup PNPM 43 | uses: pnpm/action-setup@v4 44 | - name: Setup Node 45 | uses: actions/setup-node@v4 46 | with: 47 | node-version: "lts/*" 48 | cache: "pnpm" 49 | - name: Install dependencies 50 | run: pnpm install 51 | - name: Build 52 | run: pnpm build 53 | - name: Build mdBook 54 | run: | 55 | mdbook build 56 | working-directory: ./example 57 | - name: Upload artifact 58 | uses: actions/upload-pages-artifact@v3 59 | with: 60 | path: "./example/book/" 61 | - name: Deploy artifact to GitHub Pages 62 | id: deploy 63 | uses: actions/deploy-pages@v4 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # node 2 | node_modules/ 3 | dist/ 4 | 5 | # ide 6 | .vscode 7 | .idea -------------------------------------------------------------------------------- /.release-please-manifest.json: -------------------------------------------------------------------------------- 1 | {".":"3.1.1"} 2 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # CHANGELOG 2 | 3 | ## [3.1.1](https://github.com/catppuccin/mdBook/compare/v3.1.0...v3.1.1) (2025-03-24) 4 | 5 | 6 | ### Bug Fixes 7 | 8 | * theme clipboard copy button ([#154](https://github.com/catppuccin/mdBook/issues/154)) ([92eb828](https://github.com/catppuccin/mdBook/commit/92eb82828fc7077ae4860fadd277e58134fbd602)) 9 | 10 | 11 | ### Build system & distribution 12 | 13 | * **example:** update mdbook & mdbook-admonish ([#156](https://github.com/catppuccin/mdBook/issues/156)) ([ce6d873](https://github.com/catppuccin/mdBook/commit/ce6d8737732fda8a1856874afe7abb81ba42e262)) 14 | 15 | ## [3.1.0](https://github.com/catppuccin/mdBook/compare/v3.0.3...v3.1.0) (2024-11-15) 16 | 17 | 18 | ### Features 19 | 20 | * add support for `lambdalisue/rs-mdbook-alerts` ([#135](https://github.com/catppuccin/mdBook/issues/135)) ([cd3ca47](https://github.com/catppuccin/mdBook/commit/cd3ca47e761df31288641a5134879b8e76af827f)) 21 | 22 | 23 | ### Bug Fixes 24 | 25 | * change inline codeblocks from `peach` to `text` ([45da623](https://github.com/catppuccin/mdBook/commit/45da62372ca500102ec542cebc39ec999f196ff2)) 26 | * increase contrast on icons hover ([#140](https://github.com/catppuccin/mdBook/issues/140)) ([7edf128](https://github.com/catppuccin/mdBook/commit/7edf128b50f9a256d3a0ec37defad3ff755369fa)) 27 | * preserve links as `blue` inside inline codeblocks ([45da623](https://github.com/catppuccin/mdBook/commit/45da62372ca500102ec542cebc39ec999f196ff2)) 28 | 29 | 30 | ### Code Refactoring 31 | 32 | * consistently use "flavor" and "color" spellings, update sass syntax ([#138](https://github.com/catppuccin/mdBook/issues/138)) ([fa0912e](https://github.com/catppuccin/mdBook/commit/fa0912e7eea8863278d566e33b2dd45d9625fd40)) 33 | * **website:** set default to `latte` ([#141](https://github.com/catppuccin/mdBook/issues/141)) ([e8a0135](https://github.com/catppuccin/mdBook/commit/e8a013513c882e390f2694f74cede5da76a5cf83)) 34 | 35 | ## [3.0.3](https://github.com/catppuccin/mdBook/compare/v3.0.2...v3.0.3) (2024-09-22) 36 | 37 | 38 | ### Bug Fixes 39 | 40 | * highlightjs syntax highlighting ([#119](https://github.com/catppuccin/mdBook/issues/119)) ([5a04755](https://github.com/catppuccin/mdBook/commit/5a04755004cf75aff86f911e684b915c9505f76f)) 41 | * properly theme `hr` element ([#122](https://github.com/catppuccin/mdBook/issues/122)) ([90d4392](https://github.com/catppuccin/mdBook/commit/90d4392a45244cde7f0c846c5c75cfa91e0349ea)) 42 | * reduce harshness of hover highlight ([ac84329](https://github.com/catppuccin/mdBook/commit/ac84329f1e251055f007a93cdff4caab732680fb)) 43 | * theme tooltip when copying from codeblock ([ac84329](https://github.com/catppuccin/mdBook/commit/ac84329f1e251055f007a93cdff4caab732680fb)) 44 | 45 | ## [3.0.2](https://github.com/catppuccin/mdBook/compare/v3.0.1...v3.0.2) (2024-09-22) 46 | 47 | 48 | ### Code Refactoring 49 | 50 | * add symlinks back ([0aad6a2](https://github.com/catppuccin/mdBook/commit/0aad6a2f148faf7f8d112a53c0529f8a80a4de80)) 51 | * **example:** remove symlinks to see if website ci passes ([291ceb7](https://github.com/catppuccin/mdBook/commit/291ceb76911b0656544c1e4b4e0cdf6322a52835)) 52 | * **example:** update mdbook-admonish & rework pages ci ([#116](https://github.com/catppuccin/mdBook/issues/116)) ([db0d22c](https://github.com/catppuccin/mdBook/commit/db0d22cc63d4d24cd23c6635de1ab55ef2f1d499)) 53 | * ignore css in example directory ([ccc7de7](https://github.com/catppuccin/mdBook/commit/ccc7de7d6c1fbb2a64da6d4cf516d30524b40afa)) 54 | * switch borders from `crust` to `surface0` ([#118](https://github.com/catppuccin/mdBook/issues/118)) ([c315046](https://github.com/catppuccin/mdBook/commit/c3150466e94cdd08e1bea5b92c18d0a7ecb84f28)) 55 | 56 | ## [3.0.1](https://github.com/catppuccin/mdBook/compare/v3.0.0...v3.0.1) (2024-09-22) 57 | 58 | 59 | ### Code Refactoring 60 | 61 | * remove all rust ([#114](https://github.com/catppuccin/mdBook/issues/114)) ([e1da91c](https://github.com/catppuccin/mdBook/commit/e1da91c95e99cf5642a4aff020865a8ffa7ca481)) 62 | 63 | ## [3.0.0](https://github.com/catppuccin/mdBook/compare/v2.2.0...v3.0.0) (2024-09-22) 64 | 65 | 66 | ### ⚠ BREAKING CHANGES 67 | 68 | * deprecate rust plugin & update sass files ([#112](https://github.com/catppuccin/mdBook/issues/112)) 69 | 70 | ### Features 71 | 72 | * deprecate rust plugin & update sass files ([#112](https://github.com/catppuccin/mdBook/issues/112)) ([f705cb5](https://github.com/catppuccin/mdBook/commit/f705cb5a0ca7932ea88480b1793b915f47b52146)) 73 | 74 | ## [2.2.0](https://github.com/catppuccin/mdBook/compare/v2.1.0...v2.2.0) (2024-08-15) 75 | 76 | 77 | ### Features 78 | 79 | * add deprecation notice ([#109](https://github.com/catppuccin/mdBook/issues/109)) ([d023fd5](https://github.com/catppuccin/mdBook/commit/d023fd52c6d31fe6236339afe1fd73d76d7f83e9)) 80 | 81 | 82 | ### Build system & distribution 83 | 84 | * don't make draft releases ([#110](https://github.com/catppuccin/mdBook/issues/110)) ([80fefcd](https://github.com/catppuccin/mdBook/commit/80fefcd3e51bf41ae1de3803e0963afb8d4b0b58)) 85 | * **nix:** fix darwin devShell ([#94](https://github.com/catppuccin/mdBook/issues/94)) ([218116e](https://github.com/catppuccin/mdBook/commit/218116e83688f2786af71eef5d11108f71950987)) 86 | 87 | ## [2.1.0](https://github.com/catppuccin/mdBook/compare/v2.0.1...v2.1.0) (2023-11-11) 88 | 89 | 90 | ### Features 91 | 92 | * **cli:** add shell completion ([a9a79c6](https://github.com/catppuccin/mdBook/commit/a9a79c6f5441f1f62ae4658d7d1aaf9f79b3b9d3)) 93 | * style `.warning` class ([#91](https://github.com/catppuccin/mdBook/issues/91)) ([ff9851d](https://github.com/catppuccin/mdBook/commit/ff9851d395934d8b5a084b7290d992b127169d51)) 94 | 95 | 96 | ### Build system & distribution 97 | 98 | * **cargo:** reduce build-time dependencies ([8e9ea6e](https://github.com/catppuccin/mdBook/commit/8e9ea6e2e9fd7b33fb62740eca4d7fb47aa3b38e)) 99 | * **cargo:** update/unpin clap and mdbook ([b209ae7](https://github.com/catppuccin/mdBook/commit/b209ae7ffa85e5cc3dba1dbf5e73b2560ad592c7)) 100 | * **distribution:** remove `linux-musl`, `win-gnu`, and `win32-msvc` ([170419d](https://github.com/catppuccin/mdBook/commit/170419dd6059a164b46ef60b85d9fc153603eb53)) 101 | * **nix:** add shell completions ([#89](https://github.com/catppuccin/mdBook/issues/89)) ([097a72a](https://github.com/catppuccin/mdBook/commit/097a72ab17272063772f88441c902511f36bd188)) 102 | * **nix:** drop macOS native dependencies ([#88](https://github.com/catppuccin/mdBook/issues/88)) ([547ed85](https://github.com/catppuccin/mdBook/commit/547ed8546b1870cb1e5747a2f2338aa33b3af522)) 103 | * **website:** use mdbook-admonish v1.13.0 ([33eb09c](https://github.com/catppuccin/mdBook/commit/33eb09c677719474e8726e6bf7278e1c9390cacc)) 104 | 105 | ## [2.0.1](https://github.com/catppuccin/mdBook/compare/v2.0.0...v2.0.1) (2023-10-09) 106 | 107 | 108 | ### Bug Fixes 109 | 110 | * **admonish:** prefix `admonish-` to class names ([#76](https://github.com/catppuccin/mdBook/issues/76)) ([ba711b6](https://github.com/catppuccin/mdBook/commit/ba711b6ceb67f9d4e352cafc4a11d8a28d0b4980)) 111 | 112 | ## [2.0.0](https://github.com/catppuccin/mdBook/compare/v1.2.0...v2.0.0) (2023-10-07) 113 | 114 | 115 | ### ⚠ BREAKING CHANGES 116 | 117 | * support mdbook version `0.4.35` 118 | 119 | ### Features 120 | 121 | * **cli:** add "--force" flag to install command ([28f9d0f](https://github.com/catppuccin/mdBook/commit/28f9d0f02aea41c7278659fb22ba9db5bbf02b5d)) 122 | * **cli:** detect differences in major version ([8956c61](https://github.com/catppuccin/mdBook/commit/8956c61a727b0408be202c9c7fc6c2f336166272)) 123 | * support mdbook version `0.4.35` ([55e8722](https://github.com/catppuccin/mdBook/commit/55e872267de2c63e91659c6be5eac1be4fc34540)) 124 | 125 | ## [1.2.0](https://github.com/catppuccin/mdBook/compare/v1.1.0...v1.2.0) (2023-10-03) 126 | 127 | 128 | ### Features 129 | 130 | * darken struckout text ([5388763](https://github.com/catppuccin/mdBook/commit/5388763d108a72e1f0bd99656d7c88439fe9243a)) 131 | * switch to clap v4 ([a1ddb9a](https://github.com/catppuccin/mdBook/commit/a1ddb9a11b6a5e83b75dbfeebe776ad7658ac9eb)) 132 | 133 | 134 | ### Bug Fixes 135 | 136 | * clap typecasting panic ([1193c91](https://github.com/catppuccin/mdBook/commit/1193c91b092da7f7496fb78431045733814789f0)) 137 | * colours in `diff` codeblock ([#67](https://github.com/catppuccin/mdBook/issues/67)) ([a3b3f77](https://github.com/catppuccin/mdBook/commit/a3b3f7726c85cc815279f62fbd096d7249429866)) 138 | 139 | ## [1.1.0](https://github.com/catppuccin/mdBook/compare/v1.0.0...v1.1.0) (2023-10-02) 140 | 141 | 142 | ### Features 143 | 144 | * darken struckout text ([5388763](https://github.com/catppuccin/mdBook/commit/5388763d108a72e1f0bd99656d7c88439fe9243a)) 145 | * switch to clap v4 ([a1ddb9a](https://github.com/catppuccin/mdBook/commit/a1ddb9a11b6a5e83b75dbfeebe776ad7658ac9eb)) 146 | 147 | 148 | ### Bug Fixes 149 | 150 | * colours in `diff` codeblock ([#67](https://github.com/catppuccin/mdBook/issues/67)) ([a3b3f77](https://github.com/catppuccin/mdBook/commit/a3b3f7726c85cc815279f62fbd096d7249429866)) 151 | 152 | ## [1.0.0](https://github.com/catppuccin/mdBook/compare/mdbook-catppuccin-v0.2.1...mdbook-catppuccin-v1.0.0) (2023-09-17) 153 | 154 | 155 | ### ⚠ BREAKING CHANGES 156 | 157 | * merge css files and separate admonish 158 | 159 | ### Features 160 | 161 | * add mdbook-admonish support ([#59](https://github.com/catppuccin/mdBook/issues/59)) ([c8ba6ec](https://github.com/catppuccin/mdBook/commit/c8ba6ec236ba0bf7f4579dd8d31f27d454d7d61c)) 162 | * style nested `blockquote` and `hr` ([f78383c](https://github.com/catppuccin/mdBook/commit/f78383ce5bedd6b276d6f12656f35f2474de91fe)) 163 | 164 | ### Code Refactoring 165 | 166 | * merge css files and separate admonish ([5a160cd](https://github.com/catppuccin/mdBook/commit/5a160cd7e9a8ba21fc4cb4c884e3a664fcf715ea)) 167 | 168 | ## [v0.2.1](https://github.com/catppuccin/mdBook/releases/tag/v0.2.1) - 2023-07-29 169 | 170 | ### Bug Fixes 171 | 172 | * add `cargo` feature for `crate_version` by @sgoudham (dde0c18b73f8742f0e5ef29629d1107552b7bab1) 173 | * This fixes #52 174 | * pin mdbook to 0.4.22 by @nyxkrage (cc92a344d1693d6f0a54fc55110af57bb2dfe70a) 175 | * This will prevent issues like #52 from happening again. 176 | * Fix source filter in `flake.nix` by @VojtechStep in https://github.com/catppuccin/mdBook/pull/51 177 | 178 | ## [v0.2.0](https://github.com/catppuccin/mdBook/releases/tag/v0.2.0) - 2023-06-16 02:13:13 179 | 180 | Apologies for leaving this on the backburner for so long! 181 | 182 | This release makes the port more maintainable as we are now using [catppuccin/highlightjs](https://github.com/catppuccin/highlightjs) for the majority of the CSS. 183 | There has also been improvements to the CI/CD pipeline and includes a Nix flake (which I still need to fix!) 184 | 185 | Thanks to anyone who chooses to use this, I really appreciate it <3 186 | 187 | ### Feature 188 | 189 | - general: 190 | - use npm package imports, update highlightjs ([f3bcc7e](https://github.com/catppuccin/mdBook/commit/f3bcc7e601fb1850d120c12e961cf8d4fb3883ed)) ([#39](https://github.com/catppuccin/mdBook/pull/39)) 191 | - dependabot is over party ([07a4d8a](https://github.com/catppuccin/mdBook/commit/07a4d8a06c6ec4b65e0ed6702bf61849acc9e073)) ([#16](https://github.com/catppuccin/mdBook/pull/16)) 192 | 193 | ### Bug Fixes 194 | 195 | - general: 196 | - different colours for code blocks and inline code ([87a1749](https://github.com/catppuccin/mdBook/commit/87a1749fdf8d6046aa986fe5199fea74bd5299e1)) 197 | - code backgrounds updated to `mantle` ([5feb4df](https://github.com/catppuccin/mdBook/commit/5feb4df45897b9399351588e230960ec9cdeefda)) ([#45](https://github.com/catppuccin/mdBook/pull/45)) 198 | - update to fixed highlightjs version ([98cf81a](https://github.com/catppuccin/mdBook/commit/98cf81a998a49c3176854f46c6e9a971f34b1c93)) ([#39](https://github.com/catppuccin/mdBook/pull/39)) 199 | - move output from `/bin/assets` to `/src/bin/assets` ([759ad4f](https://github.com/catppuccin/mdBook/commit/759ad4fe0e7e575214115a4eb0f64b32f9b294e8)) ([#39](https://github.com/catppuccin/mdBook/pull/39)) 200 | 201 | ### Documentation 202 | 203 | - general: 204 | - add example mdBook ([3469e9e](https://github.com/catppuccin/mdBook/commit/3469e9ee873fa395396f374a33b3a0f1b5c5d5b4)) ([#45](https://github.com/catppuccin/mdBook/pull/45)) 205 | 206 | - README: 207 | - standardise with template repository ([3844bd1](https://github.com/catppuccin/mdBook/commit/3844bd10008bd5dabc8fba5ecf3b691c6830daba)) ([#45](https://github.com/catppuccin/mdBook/pull/45)) 208 | 209 | ### Refactor 210 | 211 | - general: 212 | - links should be `blue` ([6cce7d0](https://github.com/catppuccin/mdBook/commit/6cce7d0264b0e813974ce8b3967c249ed90a34ab)) ([#45](https://github.com/catppuccin/mdBook/pull/45)) 213 | 214 | ## [v0.1.1](https://github.com/catppuccin/mdBook/releases/tag/v0.1.1) - 2022-08-27 21:05:04 215 | 216 | _No description_ 217 | 218 | ### Bug Fixes 219 | 220 | - general: 221 | - Add 'ayu' back into index.hbs ([45220f0](https://github.com/catppuccin/mdBook/commit/45220f0fcca322f5c1b3285371b84942daae3d70)) ([#1](https://github.com/catppuccin/mdBook/pull/1)) 222 | 223 | ### Documentation 224 | 225 | - README: 226 | - Add ayu into diff codeblock example ([b68dac3](https://github.com/catppuccin/mdBook/commit/b68dac3c77ac55c4467ba2e1c8746774a12445a8)) ([#1](https://github.com/catppuccin/mdBook/pull/1)) 227 | - Add binaries section ([9f7bae8](https://github.com/catppuccin/mdBook/commit/9f7bae8045f1312d1cc20decf8780c02325e98f1)) 228 | - Update link for index.hbs ([200008e](https://github.com/catppuccin/mdBook/commit/200008e7b237ffe2b7895a6792bded9ed30cd335)) 229 | 230 | ## [v0.1.0](https://github.com/catppuccin/mdBook/releases/tag/v0.1.0) - 2022-08-27 12:47:37 231 | 232 | 🎉 The first-ever release of mdbook-catppuccin 🎉 233 | 234 | ![image](https://user-images.githubusercontent.com/58985301/187031293-f3a931f1-cf14-4d47-820b-5185288b0969.png) 235 | 236 | ### Feature 237 | 238 | - general: 239 | 240 | - Refactor + Wrap up port ([9ba9813](https://github.com/catppuccin/mdBook/commit/9ba9813fd3d1ac75106cc2b0add0ae6627aae2c4)) 241 | - Fix codeblock colours ([e93f034](https://github.com/catppuccin/mdBook/commit/e93f0347722d3bd6ce5caa81cccbc93d0b205db6)) 242 | - Generate catppuccin flavours with sass ([44144a2](https://github.com/catppuccin/mdBook/commit/44144a2512265c0eb6d1376a1da4c0be1cf43894)) 243 | 244 | - mdbook: 245 | 246 | - Add insert_dotted_table() ([37620fe](https://github.com/catppuccin/mdBook/commit/37620fe8c375ba4eaf54ae70a086445b82bc7a1c)) 247 | 248 | - scss: 249 | - Generate css for .hjls ([c151055](https://github.com/catppuccin/mdBook/commit/c1510551c54cc3bc1c5751a6769fdcca3531f3e4)) 250 | 251 | ### Bug Fixes 252 | 253 | - general: 254 | - Fix white background colour ([38514d4](https://github.com/catppuccin/mdBook/commit/38514d4f5c670d197e8c10fe07d3fff5f182ccb8)) 255 | - Update assets and resolve highlights ([caedfd0](https://github.com/catppuccin/mdBook/commit/caedfd094ae0be4421cf4f235ab80dfdfb929c33)) 256 | 257 | ### Documentation 258 | 259 | - README: 260 | 261 | - Tidy up diff codeblock ([5bd3618](https://github.com/catppuccin/mdBook/commit/5bd3618abc00b3b306d87952621b7a43cbb52908)) 262 | - Update badge links ([9ab04ba](https://github.com/catppuccin/mdBook/commit/9ab04ba20b3ecafd832753f0371a9ed22ecd1b28)) 263 | - Import template from catppuccin ([00b5f47](https://github.com/catppuccin/mdBook/commit/00b5f4765c6e84d3ab80d383d922f2299fad88a3)) 264 | 265 | - general: 266 | - Update description of crate ([686e801](https://github.com/catppuccin/mdBook/commit/686e80150cb382e58e7ebe90d574843d062cf879)) 267 | - Add binaries bullet point ([c960264](https://github.com/catppuccin/mdBook/commit/c960264bf5eabff96e6c797defa62e8ab67506e8)) 268 | - Update README & upload catwalk image ([1b945c5](https://github.com/catppuccin/mdBook/commit/1b945c50313311500987a543cb3d7d2f70da0c32)) 269 | 270 | ### Refactor 271 | 272 | - general: 273 | 274 | - No need for individual images ([af14a54](https://github.com/catppuccin/mdBook/commit/af14a542bae658a58673741cf762f7841fb266b6)) 275 | - Remove useless comment ([db3cf56](https://github.com/catppuccin/mdBook/commit/db3cf5607bafb25873d50c8b993512f286c10ddb)) 276 | - Remove unused code ([bc01543](https://github.com/catppuccin/mdBook/commit/bc015432546dcf99695b10edd2333d6fd8d6fe25)) 277 | - Remove old commented css ([56b47b3](https://github.com/catppuccin/mdBook/commit/56b47b39cf6980b68739a3496b56b2a329a966c8)) 278 | 279 | - assets: 280 | 281 | - Create separate file for highlights ([a69a8de](https://github.com/catppuccin/mdBook/commit/a69a8de064ccbc10344e3ae30785270cc094c42e)) 282 | - Move src/assets -> src/bin/assets ([444b809](https://github.com/catppuccin/mdBook/commit/444b8096454bf04b2a973766994703523e6c1d3d)) 283 | - Remove ASSETS_VERSION in favour of CARGO_PKG_VERSION ([5384c92](https://github.com/catppuccin/mdBook/commit/5384c929e99a3ce35e28b821419c6f4bb74c4b2f)) 284 | 285 | - mdbook: 286 | 287 | - Extend default toml structs ([48cd282](https://github.com/catppuccin/mdBook/commit/48cd282227ee2de3a2f691176e6c8d81159217f2)) 288 | - Move toml trait extensions into toml.rs ([cbfffa3](https://github.com/catppuccin/mdBook/commit/cbfffa3c944b1934ddac65c50ee8b792b438e4b6)) 289 | - Start highlighting codeblocks + other stuff ([c24d08a](https://github.com/catppuccin/mdBook/commit/c24d08abc6ceb4f6f89fcf6385e52df7a92ce367)) 290 | 291 | - config: 292 | - Use spaces instead of tabs ([3c4d7e0](https://github.com/catppuccin/mdBook/commit/3c4d7e0b1ffc24644fdefbe4b1ca8c344590b87a)) 293 | 294 | \* _This CHANGELOG was automatically generated by [auto-generate-changelog](https://github.com/BobAnkh/auto-generate-changelog)_ 295 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Catppuccin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | Logo
3 | 4 | Catppuccin for mdBook 5 | 6 |

7 | 8 |

9 | 10 | 11 | 12 | 13 |

14 | 15 |

16 | 17 |

18 | 19 | ## Previews 20 | 21 |
22 | 🌻 Latte 23 | 24 |
25 |
26 | 🪴 Frappé 27 | 28 |
29 |
30 | 🌺 Macchiato 31 | 32 |
33 |
34 | 🌿 Mocha 35 | 36 |
37 | 38 | ## Usage 39 | 40 | > [!IMPORTANT] 41 | > The `mdbook-catppuccin` rust package has been deprecated. For further information 42 | > on why this decision was made, please refer to 43 | > [catppuccin/mdBook#107](https://github.com/catppuccin/mdBook/issues/107) 44 | > 45 | > Please follow the instructions below to install the Catppuccin theme for mdBook. 46 | 47 | 1. Initialise your mdBook with the theme files: 48 | 49 | ```shell 50 | mdbook init --theme 51 | ``` 52 | 53 | 2. Enter the book directory and remove all theme files except `index.hbs`: 54 | 55 | ```shell 56 | cd 57 | # Remove all files except index.hbs 58 | find ./theme -type f ! -name 'index.hbs' -delete 59 | # Remove the left over empty directories 60 | rm -d fonts css 61 | ``` 62 | 63 | 3. Download the [catppuccin.css](https://github.com/catppuccin/mdBook/releases/latest/download/catppuccin.css) 64 | file from the [latest GitHub release](https://github.com/catppuccin/mdBook/releases/latest) to the `theme` 65 | directory. 66 | 67 | See the [Supported Plugins](#supported-plugins) section below for integrations with other 68 | mdBook plugins. 69 | 70 | 4. Update `additional-css` key within the `book.toml` as shown below 71 | 72 | ```diff 73 | [output.html] 74 | -additional-css = [] 75 | +additional-css = ["./theme/catppuccin.css"] 76 | ``` 77 | 78 | 5. Edit the `index.hbs` file to include the Catppuccin flavors: 79 | 80 | ```diff 81 | -
  • 82 | -
  • 83 | -
  • 84 | -
  • 85 | -
  • 86 | +
  • 87 | +
  • 88 | +
  • 89 | +
  • 90 | ``` 91 | 92 | Additionally, you can use 93 | [default-theme](https://rust-lang.github.io/mdBook/format/configuration/renderers.html?highlight=default-theme#html-renderer-options) 94 | and 95 | [preferred-dark-theme](https://rust-lang.github.io/mdBook/format/configuration/renderers.html?highlight=preferred-dark-theme#html-renderer-options) 96 | keys for setting default light/dark mode themes in your `book.toml`. 97 | 98 | E.g. To set the default theme to `latte` and default dark mode to `mocha`: 99 | 100 | ```diff 101 | [output.html] 102 | + default-theme = "latte" 103 | + preferred-dark-theme = "mocha" 104 | ``` 105 | 106 | 6. Build using `mdbook build` and enjoy your new Catppuccin flavors! 107 | 108 | ### Supported Plugins 109 | 110 | This theme also generates CSS files to style elements added by other mdBook 111 | plugins. We support the following list of plugins: 112 | 113 | | Plugin | CSS File | 114 | | ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | 115 | | [mdbook-admonish](https://github.com/tommilligan/mdbook-admonish) | [catppuccin-admonish.css](https://github.com/catppuccin/mdBook/releases/latest/download/catppuccin-admonish.css) | 116 | | [mdbook-alerts](https://github.com/lambdalisue/rs-mdbook-alerts) | [catppuccin-alerts.css](https://github.com/catppuccin/mdBook/releases/latest/download/catppuccin-alerts.css) | 117 | 118 | The CSS file(s) can be downloaded and added to the `additional-css` key shown 119 | in step `4.` of the [Usage](#usage) section. 120 | 121 | ## Development 122 | 123 | 1. Clone the repository and navigate to the repository root. 124 | 125 | ```shell 126 | git clone https://github.com/catppuccin/mdbook 127 | cd mdbook 128 | ``` 129 | 130 | 2. Generate the CSS files: 131 | 132 | ```shell 133 | pnpm install 134 | pnpm run build 135 | ``` 136 | 137 | ## Acknowledgement 138 | 139 | [mdbook-admonish](https://github.com/tommilligan/mdbook-admonish) for 140 | inspiration on the `install` command for the now deprecated `mdbook-catppuccin` 141 | binary. 142 | 143 | ## 💝 Thanks to 144 | 145 | - [Hamothy](https://github.com/sgoudham) 146 | - [winston](https://github.com/nekowinston) 147 | 148 |   149 | 150 |

    151 | 152 |

    153 | 154 |

    155 | Copyright © 2021-present Catppuccin Org 156 |

    157 | 158 |

    159 | 160 |

    161 | -------------------------------------------------------------------------------- /assets/catwalk.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/catppuccin/mdBook/666695ac488678b8fd1a15d73d0bd164d2d08a46/assets/catwalk.webp -------------------------------------------------------------------------------- /assets/frappe.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/catppuccin/mdBook/666695ac488678b8fd1a15d73d0bd164d2d08a46/assets/frappe.webp -------------------------------------------------------------------------------- /assets/latte.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/catppuccin/mdBook/666695ac488678b8fd1a15d73d0bd164d2d08a46/assets/latte.webp -------------------------------------------------------------------------------- /assets/macchiato.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/catppuccin/mdBook/666695ac488678b8fd1a15d73d0bd164d2d08a46/assets/macchiato.webp -------------------------------------------------------------------------------- /assets/mocha.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/catppuccin/mdBook/666695ac488678b8fd1a15d73d0bd164d2d08a46/assets/mocha.webp -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # mdbook build directory 2 | book -------------------------------------------------------------------------------- /example/book.toml: -------------------------------------------------------------------------------- 1 | [book] 2 | authors = ["sgoudham"] 3 | language = "en" 4 | multilingual = false 5 | src = "src" 6 | title = "Catppuccin's mdBook" 7 | 8 | [preprocessor.admonish] 9 | command = "mdbook-admonish" 10 | assets_version = "3.0.3" # do not edit: managed by `mdbook-admonish install` 11 | 12 | [preprocessor.alerts] 13 | 14 | [output.html] 15 | default-theme = "latte" 16 | preferred-dark-theme = "mocha" 17 | additional-css = [ 18 | "./theme/catppuccin.css", 19 | "./theme/catppuccin-admonish.css", 20 | "./theme/mdbook-admonish.css", 21 | "./theme/catppuccin-alerts.css", 22 | ] 23 | no-section-label = true 24 | git-repository-url = "https://github.com/catppuccin/mdBook" 25 | git-repository-icon = "fa-github" 26 | edit-url-template = "https://github.com/catppuccin/mdBook/edit/main/example/{path}" 27 | cname = "mdbook.catppuccin.com" 28 | -------------------------------------------------------------------------------- /example/src/SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | 3 | - [Landing](./landing.md) 4 | - [Admonishments](./admonish.md) 5 | - [Alerts](./alerts.md) 6 | - [Super Secret](./secret.md) 7 | -------------------------------------------------------------------------------- /example/src/admonish.md: -------------------------------------------------------------------------------- 1 | # Reference 2 | 3 | The following admonishments are implemented by the 4 | [mdbook-admonish](https://github.com/tommilligan/mdbook-admonish) plugin and are 5 | automatically themed to match Catppuccin. 6 | 7 | ## Directives 8 | 9 | All supported directives are listed below. 10 | 11 | `note` 12 | 13 | ```admonish note 14 | Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency. 15 | ``` 16 | 17 | `abstract`, `summary`, `tldr` 18 | 19 | ```admonish abstract 20 | Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency. 21 | ``` 22 | 23 | `info`, `todo` 24 | 25 | ```admonish info 26 | Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency. 27 | ``` 28 | 29 | `tip`, `hint`, `important` 30 | 31 | ```admonish tip 32 | Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency. 33 | ``` 34 | 35 | `success`, `check`, `done` 36 | 37 | ```admonish success 38 | Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency. 39 | ``` 40 | 41 | `question`, `help`, `faq` 42 | 43 | ```admonish question 44 | Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency. 45 | ``` 46 | 47 | `warning`, `caution`, `attention` 48 | 49 | ```admonish warning 50 | Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency. 51 | ``` 52 | 53 | `failure`, `fail`, `missing` 54 | 55 | ```admonish failure 56 | Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency. 57 | ``` 58 | 59 | `danger`, `error` 60 | 61 | ```admonish danger 62 | Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency. 63 | ``` 64 | 65 | `bug` 66 | 67 | ```admonish bug 68 | Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency. 69 | ``` 70 | 71 | `example` 72 | 73 | ```admonish example 74 | Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency. 75 | ``` 76 | 77 | `quote`, `cite` 78 | 79 | ```admonish quote 80 | Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency. 81 | ``` 82 | -------------------------------------------------------------------------------- /example/src/alerts.md: -------------------------------------------------------------------------------- 1 | # Reference 2 | 3 | The following alerts are implemented by the 4 | [mdbook-alerts](https://github.com/lambdalisue/rs-mdbook-alerts) plugin and are 5 | automatically themed to match Catppuccin. 6 | 7 | ## Alerts 8 | 9 | All supported alerts are listed below. 10 | 11 | > [!NOTE] 12 | > Highlights information that users should take into account, even when skimming. 13 | 14 | > [!TIP] 15 | > Optional information to help a user be more successful. 16 | 17 | > [!IMPORTANT] 18 | > Crucial information necessary for users to succeed. 19 | 20 | > [!WARNING] 21 | > Critical content demanding immediate user attention due to potential risks. 22 | 23 | > [!CAUTION] 24 | > Negative potential consequences of an action. 25 | -------------------------------------------------------------------------------- /example/src/landing.md: -------------------------------------------------------------------------------- 1 | # Example Markdown Document 2 | 3 | ## Information 4 | 5 | **crates.io**: [https://crates.io/crates/mdbook-catppuccin](https://crates.io/crates/mdbook-catppuccin) 6 | 7 | **repository**: [https://github.com/catppuccin/mdBook](https://github.com/catppuccin/mdBook) 8 | 9 | ## Text 10 | 11 | Here is a paragraph with bold text. **This is some bold text.** Here is a 12 | paragraph with bold text. **This is also some bold text.** 13 | 14 | Here is another one with italic text. _This is some italic text._ Here is 15 | another one with italic text. _This is some italic text._ 16 | 17 | Here is another one with struckout text. ~~This is some struckout text.~~ 18 | 19 |
    20 | This is some text in a warning block. 21 | 22 | Warning blocks should be used sparingly in documentation, to avoid "warning 23 | fatigue," where people are trained to ignore them because they usually don't 24 | matter for what they're doing. 25 |
    26 | 27 | ## Links 28 | 29 | Autolink: 30 | 31 | Link: [Example](http://example.com) 32 | 33 | Reference style [link][1]. 34 | 35 | [1]: http://example.com "Example" 36 | 37 | ## Images 38 | 39 | 40 | 41 | ## Headers 42 | 43 | # First level title 44 | 45 | ## Second level title 46 | 47 | ### Third level title 48 | 49 | #### Fourth level title 50 | 51 | ##### Fifth level title 52 | 53 | ###### Sixth level title 54 | 55 | ### Title with [link](http://localhost) 56 | 57 | ### Title with ![image](http://localhost) 58 | 59 | ## Code 60 | 61 | Inline `code span in a` paragraph. 62 | 63 | ``` 64 | This 65 | is 66 | code 67 | fence 68 | ``` 69 | 70 | ```java 71 | public class Main { 72 | public static void main(String[] args) { 73 | System.out.println("Hello, World!"); 74 | System.out.println("This is some Java code!"); 75 | } 76 | } 77 | ``` 78 | 79 | This is a code block: 80 | 81 | /** 82 | * Sorts the specified array into ascending numerical order. 83 | * 84 | *

    Implementation note: The sorting algorithm is a Dual-Pivot Quicksort 85 | * by Vladimir Yaroslavskiy, Jon Bentley, and Joshua Bloch. This algorithm 86 | * offers O(n log(n)) performance on many data sets that cause other 87 | * quicksorts to degrade to quadratic performance, and is typically 88 | * faster than traditional (one-pivot) Quicksort implementations. 89 | * 90 | * @param a the array to be sorted 91 | */ 92 | public static void sort(byte[] a) { 93 | DualPivotQuicksort.sort(a); 94 | } 95 | 96 | ## Quotes 97 | 98 | > This is the first level of quoting. 99 | > 100 | > > This is nested blockquote. 101 | > 102 | > Back to the first level. 103 | 104 | > A list within a blockquote: 105 | > 106 | > - asterisk 1 107 | > - asterisk 2 108 | > - asterisk 3 109 | 110 | > Formatting within a blockquote: 111 | > 112 | > ### header 113 | > 114 | > Link: [Example](http://example.com) 115 | 116 | ## Html 117 | 118 | This is inline html. 119 | And this is an html block. 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 |
    Column 1Column 2
    Row 1 Cell 1Row 1 Cell 2
    Row 2 Cell 1Row 2 Cell 2
    135 | 136 | ## Horizontal rules 137 | 138 | --- 139 | 140 | --- 141 | 142 | --- 143 | 144 | ## Lists 145 | 146 | Unordered list: 147 | 148 | - asterisk 1 149 | - asterisk 2 150 | - asterisk 3 151 | 152 | Ordered list: 153 | 154 | 1. First 155 | 2. Second 156 | 3. Third 157 | 158 | Mixed: 159 | 160 | 1. First 161 | 2. Second: 162 | 163 | - Fee 164 | - Fie 165 | - Foe 166 | 167 | 3. Third 168 | 169 | Definition list: 170 | 171 | Some term 172 | : First definition 173 | : Second definition 174 | 175 | Tables: 176 | 177 | | Header 1 | Header 2 | 178 | | -------- | -------- | 179 | | Data 1 | Data 2 | 180 | -------------------------------------------------------------------------------- /example/src/secret.md: -------------------------------------------------------------------------------- 1 | # Super Secret 2 | 3 | You thought you'd find something here, didn't you? 4 | 5 | Here, have a cookie for your efforts: 🍪 6 | -------------------------------------------------------------------------------- /example/theme/catppuccin-admonish.css: -------------------------------------------------------------------------------- 1 | ../../dist/catppuccin-admonish.css -------------------------------------------------------------------------------- /example/theme/catppuccin-alerts.css: -------------------------------------------------------------------------------- 1 | ../../dist/catppuccin-alerts.css -------------------------------------------------------------------------------- /example/theme/catppuccin.css: -------------------------------------------------------------------------------- 1 | ../../dist/catppuccin.css -------------------------------------------------------------------------------- /example/theme/index.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{ title }} 7 | {{#if is_print }} 8 | 9 | {{/if}} 10 | {{#if base_url}} 11 | 12 | {{/if}} 13 | 14 | 15 | 16 | {{> head}} 17 | 18 | 19 | 20 | 21 | 22 | {{#if favicon_svg}} 23 | 24 | {{/if}} 25 | {{#if favicon_png}} 26 | 27 | {{/if}} 28 | 29 | 30 | 31 | {{#if print_enable}} 32 | 33 | {{/if}} 34 | 35 | 36 | 37 | {{#if copy_fonts}} 38 | 39 | {{/if}} 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | {{#each additional_css}} 48 | 49 | {{/each}} 50 | 51 | {{#if mathjax_support}} 52 | 53 | 54 | {{/if}} 55 | 56 | 57 | 61 | 62 | 63 | 64 | 65 |

    66 | 67 | 81 | 82 | 83 | 92 | 93 | 94 | 95 | 96 | 109 | 110 | 120 | 121 |
    122 | 123 |
    124 | {{> header}} 125 | 126 | 173 | 174 | {{#if search_enabled}} 175 | 185 | {{/if}} 186 | 187 | 188 | 195 | 196 |
    197 |
    198 | {{{ content }}} 199 |
    200 | 201 | 217 |
    218 |
    219 | 220 | 233 | 234 |
    235 | 236 | {{#if live_reload_endpoint}} 237 | 238 | 253 | {{/if}} 254 | 255 | {{#if google_analytics}} 256 | 257 | 272 | {{/if}} 273 | 274 | {{#if playground_line_numbers}} 275 | 278 | {{/if}} 279 | 280 | {{#if playground_copyable}} 281 | 284 | {{/if}} 285 | 286 | {{#if playground_js}} 287 | 288 | 289 | 290 | 291 | 292 | {{/if}} 293 | 294 | {{#if search_js}} 295 | 296 | 297 | 298 | {{/if}} 299 | 300 | 301 | 302 | 303 | 304 | 305 | {{#each additional_js}} 306 | 307 | {{/each}} 308 | 309 | {{#if is_print}} 310 | {{#if mathjax_support}} 311 | 318 | {{else}} 319 | 324 | {{/if}} 325 | {{/if}} 326 | 327 |
    328 | 329 | 330 | -------------------------------------------------------------------------------- /example/theme/mdbook-admonish.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | :is(.admonition) { 3 | display: flow-root; 4 | margin: 1.5625em 0; 5 | padding: 0 1.2rem; 6 | color: var(--fg); 7 | page-break-inside: avoid; 8 | background-color: var(--bg); 9 | border: 0 solid black; 10 | border-inline-start-width: 0.4rem; 11 | border-radius: 0.2rem; 12 | box-shadow: 0 0.2rem 1rem rgba(0, 0, 0, 0.05), 0 0 0.1rem rgba(0, 0, 0, 0.1); 13 | } 14 | @media print { 15 | :is(.admonition) { 16 | box-shadow: none; 17 | } 18 | } 19 | :is(.admonition) > * { 20 | box-sizing: border-box; 21 | } 22 | :is(.admonition) :is(.admonition) { 23 | margin-top: 1em; 24 | margin-bottom: 1em; 25 | } 26 | :is(.admonition) > .tabbed-set:only-child { 27 | margin-top: 0; 28 | } 29 | html :is(.admonition) > :last-child { 30 | margin-bottom: 1.2rem; 31 | } 32 | 33 | a.admonition-anchor-link { 34 | display: none; 35 | position: absolute; 36 | left: -1.2rem; 37 | padding-right: 1rem; 38 | } 39 | a.admonition-anchor-link:link, a.admonition-anchor-link:visited { 40 | color: var(--fg); 41 | } 42 | a.admonition-anchor-link:link:hover, a.admonition-anchor-link:visited:hover { 43 | text-decoration: none; 44 | } 45 | a.admonition-anchor-link::before { 46 | content: "§"; 47 | } 48 | 49 | :is(.admonition-title, summary.admonition-title) { 50 | position: relative; 51 | min-height: 4rem; 52 | margin-block: 0; 53 | margin-inline: -1.6rem -1.2rem; 54 | padding-block: 0.8rem; 55 | padding-inline: 4.4rem 1.2rem; 56 | font-weight: 700; 57 | background-color: rgba(68, 138, 255, 0.1); 58 | print-color-adjust: exact; 59 | -webkit-print-color-adjust: exact; 60 | display: flex; 61 | } 62 | :is(.admonition-title, summary.admonition-title) p { 63 | margin: 0; 64 | } 65 | html :is(.admonition-title, summary.admonition-title):last-child { 66 | margin-bottom: 0; 67 | } 68 | :is(.admonition-title, summary.admonition-title)::before { 69 | position: absolute; 70 | top: 0.625em; 71 | inset-inline-start: 1.6rem; 72 | width: 2rem; 73 | height: 2rem; 74 | background-color: #448aff; 75 | print-color-adjust: exact; 76 | -webkit-print-color-adjust: exact; 77 | mask-image: url('data:image/svg+xml;charset=utf-8,'); 78 | -webkit-mask-image: url('data:image/svg+xml;charset=utf-8,'); 79 | mask-repeat: no-repeat; 80 | -webkit-mask-repeat: no-repeat; 81 | mask-size: contain; 82 | -webkit-mask-size: contain; 83 | content: ""; 84 | } 85 | :is(.admonition-title, summary.admonition-title):hover a.admonition-anchor-link { 86 | display: initial; 87 | } 88 | 89 | details.admonition > summary.admonition-title::after { 90 | position: absolute; 91 | top: 0.625em; 92 | inset-inline-end: 1.6rem; 93 | height: 2rem; 94 | width: 2rem; 95 | background-color: currentcolor; 96 | mask-image: var(--md-details-icon); 97 | -webkit-mask-image: var(--md-details-icon); 98 | mask-repeat: no-repeat; 99 | -webkit-mask-repeat: no-repeat; 100 | mask-size: contain; 101 | -webkit-mask-size: contain; 102 | content: ""; 103 | transform: rotate(0deg); 104 | transition: transform 0.25s; 105 | } 106 | details[open].admonition > summary.admonition-title::after { 107 | transform: rotate(90deg); 108 | } 109 | summary.admonition-title::-webkit-details-marker { 110 | display: none; 111 | } 112 | 113 | :root { 114 | --md-details-icon: url("data:image/svg+xml;charset=utf-8,"); 115 | } 116 | 117 | :root { 118 | --md-admonition-icon--admonish-note: url("data:image/svg+xml;charset=utf-8,"); 119 | --md-admonition-icon--admonish-abstract: url("data:image/svg+xml;charset=utf-8,"); 120 | --md-admonition-icon--admonish-info: url("data:image/svg+xml;charset=utf-8,"); 121 | --md-admonition-icon--admonish-tip: url("data:image/svg+xml;charset=utf-8,"); 122 | --md-admonition-icon--admonish-success: url("data:image/svg+xml;charset=utf-8,"); 123 | --md-admonition-icon--admonish-question: url("data:image/svg+xml;charset=utf-8,"); 124 | --md-admonition-icon--admonish-warning: url("data:image/svg+xml;charset=utf-8,"); 125 | --md-admonition-icon--admonish-failure: url("data:image/svg+xml;charset=utf-8,"); 126 | --md-admonition-icon--admonish-danger: url("data:image/svg+xml;charset=utf-8,"); 127 | --md-admonition-icon--admonish-bug: url("data:image/svg+xml;charset=utf-8,"); 128 | --md-admonition-icon--admonish-example: url("data:image/svg+xml;charset=utf-8,"); 129 | --md-admonition-icon--admonish-quote: url("data:image/svg+xml;charset=utf-8,"); 130 | } 131 | 132 | :is(.admonition):is(.admonish-note) { 133 | border-color: #448aff; 134 | } 135 | 136 | :is(.admonish-note) > :is(.admonition-title, summary.admonition-title) { 137 | background-color: rgba(68, 138, 255, 0.1); 138 | } 139 | :is(.admonish-note) > :is(.admonition-title, summary.admonition-title)::before { 140 | background-color: #448aff; 141 | mask-image: var(--md-admonition-icon--admonish-note); 142 | -webkit-mask-image: var(--md-admonition-icon--admonish-note); 143 | mask-repeat: no-repeat; 144 | -webkit-mask-repeat: no-repeat; 145 | mask-size: contain; 146 | -webkit-mask-repeat: no-repeat; 147 | } 148 | 149 | :is(.admonition):is(.admonish-abstract, .admonish-summary, .admonish-tldr) { 150 | border-color: #00b0ff; 151 | } 152 | 153 | :is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title) { 154 | background-color: rgba(0, 176, 255, 0.1); 155 | } 156 | :is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title)::before { 157 | background-color: #00b0ff; 158 | mask-image: var(--md-admonition-icon--admonish-abstract); 159 | -webkit-mask-image: var(--md-admonition-icon--admonish-abstract); 160 | mask-repeat: no-repeat; 161 | -webkit-mask-repeat: no-repeat; 162 | mask-size: contain; 163 | -webkit-mask-repeat: no-repeat; 164 | } 165 | 166 | :is(.admonition):is(.admonish-info, .admonish-todo) { 167 | border-color: #00b8d4; 168 | } 169 | 170 | :is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title) { 171 | background-color: rgba(0, 184, 212, 0.1); 172 | } 173 | :is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title)::before { 174 | background-color: #00b8d4; 175 | mask-image: var(--md-admonition-icon--admonish-info); 176 | -webkit-mask-image: var(--md-admonition-icon--admonish-info); 177 | mask-repeat: no-repeat; 178 | -webkit-mask-repeat: no-repeat; 179 | mask-size: contain; 180 | -webkit-mask-repeat: no-repeat; 181 | } 182 | 183 | :is(.admonition):is(.admonish-tip, .admonish-hint, .admonish-important) { 184 | border-color: #00bfa5; 185 | } 186 | 187 | :is(.admonish-tip, .admonish-hint, .admonish-important) > :is(.admonition-title, summary.admonition-title) { 188 | background-color: rgba(0, 191, 165, 0.1); 189 | } 190 | :is(.admonish-tip, .admonish-hint, .admonish-important) > :is(.admonition-title, summary.admonition-title)::before { 191 | background-color: #00bfa5; 192 | mask-image: var(--md-admonition-icon--admonish-tip); 193 | -webkit-mask-image: var(--md-admonition-icon--admonish-tip); 194 | mask-repeat: no-repeat; 195 | -webkit-mask-repeat: no-repeat; 196 | mask-size: contain; 197 | -webkit-mask-repeat: no-repeat; 198 | } 199 | 200 | :is(.admonition):is(.admonish-success, .admonish-check, .admonish-done) { 201 | border-color: #00c853; 202 | } 203 | 204 | :is(.admonish-success, .admonish-check, .admonish-done) > :is(.admonition-title, summary.admonition-title) { 205 | background-color: rgba(0, 200, 83, 0.1); 206 | } 207 | :is(.admonish-success, .admonish-check, .admonish-done) > :is(.admonition-title, summary.admonition-title)::before { 208 | background-color: #00c853; 209 | mask-image: var(--md-admonition-icon--admonish-success); 210 | -webkit-mask-image: var(--md-admonition-icon--admonish-success); 211 | mask-repeat: no-repeat; 212 | -webkit-mask-repeat: no-repeat; 213 | mask-size: contain; 214 | -webkit-mask-repeat: no-repeat; 215 | } 216 | 217 | :is(.admonition):is(.admonish-question, .admonish-help, .admonish-faq) { 218 | border-color: #64dd17; 219 | } 220 | 221 | :is(.admonish-question, .admonish-help, .admonish-faq) > :is(.admonition-title, summary.admonition-title) { 222 | background-color: rgba(100, 221, 23, 0.1); 223 | } 224 | :is(.admonish-question, .admonish-help, .admonish-faq) > :is(.admonition-title, summary.admonition-title)::before { 225 | background-color: #64dd17; 226 | mask-image: var(--md-admonition-icon--admonish-question); 227 | -webkit-mask-image: var(--md-admonition-icon--admonish-question); 228 | mask-repeat: no-repeat; 229 | -webkit-mask-repeat: no-repeat; 230 | mask-size: contain; 231 | -webkit-mask-repeat: no-repeat; 232 | } 233 | 234 | :is(.admonition):is(.admonish-warning, .admonish-caution, .admonish-attention) { 235 | border-color: #ff9100; 236 | } 237 | 238 | :is(.admonish-warning, .admonish-caution, .admonish-attention) > :is(.admonition-title, summary.admonition-title) { 239 | background-color: rgba(255, 145, 0, 0.1); 240 | } 241 | :is(.admonish-warning, .admonish-caution, .admonish-attention) > :is(.admonition-title, summary.admonition-title)::before { 242 | background-color: #ff9100; 243 | mask-image: var(--md-admonition-icon--admonish-warning); 244 | -webkit-mask-image: var(--md-admonition-icon--admonish-warning); 245 | mask-repeat: no-repeat; 246 | -webkit-mask-repeat: no-repeat; 247 | mask-size: contain; 248 | -webkit-mask-repeat: no-repeat; 249 | } 250 | 251 | :is(.admonition):is(.admonish-failure, .admonish-fail, .admonish-missing) { 252 | border-color: #ff5252; 253 | } 254 | 255 | :is(.admonish-failure, .admonish-fail, .admonish-missing) > :is(.admonition-title, summary.admonition-title) { 256 | background-color: rgba(255, 82, 82, 0.1); 257 | } 258 | :is(.admonish-failure, .admonish-fail, .admonish-missing) > :is(.admonition-title, summary.admonition-title)::before { 259 | background-color: #ff5252; 260 | mask-image: var(--md-admonition-icon--admonish-failure); 261 | -webkit-mask-image: var(--md-admonition-icon--admonish-failure); 262 | mask-repeat: no-repeat; 263 | -webkit-mask-repeat: no-repeat; 264 | mask-size: contain; 265 | -webkit-mask-repeat: no-repeat; 266 | } 267 | 268 | :is(.admonition):is(.admonish-danger, .admonish-error) { 269 | border-color: #ff1744; 270 | } 271 | 272 | :is(.admonish-danger, .admonish-error) > :is(.admonition-title, summary.admonition-title) { 273 | background-color: rgba(255, 23, 68, 0.1); 274 | } 275 | :is(.admonish-danger, .admonish-error) > :is(.admonition-title, summary.admonition-title)::before { 276 | background-color: #ff1744; 277 | mask-image: var(--md-admonition-icon--admonish-danger); 278 | -webkit-mask-image: var(--md-admonition-icon--admonish-danger); 279 | mask-repeat: no-repeat; 280 | -webkit-mask-repeat: no-repeat; 281 | mask-size: contain; 282 | -webkit-mask-repeat: no-repeat; 283 | } 284 | 285 | :is(.admonition):is(.admonish-bug) { 286 | border-color: #f50057; 287 | } 288 | 289 | :is(.admonish-bug) > :is(.admonition-title, summary.admonition-title) { 290 | background-color: rgba(245, 0, 87, 0.1); 291 | } 292 | :is(.admonish-bug) > :is(.admonition-title, summary.admonition-title)::before { 293 | background-color: #f50057; 294 | mask-image: var(--md-admonition-icon--admonish-bug); 295 | -webkit-mask-image: var(--md-admonition-icon--admonish-bug); 296 | mask-repeat: no-repeat; 297 | -webkit-mask-repeat: no-repeat; 298 | mask-size: contain; 299 | -webkit-mask-repeat: no-repeat; 300 | } 301 | 302 | :is(.admonition):is(.admonish-example) { 303 | border-color: #7c4dff; 304 | } 305 | 306 | :is(.admonish-example) > :is(.admonition-title, summary.admonition-title) { 307 | background-color: rgba(124, 77, 255, 0.1); 308 | } 309 | :is(.admonish-example) > :is(.admonition-title, summary.admonition-title)::before { 310 | background-color: #7c4dff; 311 | mask-image: var(--md-admonition-icon--admonish-example); 312 | -webkit-mask-image: var(--md-admonition-icon--admonish-example); 313 | mask-repeat: no-repeat; 314 | -webkit-mask-repeat: no-repeat; 315 | mask-size: contain; 316 | -webkit-mask-repeat: no-repeat; 317 | } 318 | 319 | :is(.admonition):is(.admonish-quote, .admonish-cite) { 320 | border-color: #9e9e9e; 321 | } 322 | 323 | :is(.admonish-quote, .admonish-cite) > :is(.admonition-title, summary.admonition-title) { 324 | background-color: rgba(158, 158, 158, 0.1); 325 | } 326 | :is(.admonish-quote, .admonish-cite) > :is(.admonition-title, summary.admonition-title)::before { 327 | background-color: #9e9e9e; 328 | mask-image: var(--md-admonition-icon--admonish-quote); 329 | -webkit-mask-image: var(--md-admonition-icon--admonish-quote); 330 | mask-repeat: no-repeat; 331 | -webkit-mask-repeat: no-repeat; 332 | mask-size: contain; 333 | -webkit-mask-repeat: no-repeat; 334 | } 335 | 336 | .navy :is(.admonition) { 337 | background-color: var(--sidebar-bg); 338 | } 339 | 340 | .ayu :is(.admonition), 341 | .coal :is(.admonition) { 342 | background-color: var(--theme-hover); 343 | } 344 | 345 | .rust :is(.admonition) { 346 | background-color: var(--sidebar-bg); 347 | color: var(--sidebar-fg); 348 | } 349 | .rust .admonition-anchor-link:link, .rust .admonition-anchor-link:visited { 350 | color: var(--sidebar-fg); 351 | } 352 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "catppuccin-mdbook", 3 | "version": "3.1.1", 4 | "description": "Soothing pastel theme for mdBook", 5 | "private": true, 6 | "scripts": { 7 | "build": "sass -I node_modules --no-charset --no-source-map src/catppuccin.scss:dist/catppuccin.css src/catppuccin-admonish.scss:dist/catppuccin-admonish.css src/catppuccin-alerts.scss:dist/catppuccin-alerts.css" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/catppuccin/mdBook.git" 12 | }, 13 | "author": "Catppuccin Org ", 14 | "license": "MIT", 15 | "bugs": { 16 | "url": "https://github.com/catppuccin/mdBook/issues" 17 | }, 18 | "homepage": "https://github.com/catppuccin/mdBook#readme", 19 | "devDependencies": { 20 | "@catppuccin/highlightjs": "^1.0.1", 21 | "@catppuccin/palette": "^1.7.1", 22 | "sass": "^1.86.0" 23 | }, 24 | "packageManager": "pnpm@10.10.0" 25 | } 26 | -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- 1 | lockfileVersion: '9.0' 2 | 3 | settings: 4 | autoInstallPeers: true 5 | excludeLinksFromLockfile: false 6 | 7 | importers: 8 | 9 | .: 10 | devDependencies: 11 | '@catppuccin/highlightjs': 12 | specifier: ^1.0.1 13 | version: 1.0.1 14 | '@catppuccin/palette': 15 | specifier: ^1.7.1 16 | version: 1.7.1 17 | sass: 18 | specifier: ^1.86.0 19 | version: 1.86.1 20 | 21 | packages: 22 | 23 | '@catppuccin/highlightjs@1.0.1': 24 | resolution: {integrity: sha512-wnagsNQbJroHQMalkprwRoapfGV1hHRx46d7GXp4kf6rlShImBlgpqPCt9OD471Gq4qpHdfFH/GJFIvY1CLqHA==} 25 | 26 | '@catppuccin/palette@1.7.1': 27 | resolution: {integrity: sha512-aRc1tbzrevOTV7nFTT9SRdF26w/MIwT4Jwt4fDMc9itRZUDXCuEDBLyz4TQMlqO9ZP8mf5Hu4Jr6D03NLFc6Gw==} 28 | 29 | '@parcel/watcher-android-arm64@2.5.1': 30 | resolution: {integrity: sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==} 31 | engines: {node: '>= 10.0.0'} 32 | cpu: [arm64] 33 | os: [android] 34 | 35 | '@parcel/watcher-darwin-arm64@2.5.1': 36 | resolution: {integrity: sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==} 37 | engines: {node: '>= 10.0.0'} 38 | cpu: [arm64] 39 | os: [darwin] 40 | 41 | '@parcel/watcher-darwin-x64@2.5.1': 42 | resolution: {integrity: sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==} 43 | engines: {node: '>= 10.0.0'} 44 | cpu: [x64] 45 | os: [darwin] 46 | 47 | '@parcel/watcher-freebsd-x64@2.5.1': 48 | resolution: {integrity: sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==} 49 | engines: {node: '>= 10.0.0'} 50 | cpu: [x64] 51 | os: [freebsd] 52 | 53 | '@parcel/watcher-linux-arm-glibc@2.5.1': 54 | resolution: {integrity: sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==} 55 | engines: {node: '>= 10.0.0'} 56 | cpu: [arm] 57 | os: [linux] 58 | 59 | '@parcel/watcher-linux-arm-musl@2.5.1': 60 | resolution: {integrity: sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==} 61 | engines: {node: '>= 10.0.0'} 62 | cpu: [arm] 63 | os: [linux] 64 | 65 | '@parcel/watcher-linux-arm64-glibc@2.5.1': 66 | resolution: {integrity: sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==} 67 | engines: {node: '>= 10.0.0'} 68 | cpu: [arm64] 69 | os: [linux] 70 | 71 | '@parcel/watcher-linux-arm64-musl@2.5.1': 72 | resolution: {integrity: sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==} 73 | engines: {node: '>= 10.0.0'} 74 | cpu: [arm64] 75 | os: [linux] 76 | 77 | '@parcel/watcher-linux-x64-glibc@2.5.1': 78 | resolution: {integrity: sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==} 79 | engines: {node: '>= 10.0.0'} 80 | cpu: [x64] 81 | os: [linux] 82 | 83 | '@parcel/watcher-linux-x64-musl@2.5.1': 84 | resolution: {integrity: sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==} 85 | engines: {node: '>= 10.0.0'} 86 | cpu: [x64] 87 | os: [linux] 88 | 89 | '@parcel/watcher-win32-arm64@2.5.1': 90 | resolution: {integrity: sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==} 91 | engines: {node: '>= 10.0.0'} 92 | cpu: [arm64] 93 | os: [win32] 94 | 95 | '@parcel/watcher-win32-ia32@2.5.1': 96 | resolution: {integrity: sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==} 97 | engines: {node: '>= 10.0.0'} 98 | cpu: [ia32] 99 | os: [win32] 100 | 101 | '@parcel/watcher-win32-x64@2.5.1': 102 | resolution: {integrity: sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==} 103 | engines: {node: '>= 10.0.0'} 104 | cpu: [x64] 105 | os: [win32] 106 | 107 | '@parcel/watcher@2.5.1': 108 | resolution: {integrity: sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==} 109 | engines: {node: '>= 10.0.0'} 110 | 111 | braces@3.0.3: 112 | resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} 113 | engines: {node: '>=8'} 114 | 115 | chokidar@4.0.3: 116 | resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} 117 | engines: {node: '>= 14.16.0'} 118 | 119 | detect-libc@1.0.3: 120 | resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==} 121 | engines: {node: '>=0.10'} 122 | hasBin: true 123 | 124 | fill-range@7.1.1: 125 | resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} 126 | engines: {node: '>=8'} 127 | 128 | immutable@5.1.1: 129 | resolution: {integrity: sha512-3jatXi9ObIsPGr3N5hGw/vWWcTkq6hUYhpQz4k0wLC+owqWi/LiugIw9x0EdNZ2yGedKN/HzePiBvaJRXa0Ujg==} 130 | 131 | is-extglob@2.1.1: 132 | resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} 133 | engines: {node: '>=0.10.0'} 134 | 135 | is-glob@4.0.3: 136 | resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} 137 | engines: {node: '>=0.10.0'} 138 | 139 | is-number@7.0.0: 140 | resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} 141 | engines: {node: '>=0.12.0'} 142 | 143 | micromatch@4.0.8: 144 | resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} 145 | engines: {node: '>=8.6'} 146 | 147 | node-addon-api@7.1.1: 148 | resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==} 149 | 150 | picomatch@2.3.1: 151 | resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} 152 | engines: {node: '>=8.6'} 153 | 154 | readdirp@4.1.2: 155 | resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} 156 | engines: {node: '>= 14.18.0'} 157 | 158 | sass@1.86.1: 159 | resolution: {integrity: sha512-Yaok4XELL1L9Im/ZUClKu//D2OP1rOljKj0Gf34a+GzLbMveOzL7CfqYo+JUa5Xt1nhTCW+OcKp/FtR7/iqj1w==} 160 | engines: {node: '>=14.0.0'} 161 | hasBin: true 162 | 163 | source-map-js@1.2.1: 164 | resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} 165 | engines: {node: '>=0.10.0'} 166 | 167 | to-regex-range@5.0.1: 168 | resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} 169 | engines: {node: '>=8.0'} 170 | 171 | snapshots: 172 | 173 | '@catppuccin/highlightjs@1.0.1': {} 174 | 175 | '@catppuccin/palette@1.7.1': {} 176 | 177 | '@parcel/watcher-android-arm64@2.5.1': 178 | optional: true 179 | 180 | '@parcel/watcher-darwin-arm64@2.5.1': 181 | optional: true 182 | 183 | '@parcel/watcher-darwin-x64@2.5.1': 184 | optional: true 185 | 186 | '@parcel/watcher-freebsd-x64@2.5.1': 187 | optional: true 188 | 189 | '@parcel/watcher-linux-arm-glibc@2.5.1': 190 | optional: true 191 | 192 | '@parcel/watcher-linux-arm-musl@2.5.1': 193 | optional: true 194 | 195 | '@parcel/watcher-linux-arm64-glibc@2.5.1': 196 | optional: true 197 | 198 | '@parcel/watcher-linux-arm64-musl@2.5.1': 199 | optional: true 200 | 201 | '@parcel/watcher-linux-x64-glibc@2.5.1': 202 | optional: true 203 | 204 | '@parcel/watcher-linux-x64-musl@2.5.1': 205 | optional: true 206 | 207 | '@parcel/watcher-win32-arm64@2.5.1': 208 | optional: true 209 | 210 | '@parcel/watcher-win32-ia32@2.5.1': 211 | optional: true 212 | 213 | '@parcel/watcher-win32-x64@2.5.1': 214 | optional: true 215 | 216 | '@parcel/watcher@2.5.1': 217 | dependencies: 218 | detect-libc: 1.0.3 219 | is-glob: 4.0.3 220 | micromatch: 4.0.8 221 | node-addon-api: 7.1.1 222 | optionalDependencies: 223 | '@parcel/watcher-android-arm64': 2.5.1 224 | '@parcel/watcher-darwin-arm64': 2.5.1 225 | '@parcel/watcher-darwin-x64': 2.5.1 226 | '@parcel/watcher-freebsd-x64': 2.5.1 227 | '@parcel/watcher-linux-arm-glibc': 2.5.1 228 | '@parcel/watcher-linux-arm-musl': 2.5.1 229 | '@parcel/watcher-linux-arm64-glibc': 2.5.1 230 | '@parcel/watcher-linux-arm64-musl': 2.5.1 231 | '@parcel/watcher-linux-x64-glibc': 2.5.1 232 | '@parcel/watcher-linux-x64-musl': 2.5.1 233 | '@parcel/watcher-win32-arm64': 2.5.1 234 | '@parcel/watcher-win32-ia32': 2.5.1 235 | '@parcel/watcher-win32-x64': 2.5.1 236 | optional: true 237 | 238 | braces@3.0.3: 239 | dependencies: 240 | fill-range: 7.1.1 241 | optional: true 242 | 243 | chokidar@4.0.3: 244 | dependencies: 245 | readdirp: 4.1.2 246 | 247 | detect-libc@1.0.3: 248 | optional: true 249 | 250 | fill-range@7.1.1: 251 | dependencies: 252 | to-regex-range: 5.0.1 253 | optional: true 254 | 255 | immutable@5.1.1: {} 256 | 257 | is-extglob@2.1.1: 258 | optional: true 259 | 260 | is-glob@4.0.3: 261 | dependencies: 262 | is-extglob: 2.1.1 263 | optional: true 264 | 265 | is-number@7.0.0: 266 | optional: true 267 | 268 | micromatch@4.0.8: 269 | dependencies: 270 | braces: 3.0.3 271 | picomatch: 2.3.1 272 | optional: true 273 | 274 | node-addon-api@7.1.1: 275 | optional: true 276 | 277 | picomatch@2.3.1: 278 | optional: true 279 | 280 | readdirp@4.1.2: {} 281 | 282 | sass@1.86.1: 283 | dependencies: 284 | chokidar: 4.0.3 285 | immutable: 5.1.1 286 | source-map-js: 1.2.1 287 | optionalDependencies: 288 | '@parcel/watcher': 2.5.1 289 | 290 | source-map-js@1.2.1: {} 291 | 292 | to-regex-range@5.0.1: 293 | dependencies: 294 | is-number: 7.0.0 295 | optional: true 296 | -------------------------------------------------------------------------------- /release-please-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "last-release-sha": "a7d34f008b3f69a781600b2ec79deaf20e0f755d", 3 | "draft-pull-request": true, 4 | "packages": { 5 | ".": { 6 | "package-name": "", 7 | "release-type": "node" 8 | } 9 | }, 10 | "changelog-sections": [ 11 | { "type": "feat", "section": "Features" }, 12 | { "type": "feature", "section": "Features" }, 13 | { "type": "fix", "section": "Bug Fixes" }, 14 | { "type": "perf", "section": "Performance Improvements" }, 15 | { "type": "revert", "section": "Reverts" }, 16 | { "type": "refactor", "section": "Code Refactoring" }, 17 | { "type": "docs", "section": "Documentation", "hidden": true }, 18 | { "type": "style", "section": "Styles", "hidden": true }, 19 | { "type": "chore", "section": "Miscellaneous Chores", "hidden": true }, 20 | { "type": "test", "section": "Tests", "hidden": true }, 21 | { "type": "build", "section": "Build system & distribution", "hidden": false }, 22 | { "type": "ci", "section": "Continuous Integration", "hidden": true } 23 | ], 24 | "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" 25 | } 26 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "local>catppuccin/renovate-config" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /src/catppuccin-admonish.scss: -------------------------------------------------------------------------------- 1 | @use "sass:color"; 2 | @use "sass:list"; 3 | @use "sass:map"; 4 | @use "@catppuccin/palette/scss/catppuccin" as catppuccin; 5 | 6 | @mixin level($palette, $classes, $color) { 7 | :is(.admonition):is(#{$classes}) { 8 | border-color: #{map.get($palette, $color)}; 9 | } 10 | :is(#{$classes}) > :is(.admonition-title, summary.admonition-title) { 11 | background-color: #{color.change(map.get($palette, $color), $alpha: 0.2)}; 12 | } 13 | :is(#{$classes}) > :is(.admonition-title, summary.admonition-title)::before { 14 | background-color: #{map.get($palette, $color)}; 15 | } 16 | } 17 | 18 | $mappings: ( 19 | "yellow": ( 20 | ".admonish-hint", 21 | ".admonish-important", 22 | ".admonish-tip", 23 | ), 24 | "flamingo": ( 25 | ".admonish-abstract", 26 | ".admonish-summary", 27 | ".admonish-tldr", 28 | ), 29 | "mauve": ( 30 | ".admonish-example", 31 | ), 32 | "sky": ( 33 | ".admonish-info", 34 | ".admonish-todo", 35 | ), 36 | "green": ( 37 | ".admonish-check", 38 | ".admonish-done", 39 | ".admonish-success", 40 | ), 41 | "blue": ( 42 | ".admonish-note", 43 | ), 44 | "peach": ( 45 | ".admonish-attention", 46 | ".admonish-caution", 47 | ".admonish-warning", 48 | ), 49 | "teal": ( 50 | ".admonish-faq", 51 | ".admonish-help", 52 | ".admonish-question", 53 | ), 54 | "red": ( 55 | ".admonish-bug", 56 | ".admonish-danger", 57 | ".admonish-error", 58 | ".admonish-fail", 59 | ".admonish-failure", 60 | ".admonish-missing", 61 | ), 62 | "pink": ( 63 | ".admonish-cite", 64 | ".admonish-quote", 65 | ), 66 | ); 67 | 68 | @mixin main($palette) { 69 | @each $color, $classes in $mappings { 70 | @include level($palette, $classes, $color); 71 | } 72 | } 73 | 74 | @each $flavor, $colors in catppuccin.$palette { 75 | .#{$flavor} { 76 | @include main($colors); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/catppuccin-alerts.scss: -------------------------------------------------------------------------------- 1 | @use "sass:map"; 2 | @use "@catppuccin/palette/scss/catppuccin" as catppuccin; 3 | 4 | @each $flavor, $colors in catppuccin.$palette { 5 | .#{$flavor} { 6 | .mdbook-alerts-note { 7 | --mdbook-alerts-color: #{map.get($colors, "blue")}; 8 | } 9 | .mdbook-alerts-tip { 10 | --mdbook-alerts-color: #{map.get($colors, "green")}; 11 | } 12 | .mdbook-alerts-important { 13 | --mdbook-alerts-color: #{map.get($colors, "mauve")}; 14 | } 15 | .mdbook-alerts-warning { 16 | --mdbook-alerts-color: #{map.get($colors, "yellow")}; 17 | } 18 | .mdbook-alerts-caution { 19 | --mdbook-alerts-color: #{map.get($colors, "red")}; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/catppuccin.scss: -------------------------------------------------------------------------------- 1 | @use "sass:map"; 2 | @use "@catppuccin/palette/scss/catppuccin" as catppuccin; 3 | @use "@catppuccin/highlightjs/sass/_theme" as hljs; 4 | 5 | // filters taken from https://github.com/catppuccin/userstyles/blob/main/docs/guide/images-and-svgs.md#non-svg-images-or-many-img-elements-with-external-svgs 6 | $filters: ( 7 | latte: ( 8 | "subtext0": brightness(0) saturate(100%) invert(47%) sepia(6%) 9 | saturate(1263%) hue-rotate(195deg) brightness(90%) contrast(81%), 10 | "blue": brightness(0) saturate(100%) invert(30%) sepia(80%) saturate(1850%) 11 | hue-rotate(209deg) brightness(94%) contrast(105%), 12 | ), 13 | frappe: ( 14 | "subtext0": brightness(0) saturate(100%) invert(82%) sepia(6%) 15 | saturate(1287%) hue-rotate(192deg) brightness(86%) contrast(85%), 16 | "blue": brightness(0) saturate(100%) invert(68%) sepia(16%) saturate(1070%) 17 | hue-rotate(185deg) brightness(96%) contrast(95%), 18 | ), 19 | macchiato: ( 20 | "subtext0": brightness(0) saturate(100%) invert(75%) sepia(18%) 21 | saturate(361%) hue-rotate(190deg) brightness(91%) contrast(86%), 22 | "blue": brightness(0) saturate(100%) invert(67%) sepia(17%) saturate(1007%) 23 | hue-rotate(183deg) brightness(99%) contrast(94%), 24 | ), 25 | mocha: ( 26 | "subtext0": brightness(0) saturate(100%) invert(84%) sepia(9%) 27 | saturate(767%) hue-rotate(192deg) brightness(84%) contrast(84%), 28 | "blue": brightness(0) saturate(100%) invert(68%) sepia(18%) saturate(951%) 29 | hue-rotate(180deg) brightness(98%) contrast(100%), 30 | ), 31 | ); 32 | 33 | @each $flavor, $colors in catppuccin.$palette { 34 | .#{$flavor} { 35 | @include hljs.highlights($flavor); 36 | 37 | // Each heading is technically a link but 38 | // we don't want to highlight it as `blue` 39 | :is(h1, h2, h3, h4, h5, h6) { 40 | a code { 41 | color: map.get($colors, "text"); 42 | } 43 | } 44 | a code { 45 | color: map.get($colors, "blue"); 46 | } 47 | code { 48 | color: map.get($colors, "text"); 49 | background: map.get($colors, "mantle"); 50 | } 51 | blockquote { 52 | blockquote { 53 | border-top: 0.1em solid map.get($colors, "surface2"); 54 | border-bottom: 0.1em solid map.get($colors, "surface2"); 55 | } 56 | } 57 | hr { 58 | border-color: map.get($colors, "surface2"); 59 | border-style: solid; 60 | } 61 | del { 62 | color: map.get($colors, "overlay2"); 63 | } 64 | .ace_gutter { 65 | color: map.get($colors, "overlay1"); 66 | background: map.get($colors, "mantle"); 67 | } 68 | .ace_gutter-active-line.ace_gutter-cell { 69 | color: map.get($colors, "pink"); 70 | background: map.get($colors, "mantle"); 71 | } 72 | .tooltiptext { 73 | background: map.get($colors, "mantle"); 74 | color: map.get($colors, "text"); 75 | } 76 | } 77 | } 78 | 79 | @each $flavor, $colors in catppuccin.$palette { 80 | .#{$flavor} { 81 | --bg: #{map.get($colors, "base")}; 82 | --fg: #{map.get($colors, "text")}; 83 | --sidebar-bg: #{map.get($colors, "mantle")}; 84 | --sidebar-fg: #{map.get($colors, "text")}; 85 | --sidebar-non-existant: #{map.get($colors, "overlay0")}; 86 | --sidebar-active: #{map.get($colors, "blue")}; 87 | --sidebar-spacer: #{map.get($colors, "overlay0")}; 88 | --scrollbar: #{map.get($colors, "overlay0")}; 89 | --icons: #{map.get($colors, "overlay0")}; 90 | --icons-hover: #{map.get($colors, "overlay2")}; 91 | --links: #{map.get($colors, "blue")}; 92 | --inline-code-color: #{map.get($colors, "text")}; 93 | --theme-popup-bg: #{map.get($colors, "mantle")}; 94 | --theme-popup-border: #{map.get($colors, "overlay0")}; 95 | --theme-hover: #{map.get($colors, "surface0")}; 96 | --quote-bg: #{map.get($colors, "mantle")}; 97 | --quote-border: #{map.get($colors, "crust")}; 98 | --table-border-color: #{map.get($colors, "surface0")}; 99 | --table-header-bg: #{map.get($colors, "mantle")}; 100 | --table-alternate-bg: #{map.get($colors, "mantle")}; 101 | --searchbar-border-color: #{map.get($colors, "surface0")}; 102 | --searchbar-bg: #{map.get($colors, "mantle")}; 103 | --searchbar-fg: #{map.get($colors, "text")}; 104 | --searchbar-shadow-color: #{map.get($colors, "crust")}; 105 | --searchresults-header-fg: #{map.get($colors, "text")}; 106 | --searchresults-border-color: #{map.get($colors, "surface0")}; 107 | --searchresults-li-bg: #{map.get($colors, "base")}; 108 | --search-mark-bg: #{map.get($colors, "peach")}; 109 | --warning-border: #{map.get($colors, "peach")}; 110 | --color-scheme: #{if($flavor == "latte", "light", "dark")}; 111 | --copy-button-filter: #{map.get($filters, $flavor, "subtext0")}; 112 | --copy-button-filter-hover: #{map.get($filters, $flavor, "blue")}; 113 | } 114 | } 115 | --------------------------------------------------------------------------------