diff --git a/book.toml b/book.toml index f2bf36d9..b68ec0c0 100644 --- a/book.toml +++ b/book.toml @@ -23,7 +23,7 @@ site-url = "/patterns/" git-repository-url = "https://github.com/rust-unofficial/patterns" git-repository-icon = "fa-github" edit-url-template = "https://github.com/rust-unofficial/patterns/edit/main/{path}" -additional-css = ["./language-picker.css"] +additional-css = ["theme/css/language-picker.css"] [output.html.fold] enable = true @@ -33,3 +33,8 @@ level = 1 editable = false # [output.linkcheck] # enable the "mdbook-linkcheck" renderer, disabled due to gh-actions + +[output.html.redirect] +# Redirects in the form of "old-path" = "new-path", where the new path +# is relative to the old path. +"functional/lenses.html" = "optics.html" diff --git a/language-picker.css b/theme/css/language-picker.css similarity index 59% rename from language-picker.css rename to theme/css/language-picker.css index 1f7d5377..1553ed68 100644 --- a/language-picker.css +++ b/theme/css/language-picker.css @@ -3,6 +3,11 @@ right: 10px; } +[dir="rtl"] #language-list { + left: 10px; + right: auto; +} + #language-list a { color: inherit; } diff --git a/theme/head.hbs b/theme/head.hbs new file mode 100644 index 00000000..8432ff2e --- /dev/null +++ b/theme/head.hbs @@ -0,0 +1,26 @@ +{{! Move to template code after fixing this issue: +https://github.com/google/mdbook-i18n-helpers/issues/70 }} + \ No newline at end of file diff --git a/theme/index.hbs b/theme/index.hbs index dd83020b..30c42d99 100644 --- a/theme/index.hbs +++ b/theme/index.hbs @@ -1,58 +1,63 @@ - -
- - -