From ed0ae43c11285d489840a11e9d44606181422c28 Mon Sep 17 00:00:00 2001 From: apiraino Date: Sat, 6 Jun 2020 22:17:41 +0200 Subject: [PATCH] Clarify docs about adding a Sublime theme --- CONTRIBUTING.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 988853f7..6a9fdbe1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -56,11 +56,23 @@ $ cargo run --example generate_sublime synpack ../../sublime/syntaxes ../../subl ### Adding a theme A gallery containing lots of themes is located at https://tmtheme-editor.herokuapp.com/#!/editor/theme/Agola%20Dark. -More themes can be easily added to Zola, just make a PR with the wanted theme added in the `sublime_themes` directory -and run the following command from the root of the components/config: +More themes can be easily added to Zola, just make a PR with the wanted theme added in the `sublime_themes` directory. + +If you want to test Zola with a new theme, it needs to be built into the syntect file `all.themedump`. + +First build the tool to generate the syntect file: ```bash -$ cargo run --example generate_sublime themepack ../../sublime/themes ../../sublime/themes/all.themedump +$ git clone https://github.com/getzola/zola.git && cd zola/components/config +$ cargo build --example generate_sublime +``` + +copy your theme in `sublime/themes/`, then regenerate the syntect file: + +``` bash +$ ./target/debug/examples/generate_sublime themepack sublime/themes/ sublime/themes/all.themedump ``` You should see the list of themes being added. + +To test your new theme, rebuild Zola with `cargo build`.