From 0dc1b8231364cfd76b963adec2bb1354ae09ab1b Mon Sep 17 00:00:00 2001 From: Julie Kirsch Date: Wed, 27 Nov 2024 12:07:45 +0100 Subject: [PATCH] final update --- book/features/custom-launch-button.md | 39 +++++++++++++++++++--- book/features/figures/language_button.PNG | Bin 0 -> 7266 bytes 2 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 book/features/figures/language_button.PNG diff --git a/book/features/custom-launch-button.md b/book/features/custom-launch-button.md index 66e67e2..cf94a08 100644 --- a/book/features/custom-launch-button.md +++ b/book/features/custom-launch-button.md @@ -3,9 +3,9 @@ The custom launch button extension allows you to create a customizable button in the top right of your jupyter book. This may have many applications, one of them being that you can create different language versions of the book available for the user. -This section will explain how to create a "Languages" or +This section will explain how to create a "Languages" or " - button, like you might be used to seeing on just about any website. The use of the button, however, is completey customizable and may be used in many different ways. + " button, like you might be used to seeing on just about any website. The use of the button, however, is completey customizable and may be used in many different ways. ## Installation @@ -41,7 +41,24 @@ buttons: - type : dropdown label: Language - type : button - label : + icon : ... + +``` +4. Lastly you need to specifiy the items of your button. So assuming you want to have different language versions, each item will be one of the languages. + +``` +buttons: + - type : dropdown + label: Language + + - type : button + icon : ... + + items: + - label: English + url: url of branch + - label: Nederlands + url: url of branch ``` ## Setting up your repository @@ -50,7 +67,7 @@ For the implementation to your book, it is handy to create a branch for each lan You will then need to translate the content in the dutch branch to dutch which can take some time. From experience, [DeepL](https://www.deepl.com/en/translator) is a good tool for this but any AI chatbot might be helpful as well. Make sure to proofread the translation. - +Make sure to add the updated `_config.yml` and the new `_launch_buttons.yml` in all of your branches. ## Example @@ -65,4 +82,16 @@ buttons: url: https://teachbooks.github.io/files-and-folders/EN - label: Nederlands url: https://teachbooks.github.io/files-and-folders/NL -``` \ No newline at end of file +``` + +The code in the above cell is the `_launch_buttons.yml` file of a repository called "files-and-folders". The buttons created look like this: + +```{figure} figures/language_button.PNG +--- +width: 70% +name:language_button +--- +Custom Button +``` + +As you can see in the `items:` line, each dropdown option links to the branch of the repository in the respective language. \ No newline at end of file diff --git a/book/features/figures/language_button.PNG b/book/features/figures/language_button.PNG new file mode 100644 index 0000000000000000000000000000000000000000..93304229a2180a05c7837d5b44a712aecb7379da GIT binary patch literal 7266 zcmcI}RX~(m*FPoQ$S`!5%+Ph{Zjka25;8OlAl)FTI5bL!bP5iQl*EA2NQZ?bV=<28v;nU!wp`j6}t10QDp`oV%&!2EHfN!n& z`WL_tx~IOX0$TM5-4-ywvX|GEM?*s<5ZqWj0>*eR)l59m(8#?WKIlt!jDBcnv={11 z@`ipEdpU7|hEqBH7jAPddG<})(^T^=Q|9F#MLU#TguRuR!4Z6Q3M^zXU(_Vke5%;` zl8+wI%u%YdmV-1j$ArOI913z4v0TYmYG0TV#lXiZ!q+*0A)X!^BQ_ofLu@(f9eEp4 zQl6u?KZJy&maj8B_ZQjjg;j8ww+Nvsxaw{W0t#vYiU=}=@3f||q{&NTu*k&IXb@{; zkyt&LnXNq^1xzLSZ%j4#n&!f}Jb$%OE7mA=5J*Wx@+n4VE{E_zqGM`0n(Ck?j+!r7 zNqh10p9mgtrC^f30>om=FmKIbu)GRaey&G5pbL48B7my=%x~EHQ|Z>Wm6<1YF+Idn z(}KRo*|c=K60UqV!y_T_RDIlQe8Si2KA-g3OZ*P5<))Y2~`l=5s1WHfe8+Bf;)BYtsH#r>&_Z+VEaPc49_~goY zTUlz+cxAhlsWFnh*S9#aIR8{joPJ*_xKBUm+$>>N6C7l>d4FD}y{!OWxLl~a?Y6?@u}Aiy-9=j*}cq$Y^Yz)=;zi5&R4ZyhM+0$^=-yQuf2qj+SZQM z)P>NnpEwKw^`)gVV5STQ?OC|5bTd|IC7slnRw+uyH)qOiVvz~AoIgxQGs9_*^QopX zhF5U#U0B=i)Fi03MvwoWnDYQ2Xz|1?LP~3 zHVkY)eZgsHMed-yYs@-={I_bK`2}4BlMs<`t_E@qt7_+M)^+P$?>b}=3ZMYaFYIrz zhh5AspX*z}Zu_19y#2cLlhA6~Tc!lzHYwj<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