From 940b40688a7cf595eee061b696187e2fe4a578e2 Mon Sep 17 00:00:00 2001 From: Jieiku Date: Mon, 22 May 2023 22:31:34 -0700 Subject: Json-Index and config.toml optional --- sass/include/_nav.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sass/include/_nav.scss') diff --git a/sass/include/_nav.scss b/sass/include/_nav.scss index 08f1ec1..f3a9b29 100644 --- a/sass/include/_nav.scss +++ b/sass/include/_nav.scss @@ -106,7 +106,7 @@ footer nav { margin: var(--s2) 0 var(--s1); } div { - margin: auto; // keeps top menu/search centered in mobile view + margin: auto // keeps top menu/search centered in mobile view } } } -- cgit v1.3.1 From 2d0788c3981328f1fbd9de4274d2925bf9586e03 Mon Sep 17 00:00:00 2001 From: Jieiku Date: Mon, 22 May 2023 22:39:16 -0700 Subject: Add multi-lingual Support --- config.toml | 173 +++-- content/_index.fr.md | 4 + content/overview-abridge.fr.md | 26 + content/overview-code-blocks.fr.md | 295 ++++++++ content/overview-embedded-vimeo.fr.md | 29 + content/overview-embedded-youtube.fr.md | 28 + content/overview-images/index.fr.md | 107 +++ content/overview-markdown-and-style.fr.md | 286 ++++++++ content/overview-markdown-and-style.md | 2 +- content/overview-math.fr.md | 111 +++ content/overview-rich-content/index.fr.md | 82 +++ content/pages/about.fr.md | 21 + content/pages/contact.fr.md | 7 + content/pages/privacy.fr.md | 15 + content/posts/_index.fr.md | 4 + sass/fonts/_Lato.scss | 17 - sass/include/_nav.scss | 21 + static/font/Lato-Bold.woff2 | Bin 23040 -> 0 bytes static/font/Lato-Italic.woff2 | Bin 24408 -> 0 bytes static/font/Lato.woff2 | Bin 23580 -> 0 bytes static/lunr.da.js | 280 ++++++++ static/lunr.de.js | 380 ++++++++++ static/lunr.du.js | 444 ++++++++++++ static/lunr.es.js | 595 ++++++++++++++++ static/lunr.fi.js | 536 +++++++++++++++ static/lunr.fr.js | 698 +++++++++++++++++++ static/lunr.hu.js | 561 +++++++++++++++ static/lunr.it.js | 612 +++++++++++++++++ static/lunr.jp.js | 118 ++++ static/lunr.no.js | 253 +++++++ static/lunr.pt.js | 566 +++++++++++++++ static/lunr.ro.js | 554 +++++++++++++++ static/lunr.ru.js | 387 +++++++++++ static/lunr.stemmer.support.js | 295 ++++++++ static/lunr.sv.js | 252 +++++++ static/lunr.tr.js | 1070 +++++++++++++++++++++++++++++ static/lunr.zh.js | 156 +++++ static/search.js | 4 +- templates/404.html | 6 +- templates/base.html | 56 +- templates/categories/list.html | 2 +- templates/contact.fr.html | 49 ++ templates/index.html | 6 +- templates/macros/head.html | 17 +- templates/macros/macros.html | 30 +- templates/macros/social.html | 97 ++- templates/page.html | 2 +- templates/posts.html | 6 +- templates/tags/list.html | 2 +- 49 files changed, 9092 insertions(+), 170 deletions(-) create mode 100644 content/_index.fr.md create mode 100644 content/overview-abridge.fr.md create mode 100644 content/overview-code-blocks.fr.md create mode 100644 content/overview-embedded-vimeo.fr.md create mode 100644 content/overview-embedded-youtube.fr.md create mode 100644 content/overview-images/index.fr.md create mode 100644 content/overview-markdown-and-style.fr.md create mode 100644 content/overview-math.fr.md create mode 100644 content/overview-rich-content/index.fr.md create mode 100644 content/pages/about.fr.md create mode 100644 content/pages/contact.fr.md create mode 100644 content/pages/privacy.fr.md create mode 100644 content/posts/_index.fr.md delete mode 100644 sass/fonts/_Lato.scss delete mode 100644 static/font/Lato-Bold.woff2 delete mode 100644 static/font/Lato-Italic.woff2 delete mode 100644 static/font/Lato.woff2 create mode 100644 static/lunr.da.js create mode 100644 static/lunr.de.js create mode 100644 static/lunr.du.js create mode 100644 static/lunr.es.js create mode 100644 static/lunr.fi.js create mode 100644 static/lunr.fr.js create mode 100644 static/lunr.hu.js create mode 100644 static/lunr.it.js create mode 100644 static/lunr.jp.js create mode 100644 static/lunr.no.js create mode 100644 static/lunr.pt.js create mode 100644 static/lunr.ro.js create mode 100644 static/lunr.ru.js create mode 100644 static/lunr.stemmer.support.js create mode 100644 static/lunr.sv.js create mode 100644 static/lunr.tr.js create mode 100644 static/lunr.zh.js create mode 100644 templates/contact.fr.html (limited to 'sass/include/_nav.scss') diff --git a/config.toml b/config.toml index e4cb885..09a7c0d 100644 --- a/config.toml +++ b/config.toml @@ -1,29 +1,63 @@ # do NOT include a trailing slash on the base URL for web urls base_url = "https://abridge.netlify.app" #base_url = "/home/jieiku/.dev/abridge/public/" # Usable site directly from disk, also set in [extra] uglyurls = true -title = "Abridge" -description = "Abridge is a fast and lightweight Zola theme using semantic html, abridge.css class-light CSS, and No Mandatory JS." default_language = "en" compile_sass = true minify_html = false +build_search_index = true + +title = "Abridge" +description = "Abridge is a fast and lightweight Zola theme using semantic html, abridge.css class-light CSS, and No Mandatory JS." generate_feed = true -feed_filename = "atom.xml" -output_dir = "public" -#ignored_content = ["*.{graphml,xlsx}", "temp.*"] -#hard_link_static = false # set to true to hard link instead of copying, useful for very large files. taxonomies = [ {name = "categories", feed = true}, {name = "tags", feed = true}, ] +#feed_filename = "atom.xml" +#output_dir = "public" +#ignored_content = ["*.{graphml,xlsx}", "temp.*"] +#hard_link_static = false # set to true to hard link instead of copying, useful for very large files. + #theme = "abridge" +[languages.fr] +title = "Abridge" +description = "Abridge est un thème Zola rapide et léger utilisant le html sémantique, le CSS abridge.css class-light et aucun JS obligatoire." +generate_feed = true build_search_index = true +taxonomies = [ + {name = "categories", feed = true}, + {name = "tags", feed = true}, +] + +[languages.fr.translations] +flag = "🇫🇷" +date_locale = "fr_FR" +Search = "Recherche" +Recent_Posts = "Articles Récents" +Index = "Indice" +Powered_by = "Propulsé" +and = "et" +About = "À propos" +Posts = "Articles" +Categories = "Catégories" +Tags = "Mots-clés" +Contact = "Contact" +Privacy = "Confidentialité" +Sitemap = "Plan du site" + +#[languages.es.translations] +#flag = "🇪🇸" +#about = "Acerca de" +#posts = "Publicaciones" +#categories = "Categorías" +#tags = "Etiquetas" [search] # Options specific to elasticlunr search. index_format = "elasticlunr_json" include_title = true # include title of page/section in index -include_description = true # include description of page/section in index +include_description = false # include description of page/section in index include_content = true # include rendered content of page/section in index # truncate_content_length = 100 # Truncate at nth character. May be useful if index is getting too large. @@ -40,22 +74,14 @@ smart_punctuation = false # `...` to `…`, `"quote"` to `“curly”` uglyurls = false # if set to true then links are generated with the full path. eg https://abridge.netlify.app/index.html ############################################################################### -### meta/seo/analytic tags -### To disable title_addition but keep built in page additions eg, Posts page: "Posts | Abridge" set title_addition to an empty string -### To always set the page title exactly eg "Abridge" then comment out title_addition or set to false (not recommend, bad for SEO) +### Language +### https://www.w3schools.com/tags/ref_country_codes.asp +### https://tera.netlify.app/docs#date ############################################################################### - -language_code = "en-US" -title_separator = "|" # Separator between title and title_addition, set as |, -, _, etc -title_addition = "Fast & Lightweight Zola Theme" # a default value for title addition -author = "Jake G" # Put Your Name here -keywords = "Abridge, Abridge.css, Zola, Theme, Zola Theme, getzola, Semantic Html, Fast, lightweight" # used for the primary site index -banner = "banner.png" # Used as default image for OpenGraph/Twitter if page specific image is undefined. -twitter = "your-user-name" # for SEO: twitter:site and twitter:creator -google = "Your Google Site verification code." -bing = "Your Bing Site verification code." -seo = true # enable or disable seo-related meta tags: opengraph, facebook, twitter - +date_locale = "en_US" +flag.en = "🇬🇧" +flag.fr = "🇫🇷" +#flag.es = "🇪🇸" ############################################################################### ### Layout & Format @@ -64,6 +90,19 @@ seo = true # enable or disable seo-related meta tags: opengraph, facebook, twit ### divider: " " "·" "•" ############################################################################### +menu = [ + {url = "about", name = "About", slash = true, blank = false}, + {url = "posts", name = "Posts", slash = true, blank = false}, + {url = "categories", name = "Categories", slash = true, blank = false}, + {url = "tags", name = "Tags", slash = true, blank = false}, +] +menu_footer = [ + {url = "about", name = "About", slash = true, blank = false}, + {url = "contact", name = "Contact", slash = true, blank = false}, + {url = "privacy", name = "Privacy", slash = true, blank = false}, + {url = "sitemap.xml", name = "Sitemap", slash = false, blank = true}, +] + recent = true # TOC / index recent_items = 9 @@ -86,18 +125,52 @@ sitedesc = false # enables or disables the display of the site description below headhr = false # show or hide horizontal rule below header foothr = true # show or hide horizontal rule above footer -menu = [ - {url = "/about/", name = "About", slash = true, blank = false}, - {url = "/posts/", name = "Posts", slash = true, blank = false}, - {url = "/categories/", name = "Categories", slash = true, blank = false}, - {url = "/tags/", name = "Tags", slash = true, blank = false}, -] -menu_footer = [ - {url = "/about/", name = "About", slash = true, blank = false}, - {url = "/contact/", name = "Contact", slash = true, blank = false}, - {url = "/privacy/", name = "Privacy", slash = true, blank = false}, - {url = "/sitemap.xml", name = "Sitemap", slash = false, blank = true}, -] + +############################################################################### +### meta/seo/analytic tags +### To disable title_addition but keep built in page additions eg, Posts page: "Posts | Abridge" set title_addition to an empty string +### To always set the page title exactly eg "Abridge" then comment out title_addition or set to false (not recommend, bad for SEO) +############################################################################### + +title_separator = "|" # Separator between title and title_addition, set as |, -, _, etc +title_addition = "Fast & Lightweight Zola Theme" # a default value for title addition +author = "Jake G" # Put Your Name here +keywords = "Abridge, Abridge.css, Zola, Theme, Zola Theme, getzola, Semantic Html, Fast, lightweight" # used for the primary site index +banner = "banner.png" # Used as default image for OpenGraph/Twitter if page specific image is undefined. +twitter_meta = "your-user-name" # for SEO: twitter:site and twitter:creator +google = "Your Google Site verification code." +bing = "Your Bing Site verification code." +seo = true # enable or disable seo-related meta tags: opengraph, facebook, twitter + + +############################################################################### +### Footer social links; these are used in macros/social.html +### https://github.com/Jieiku/abridge/blob/master/templates/macros/social.html +############################################################################### + +feed = true # this adds the RSS feed icon in the footer. +mail_encode = true # This obfuscates your email address, javascript is used to decode it at page load. +mail = "name@example.com" +mastodon = "@your-user-name" +element = "matrix.example.com" +buymeacoffee = "your-user-name" +discord = "your-discord" # Everything after https://discord.com/ eg: invite/my-server *or* servers/my-server-id +twitter = "your-user-name" +facebook = "your-user-name" +linkedin = "your-user-name" +gitlab = "your-user-name" +github = "your-user-name" +codeberg = "your-user-name" # Everything after https://codeberg.org/ eg: username *or* username/repository +github_sponsor = "your-user-name" +bitbucket = "your-user-name" +python = "your-user-name" +docker = "your-user-name" +stack = "your-user-name" +instagram = "your-user-name" +pinterest = "your-user-name" +twitch = "your-user-name" +youtube = "channel/your-channel-id" +researchgate = "your-profile-id" ############################################################################### @@ -173,38 +246,6 @@ favicon16 = "favicon-16x16.png" # favicon-16x16.png #icon_author = "svgs fa-solid fa-pen-fancy" # displayed in metadata on index and below title on page. -############################################################################### -### Footer social links; these are used in macros/social.html -### https://github.com/Jieiku/abridge/blob/master/templates/macros/social.html -############################################################################### - -#[extra.social] -#feed = true # this adds the RSS feed icon in the footer. -#mail_encode = true # This obfuscates your email address, javascript is used to decode it at page load. -#mail = "name@example.com" -#mastodon = "@your-user-name" -#element = "matrix.example.com" -#matrix = "matrix.example.com" -#buymeacoffee = "your-user-name" -#discord = "your-discord" # Everything after https://discord.com/ eg: invite/my-server *or* servers/my-server-id -#twitter = "your-user-name" -#facebook = "your-user-name" -#linkedin = "your-user-name" -#gitlab = "your-user-name" -#github = "your-user-name" -#codeberg = "your-user-name" # Everything after https://codeberg.org/ eg: username *or* username/repository -#github_sponsor = "your-user-name" -#bitbucket = "your-user-name" -#python = "your-user-name" -#docker = "your-user-name" -#stack = "your-user-name" -#instagram = "your-user-name" -#pinterest = "your-user-name" -#twitch = "your-user-name" -#youtube = "channel/your-channel-id" -#researchgate = "your-profile-id" - - ############################################################################### ### Security Settings ### Security Headers should preferably be set by your webserver (Nginx, Apache) diff --git a/content/_index.fr.md b/content/_index.fr.md new file mode 100644 index 0000000..3511f76 --- /dev/null +++ b/content/_index.fr.md @@ -0,0 +1,4 @@ ++++ +paginate_by = 3 +sort_by = "date" ++++ diff --git a/content/overview-abridge.fr.md b/content/overview-abridge.fr.md new file mode 100644 index 0000000..d38ced9 --- /dev/null +++ b/content/overview-abridge.fr.md @@ -0,0 +1,26 @@ ++++ +title = "Abridge Zola Thème" +date = 2022-05-17 +draft = false + +[taxonomies] +categories = ["Features"] +tags = ["config"] ++++ + +Abridge est un thème Zola rapide et léger utilisant du HTML sémantique, seulement ~6kb css avant les icônes svg et la coloration syntaxique, pas de JS obligatoire, et des scores parfaits [Lighthouse](https://pagespeed.web.dev/report?url=abridge.netlify.app), [YellowLabTools](https://yellowlab.tools/), et [Observatory](https://observatory.mozilla.org/analyze/abridge.netlify.app) scores. Voici une page [de références des thèmes Zola](https://github.com/Jieiku/zola-themes-benchmarks/blob/main/README.md). + +Pour une configuration rapide, copiez le fichier config.toml du thème abrégé à la racine de votre site zola, cela vous donnera une configuration de base avec toutes les valeurs de configuration utilisées. + +Vous pouvez ensuite modifier ou commenter les valeurs de ce fichier si nécessaire. + +Vous devez également décommenter la ligne #theme = "abridge" dans votre fichier racine zola config.toml. Cela indique à votre site racine zola d'utiliser le thème abrégé dans le dossier des thèmes. + +Vous pouvez définir le nombre d'éléments qui apparaissent sur la page d'accueil en modifiant `themes\abridge\content\_index.md` le fichier et en ajustant `paginate_by = 5` + +Vous pouvez définir la largeur globale de la page en éditant `themes\abridge\sass\_variables.scss` le fichier et en ajustant ces deux lignes: + +```scss +$mw:50% !default;// largeur maximale +$mb:1200px !default;// valeur à laquelle passer de la disposition fluide à l'utilisation de la largeur maximale +``` diff --git a/content/overview-code-blocks.fr.md b/content/overview-code-blocks.fr.md new file mode 100644 index 0000000..e527251 --- /dev/null +++ b/content/overview-code-blocks.fr.md @@ -0,0 +1,295 @@ ++++ +title = "Blocs de code et thèmes" +description = "Exemple d'article présentant la coloration syntaxique et la mise en forme des blocs de code avec un thème personnalisé." +date = 2022-05-16 +draft = false + +[taxonomies] +categories = ["Features"] +tags = ["Markdown"] +[extra] +toc = true +keywords = "Code, Code Blocks, Syntax, Syntax Highlighting, Theme" ++++ + +Cet article présente différents Code Blocks permettant de comparer facilement des thèmes sublimes. + +## Blocs de codes + +Blocs de code.. ❤️ avec coloration syntaxique automatique ✨ + +Voir [les docs](https://www.getzola.org/documentation/content/syntax-highlighting/) pour les options. + +### Bloc de code en ligne + +Si nous voulons, nous pouvons aussi `spécifier le code en ligne` ce qui est utile pour `les petites choses`. + +### rust +```rust,linenos,hl_lines=3 +//! jelly-actix-web-starter - Un modèle de démarrage pour les projets actix-web qui ressemble beaucoup à Django. Évitez les trucs ennuyeux et avancez plus vite. + +use jelly::actix_web; +use mainlib; +use std::io; + +#[actix_web::main] +async fn main() -> io::Result<()> { + mainlib::main().await +} + +let context = Context::new(); +``` + +### TOML +```toml,linenos,hl_lines=3 +base_url = "https://abridge.netlify.app/" +title = "Abridge" +description = "Abridge est un thème Zola rapide et léger utilisant le HTML sémantique, le CSS abridge.css class-light et aucun JS obligatoire." +default_language = "en" +#theme = "abridge" + +build_search_index = true +minify_html = false +feed_filename = "atom.xml" +taxonomies = [ + {name = "categories", feed = true}, + {name = "tags", feed = true}, +] +``` + +### html +```html + + +
+ +Test
+ + +``` + +### javascript +```javascript +function closeSearch() {//close the search displaying the regular page. + const e = document.querySelector("main"); + e.innerHTML = window.main +} + +function goSearch() {// on enter key or search icon click display results to the page. + const e = document.querySelector("main"); + window.main || (window.main = e.innerHTML); + var t = document.getElementById("suggestions"), + n = ((ResultsClone = t.cloneNode(!0)).id = "results", document.createElement("div")), + o = 'C'EST UN SECRET POUR TOUT LE MONDE.
+Reste un moment et écoute!
+Test
+ + +``` + +## Numéros de ligne, mise en surbrillance + +```html,linenos,hl_lines=5 7-9 + + + + +Test
+ + +``` + +## Bloc de code en ligne + +Si nous voulons, nous pouvons aussi `spécifier le code en ligne` ce qui est utile pour `les petites choses`. + +# Types de liste + +## Liste ordonnée + +1. Premier élément +2. Deuxième élément +3. Troisième élément + +## Liste non ordonnée + +- Élément de liste +- Un autre article +- Et un autre article + +## Liste imbriquée + +- Fruit + - Pomme + - Orange + - Banane +- Laitier + - Lait + - Fromage + +# Autres éléments — abbr, sub, sup, kbd, mark, link + +GIF est un format d'image bitmap. + +H2O + +Xn + Yn = Zn + +Appuyez sur pour terminer la session. CTRL+ALT+Delete + +La plupart salamanders sont nocturnes et chassent les insectes, les vers et autres petites créatures. + +--- + +[^1]: La citation ci-dessus est extraite du [discours](https://www.youtube.com/watch?v=PAAkCSZUG1c) +de Rob Pike lors du Gopherfest, le 18 novembre 2015. + +[^2]: La citation est la première phrase de [la Métaphysique](https://en.wikipedia.org/wiki/Metaphysics_(Aristotle)) d'Aristotle. + +## Navs + +Le menu principal du site est créé en imbriquant la navigation sous une balise d'en-tête. Reportez-vous au haut de ce site pour un exemple. + +Si la balise de navigation se trouve sous la balise principale au lieu de la balise d'en-tête, les liens auront une bordure : + +