diff --git a/.gitignore b/.gitignore index 38739a5..f2ea9ba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ -__pycache__/ output/ -publishconf.py -tasks.py +public/ *.swp +*.zip diff --git a/.gitmodules b/.gitmodules index 834ebbe..da79160 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,3 @@ -[submodule "themes/Flex"] - path = themes/Flex - url = https://github.com/lpenaud/Flex/ - branch = toc-style -[submodule "plugins/pelican-toc"] - path = plugins/pelican-toc - url = https://github.com/ingwinlu/pelican-toc/ +[submodule "themes/Zulma"] + path = themes/Zulma + url = git@git.tfk-astrodome.net:Teo-CD/Zulma-Theme.git diff --git a/Makefile b/Makefile deleted file mode 100644 index 9c98540..0000000 --- a/Makefile +++ /dev/null @@ -1,75 +0,0 @@ -PY?=python3 -PELICAN?=pelican -PELICANOPTS= - -BASEDIR=$(CURDIR) -INPUTDIR=$(BASEDIR)/content -OUTPUTDIR=$(BASEDIR)/output -CONFFILE=$(BASEDIR)/pelicanconf.py -PUBLISHCONF=$(BASEDIR)/publishconf.py - - -DEBUG ?= 0 -ifeq ($(DEBUG), 1) - PELICANOPTS += -D -endif - -RELATIVE ?= 0 -ifeq ($(RELATIVE), 1) - PELICANOPTS += --relative-urls -endif - -help: - @echo 'Makefile for a pelican Web site ' - @echo ' ' - @echo 'Usage: ' - @echo ' make html (re)generate the web site ' - @echo ' make clean remove the generated files ' - @echo ' make regenerate regenerate files upon modification ' - @echo ' make publish generate using production settings ' - @echo ' make serve [PORT=8000] serve site at http://localhost:8000' - @echo ' make serve-global [SERVER=0.0.0.0] serve (as root) to $(SERVER):80 ' - @echo ' make devserver [PORT=8000] serve and regenerate together ' - @echo ' make ssh_upload upload the web site via SSH ' - @echo ' make rsync_upload upload the web site via rsync+ssh ' - @echo ' ' - @echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html ' - @echo 'Set the RELATIVE variable to 1 to enable relative urls ' - @echo ' ' - -html: - $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) - -clean: - [ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR) - -regenerate: - $(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) - -serve: -ifdef PORT - $(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -else - $(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -endif - -serve-global: -ifdef SERVER - $(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -b $(SERVER) -else - $(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -b 0.0.0.0 -endif - - -devserver: -ifdef PORT - $(PELICAN) -lr $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -else - $(PELICAN) -lr $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -endif - -publish: - $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS) - - -.PHONY: html help clean regenerate serve serve-global devserver publish \ No newline at end of file diff --git a/README.md b/README.md index f5196b6..df3679c 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,15 @@ # TFK-Blog This is the sources for my blog. -They are generated using Pelican and based on the Flex theme. +They are generated using [Zola](https://www.getzola.com) and based on custom changes of the [Zulma](https://www.getzola.org/themes/zulma/) theme. ## Prerequisites -Python dependencies : - - pelican[Markdown] - - typogrify - - beautifulsoup4 (Maybe ? Was already pulled for me) - -You can install everything by running the following command : -`sudo pip3 install pelican[Markdown] typogrify beautifulsoup4` +You only need Zola installed on your system, check the instructions [on their site](https://www.getzola.org/documentation/getting-started/installation/). ## Build -To generate the site, you have to setup the pelican project : -`pelican-quickstart` - -Then, check that the `pelicanconf.py` file has not been changed. If it has, replace it. - -You can now generate the site by running `make html` and test it on your local machine, port 8000, by running `make serve`. +To test the site locally, you can run `zola serve` at the root of the repository (After the submodule for the theme has been set up). If you run the `zola build` command, the site will be build and output in the `public` directory. ## Write diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..a418b9b --- /dev/null +++ b/config.toml @@ -0,0 +1,41 @@ +# The URL the site will be built for +base_url = "https://tfk-astrodome.net" + +title = "L'Astrodome" + +# Whether to automatically compile all Sass files in the sass directory +compile_sass = true + +# Whether to do syntax highlighting +# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola +highlight_code = true + +# Whether to build a search index to be used later on by a JavaScript library +build_search_index = true + +taxonomies = [ + {name = "categories", lang = "en"}, + {name = "categories", lang = "fr"}, + {name = "tags", lang = "en"}, + {name = "tags", lang = "fr"}, +] + +theme = "Zulma" + +generate_feed = true +default_language = "en" + +languages = [ + {code = "fr", feed = true}, +] + +[extra] +zulma_menu = [ + {url = "$BASE_URL/categories", name = "Categories"}, + {url = "$BASE_URL/tags", name = "Tags"}, + {url = "$BASE_URL/atom.xml", name = "Feed"}, + {url = "$BASE_URL/about", name = "About"}, +] +zulma_brand = {image = "$BASE_URL/images/lidar.png", text = "L'astrodome"} +zulma_title = "L'Astrodome" +zulma_theme = "darkly" diff --git a/content/_index.fr.md b/content/_index.fr.md new file mode 100644 index 0000000..8bc0069 --- /dev/null +++ b/content/_index.fr.md @@ -0,0 +1,3 @@ ++++ +sort_by = "date" ++++ diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..8bc0069 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,3 @@ ++++ +sort_by = "date" ++++ diff --git a/content/pages/about.fr.md b/content/about/about.fr.md similarity index 76% rename from content/pages/about.fr.md rename to content/about/about.fr.md index 2637fd4..52a8e46 100644 --- a/content/pages/about.fr.md +++ b/content/about/about.fr.md @@ -1,7 +1,9 @@ -Title: About -Date: 2020-05-31 19:20 -Slug: about -toc_run: false ++++ +title = "À propos" +date = 2020-05-31 +updated = 2020-10-02 +path = "fr/about" ++++ # Bienvenue ! @@ -13,12 +15,14 @@ solutions, écrits, réflexions et tout autre chose écrite qui peut intéresser Il se présente donc sous la forme d'un blog (dont vous prouvez trouver les sources [ici](https://git.tfk-astrodome.net/Teo-CD/TFK-Blog)) pas forcément structuré ou plannifié, -mais (idéalement) au moins organisé par catégorie/thème ! +mais (idéalement) au moins organisé par catégorie/thème ! + +Ce blog est créé grâce à [Zola](https://www.getzola.org/) et utilise le thème [Zulma](https://www.getzola.org/themes/zulma/) modifié par mes soins. ## Ce bonhomme Moi c'est trotFunky (Abrégé `trot`. Ou alors Téo, mais trotFunky c'est bien). -Jeune français de 98 (plus pratique que garder un âge à jour), +Jeune français de 1998 (plus pratique que garder un âge à jour), (bientôt) ingénieur diplômé de l'[Institut Polytechnique de Paris](https://www.ip-paris.fr/) qui s'amuse à bidouiller, programmer et faire du jeu de rôle. Développeur bas-niveau du club de robotique INTech pendant trois ans. Visiblement, blogger. diff --git a/content/pages/about.md b/content/about/about.md similarity index 84% rename from content/pages/about.md rename to content/about/about.md index 1b1909b..c4bea4e 100644 --- a/content/pages/about.md +++ b/content/about/about.md @@ -1,8 +1,9 @@ -Title: About -Date: 2020-05-31 19:41 -Slug: about -lang: en -toc_run: false ++++ +title = "About" +date = 2020-05-31 +updated = 2020-10-02 +path = "about" ++++ # Welcome ! @@ -16,6 +17,9 @@ Thus I chose to make it a blog (the sources of which can be found [here](https://git.tfk-astrodome.net/Teo-CD/TFK-Blog)) which might not be well structued or planned but -- idealy -- at least organized by category/theme ! +This blog is created with [Zola](https://www.getzola.org/) an uses a custom version of the [Zulma](https://www.getzola.org/themes/zulma/) theme. + + ## This guy I'm trotFunky (Shortened `trot`. Or Téo, but trotFunky is alright). I'm a French guy, diff --git a/content/articles/First-Steps.fr.md b/content/articles/First-Steps.fr.md index b2ac9eb..649dc74 100644 --- a/content/articles/First-Steps.fr.md +++ b/content/articles/First-Steps.fr.md @@ -1,9 +1,13 @@ -Title: Premiers pas -Date: 2020-05-31 20:40 -Category: Blog -Tags: -Slug: first-steps -Summary: C'est le début d'une nouvelle aventure ! ++++ +title = "Premiers pas" +date = 2020-05-31 +[taxonomies] +categories = ["Blog"] ++++ + +C'est le début d'une nouvelle aventure ! + + Cela fait longtemps que ça me trottait en tête mais le moment est venu : il est temps de se mettre à écrire ! J'ai plusieurs fois eu des problèmes que j'ai du rechercher plusieurs diff --git a/content/articles/First-Steps.md b/content/articles/First-Steps.md index 408a30a..bc75d70 100644 --- a/content/articles/First-Steps.md +++ b/content/articles/First-Steps.md @@ -1,10 +1,13 @@ -Title: First steps -Date: 2020-05-31 20:45 -Category: Blog -Tags: -lang: en -Slug: first-steps -Summary: This is the start of a new adventure ! ++++ +title = "First steps" +date = 2020-05-31 +[taxonomies] +categories = ["Blog"] ++++ + +This is the start of a new adventure ! + + Starting writing has been on my list for a long time : the time is now ! Multiple times I had to search for a solution to the same problem twice or even wanted to keep a record diff --git a/content/articles/Jumping-into-bspwm.fr.md b/content/articles/Jumping-into-bspwm.fr.md index d1d5977..e50eb26 100644 --- a/content/articles/Jumping-into-bspwm.fr.md +++ b/content/articles/Jumping-into-bspwm.fr.md @@ -1,15 +1,17 @@ -Title: À l'aventure avec bspwm -Date: 21-06-2020 00:11 -Modified: 21-06-2020 17:50 -Category: *nix -Tags: Desktop, WM, bspwm -Lang: fr -Slug: jumping-into-bspwm -Status: draft -Summary: Il était temps que je me frotte à un gestionnaire de fenêtre "en tuiles", je me suis donc lancé avec bspwm. ++++ +title = "À l'aventure avec bspwm" +date = 2020-06-21 +updated = 2020-06-21 +draft = true +[taxonomies] +categories = ["*nix"] +tags = ["Desktop", "WM", "bspwm"] ++++ Il était temps que je me frotte à un gestionnaire de fenêtre "en tuiles", je me suis donc lancé avec bspwm. + + # Pourquoi ? Ça fait bientôt 5 ans que Linux a prit de l'importance comme mon OS quotidien, et de plus en plus ces trois dernières années. Pendant tout ce temps mon environnement de bureau (**DE**) principal a été GNOME : l'option de base de Debian, plutôt commun et que j'ai suffisamment personnalisé pour en faire mon "chez moi". Du coup pourquoi changer ? diff --git a/content/articles/_index.fr.md b/content/articles/_index.fr.md new file mode 100644 index 0000000..7bf33d8 --- /dev/null +++ b/content/articles/_index.fr.md @@ -0,0 +1,5 @@ ++++ +title = "La grosse liste des articles!" +sort_by = "date" +transparent = true ++++ diff --git a/content/articles/_index.md b/content/articles/_index.md new file mode 100644 index 0000000..7eb6fce --- /dev/null +++ b/content/articles/_index.md @@ -0,0 +1,5 @@ ++++ +title = "The great list of all the articles!" +sort_by = "date" +transparent = true ++++ diff --git a/content/extras/custom.css b/content/extras/custom.css deleted file mode 100644 index 94cb732..0000000 --- a/content/extras/custom.css +++ /dev/null @@ -1,3 +0,0 @@ -aside nav ul li { - text-transform: none; -} diff --git a/new_article.sh b/new_article.sh index b0c885d..b193fee 100755 --- a/new_article.sh +++ b/new_article.sh @@ -7,8 +7,9 @@ append_to_metadata() { if [ $# -eq 2 ]; then echo -n "$2 : " read answer + option="$(echo "$2" | tr '[:upper:]' '[:lower:]')" if [ -n "$answer" ]; then - echo "$2: ""$answer" >> "content/articles/$1" + echo "$option = ""$answer" >> "content/articles/$1" else echo "Empty answer, nothing was appended" fi @@ -18,21 +19,27 @@ append_to_metadata() { echo -n "Filename : " read filename +echo "+++" > content/articles/"$filename" + +echo "The title must be between quotes" + append_to_metadata "$filename" "Title" append_to_metadata "$filename" "Date" -append_to_metadata "$filename" "Category" - -append_to_metadata "$filename" "Tags" - -append_to_metadata "$filename" "Lang" +append_to_metadata "$filename" "Draft" append_to_metadata "$filename" "Slug" -append_to_metadata "$filename" "Summary" +echo "[taxonomies]" >> content/articles/"$filename" -echo -e "\n" >> content/articles/"$filename" +echo "Categories and tag must be formatted as follows : [\"element1\",\"element2\"]" + +append_to_metadata "$filename" "Categories" + +append_to_metadata "$filename" "Tags" + +echo -e "+++\n\n" >> content/articles/"$filename" # Try to get the default editor from alternatives EDITOR=${EDITOR:-$(update-alternatives --list editor | head -n1)} diff --git a/pelicanconf.py b/pelicanconf.py deleted file mode 100644 index da5da46..0000000 --- a/pelicanconf.py +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- # -from __future__ import unicode_literals -from datetime import datetime - -AUTHOR = 'trotFunky' -SITENAME = "L'Astrodome" -SITETITLE = "L'Astrodome" -SITESUBTITLE = "Un point d'observation de mon univers" -SITELOGO = "/images/Profile.png" -SITEURL = 'https://tfk-astrodome.net' - -CC_LICENSE = { - 'name': 'Creative Commons Attribution-ShareAlike', - 'version': '4.0', - 'slug': 'by-sa' -} -COPYRIGHT_YEAR = datetime.now().year - -PATH = 'content' -PLUGIN_PATHS = ["plugins"] -STATIC_PATHS = ['extras/custom.css','images/'] - -# tell pelican where it should copy that file to in your output folder -EXTRA_PATH_METADATA = { -'extras/custom.css': {'path': 'static/custom.css'}, -} - -CUSTOM_CSS = 'static/custom.css' - -PLUGINS = ["pelican-toc"] - -TIMEZONE = 'Europe/Paris' - -DEFAULT_LANG = 'fr' - -# Feed generation is usually not desired when developing -FEED_ALL_ATOM = 'feeds/all.atom.xml' -CATEGORY_FEED_ATOM = 'feeds/{slug}.atom.xml' -TRANSLATION_FEED_ATOM = None -AUTHOR_FEED_ATOM = None -AUTHOR_FEED_RSS = None - -# Blogroll -LINKS = (("Categories", SITEURL+'/categories.html'),) - -# Social widget -SOCIAL = (('rss', SITEURL+'/feeds/all.atom.xml'),) - -DEFAULT_PAGINATION = False - -# Uncomment following line if you want document-relative URLs when developing -#RELATIVE_URLS = True - -MAIN_MENU = False - -LOCALE = ('fr_FR', 'en_US') - -TYPOGRIFY = True -THEME = "themes/Flex" - -# Flex theme - -TOC_FLOAT = 'right' -TOC = { - 'TOC_HEADERS' : '^h[1-6]', - 'TOC_RUN' : 'true', - 'TOC_INCLUDE_TITLE' : 'false', -} - -THEME_COLOR_AUTO_DETECT_BROWSER_PREFERENCE = True -THEME_COLOR_ENABLE_USER_OVERRIDE = True diff --git a/plugins/pelican-toc b/plugins/pelican-toc deleted file mode 160000 index b98d89b..0000000 --- a/plugins/pelican-toc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b98d89b2cfa857c59b647ef0983a470408d6d8cd diff --git a/content/images/Profile.png b/static/images/lidar.png similarity index 100% rename from content/images/Profile.png rename to static/images/lidar.png diff --git a/themes/Flex b/themes/Flex deleted file mode 160000 index 077d479..0000000 --- a/themes/Flex +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 077d47986154e82c97bebff5c9fb280d544887fa diff --git a/themes/Zulma b/themes/Zulma new file mode 160000 index 0000000..39cffce --- /dev/null +++ b/themes/Zulma @@ -0,0 +1 @@ +Subproject commit 39cffcefc7b094932dbf0a5fbbf1a54f40ba6194