Skip to content

Commit

Permalink
feat!: deprecate rust plugin & update sass files (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgoudham authored Sep 22, 2024
1 parent d5edace commit f705cb5
Show file tree
Hide file tree
Showing 18 changed files with 897 additions and 2,280 deletions.
801 changes: 96 additions & 705 deletions Cargo.lock

Large diffs are not rendered by default.

13 changes: 2 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "mdbook-catppuccin"
authors = ["Goudham Suresh <sgoudham@gmail.com>", "winston <hey@winston.sh>"]
description = "🎊 Soothing pastel theme for mdBook"
version = "2.2.0"
version = "3.0.0"
edition = "2021"
license = "MIT"
readme = "README.md"
Expand All @@ -12,22 +12,13 @@ include = ["/src", "/assets", "/README.md", "/LICENSE"]

[[bin]]
name = "mdbook-catppuccin"
path = "src/bin/mdbook-catppuccin.rs"

[lib]
name = "mdbook_catppuccin"
path = "src/lib.rs"
path = "src/main.rs"

[dependencies]
clap = { version = "4.4.7", features = ["cargo"] }
clap_complete = "4.4.4"
mdbook = { version = "0.4.35", default_features = false }
env_logger = "0.10.0"
log = "0.4.20"
serde_json = "1.0.108"
semver = "1.0.20"
toml_edit = "0.20.7"
version-compare = "0.1.1"

[profile.release]
lto = true
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@

## Usage

> [!IMPORTANT]
> The `mdbook-catppuccin` rust package has been deprecated. For further information
> on why this decision was made, please refer to
> [catppuccin/mdBook#107](https://github.com/catppuccin/mdBook/issues/107)
>
> Please follow the instructions below to install the Catppuccin theme for mdBook.
1. Initialise your mdBook with the theme files:

```shell
Expand All @@ -55,8 +62,8 @@

3. Download the following CSS assets from this repository to the `theme` directory:

- [catppuccin.css](src/bin/assets/catppuccin.css)
- [catppuccin-admonish.css](src/bin/assets/catppuccin-admonish.css) (**Only
- [catppuccin.css](palette/dist/catppuccin.css)
- [catppuccin-admonish.css](palette/dist/catppuccin-admonish.css) (**Only
required if you are using
[mdbook-admonish](https://github.com/tommilligan/mdbook-admonish)**)

Expand Down
7 changes: 1 addition & 6 deletions example/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@ multilingual = false
src = "src"
title = "Catppuccin's mdBook"

[preprocessor]

[preprocessor.catppuccin]
assets_version = "2.1.0" # DO NOT EDIT: Managed by `mdbook-catppuccin install`

[preprocessor.admonish]
command = "mdbook-admonish"
assets_version = "3.0.0" # do not edit: managed by `mdbook-admonish install`
assets_version = "3.0.0" # do not edit: managed by `mdbook-admonish install`

[output.html]
default-theme = "mocha"
Expand Down
2 changes: 1 addition & 1 deletion example/theme/catppuccin-admonish.css
2 changes: 1 addition & 1 deletion example/theme/catppuccin.css
6 changes: 4 additions & 2 deletions example/theme/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@
<div class="sidebar-scrollbox">
{{#toc}}{{/toc}}
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle">
<div class="sidebar-resize-indicator"></div>
</div>
</nav>

<!-- Track and set sidebar scroll position -->
Expand Down Expand Up @@ -345,4 +347,4 @@

</div>
</body>
</html>
</html>
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,11 @@
});

packages = forAllSystems (pkgs: rec {
mdbook-catppuccin = pkgs.rustPlatform.buildRustPackage rec {
mdbook-catppuccin = pkgs.rustPlatform.buildRustPackage {
pname = "mdbook-catppuccin";
inherit version;
src = pkgs.nix-gitignore.gitignoreSource [] ./.;
cargoLock.lockFile = ./Cargo.lock;

nativeBuildInputs = with pkgs; [installShellFiles];
postInstall = ''
installShellCompletion --cmd ${pname} \
--bash <($out/bin/${pname} completion bash) \
--fish <($out/bin/${pname} completion fish) \
--zsh <($out/bin/${pname} completion zsh)
'';
};
default = mdbook-catppuccin;
});
Expand Down
Loading

0 comments on commit f705cb5

Please sign in to comment.