diff --git a/.gitignore b/.gitignore index 47d7a92..e7f292b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ node_modules site NOTES.md + +theme/*.html diff --git a/.prettierignore b/.prettierignore index 0a353ed..aef3f9f 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,2 @@ -**/*.md \ No newline at end of file +**/*.md +theme/*.html \ No newline at end of file diff --git a/Makefile b/Makefile index 4bfdebc..9da968e 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,14 @@ # Build the website -build: +site/index.html: docs/** theme/** theme/main.html mkdocs build +theme/main.html: haml/main.haml + haml render $< > $@.tmp + cat $@.tmp > $@ + rm $@.tmp + # Serve the website at http://127.0.0.1:8000/~tasiaiso/ -serve: +serve: theme/main.html mkdocs serve -w theme format: format-code format-markdown diff --git a/docs/index.md b/docs/index.md index 0f4a541..86485e6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -12,7 +12,7 @@ > - a Discord or Telegram bot; > - anything else really! Automation, systems administrations, etc. > -> Feel free to send me an email at (my username)@proton.me - Thanks! +> Feel free to send me an email at `(my username)@proton.me` - Thanks! this is my personal website. @@ -83,6 +83,7 @@ If you like my posts, please consider supporting me on [Liberapay](https://liber - move build scripts to a Makefile - add johnvertisement - add linux badge +- use haml for the main template ### v1.0.1 (2024-05-18) diff --git a/haml/main.haml b/haml/main.haml new file mode 100644 index 0000000..4a8b08e --- /dev/null +++ b/haml/main.haml @@ -0,0 +1,145 @@ + +%html(lang="en_US") + %head + %meta(charset="UTF-8") + %meta(name="viewport" content="width=device-width, initial-scale=1.0") + %link(rel="icon" type="image/png" href="/~tasiaiso/favicon.png") + %link(rel="icon" type="image/x-icon" href="/~tasiaiso/favicon.ico") + + %link(rel="stylesheet" href="/~tasiaiso/gruvbox-dark.css") + %link(rel="stylesheet" href="/~tasiaiso/style.css") + + %title {% if page.title %}{{ page.title }} - {% endif %}{{ config.site_name }} + + -# + %meta(name="keywords" content="programming, technical writing") + %meta(name="author" content="Tasia Iso") + %link(rel="me" href="https://kitsunes.club/@tasiaiso") + %meta(name="ICBM" content="44.6, 4.4") + + -# + %body + -# Link to root + {% if not page.is_homepage %} + %a(href="/") root + %br + %br + {% endif %} + + pages + {% if nav|length>1 %} + -# Categories / Directories + %ul + {% for nav_item in nav %} + {% if nav_item.children %} + %li + {{ nav_item.title }} + -# Posts / Files + %ul + {% for nav_item in nav_item.children %} + {% if not nav_item.meta.unlisted %} + -# TODO + %li(class="{% if nav_item.active %}current{% endif %}") + %a(href="{{ nav_item.url|url }}") + {{ nav_item.meta.date }} + {% if nav_item.meta.date %} - {% endif %} + {{ nav_item.title }} + {% endif %} + {% endfor %} + {% else %} + -# TODO + %li(class="{% if nav_item.active %}current{% endif %}") + %a(href="{{ nav_item.url|url }}") {{ nav_item.title }} + {% endif %} + {% endfor %} + {% endif %} + + {% if not page.is_homepage %} + table of contents + %ul + {% for toc_item in page.toc %} + %li + %a(href="{{ toc_item.url }}") {{ toc_item.title }} + {% for toc_item in toc_item.children %} + %li + %a(href="{{ toc_item.url }}") {{ toc_item.title }} + {% endfor %} + {% endfor %} + {% endif %} + + %hr + + {{ page.content }} + + -# Webrings + %p + %a(href="https://fediring.net/previous?host=tilde.club%2F~tasiaiso" target="_top") ← + %a(href="https://fediring.net") Fediring + %a(href="https://fediring.net/next?host=tilde.club%2F~tasiaiso" target="_top") → + + %p + %a(href="http://tilde.club/~harper/link.html?action=random" target="_top") ← + %a(href="https://tilde.club") tilde.club + %a(href="http://tilde.club/~harper/link.html?action=random" target="_top") → + + -# 88x31 badges + %a(href="https://tea.cuddleslut.fr") + %img(src="/~tasiaiso/images/badges/tea.png" alt="fediring badge") + %a(href="https://fediring.net") + %img(src="/~tasiaiso/images/badges/fediring.png" alt="fediring badge") + %a(href="https://kitsu.life") + %img(src="/~tasiaiso/images/badges/kitsulife.png" alt="kitsulife badge") + %a(href="https://nixos.org") + %img(src="/~tasiaiso/images/badges/nixos.png" alt="nixos badge") + %a(href="https://tilde.club") + %img(src="/~tasiaiso/images/badges/tildeclub.png" alt="tilde.club badge") + %a(href="https://linux.org") + %img(src="/~tasiaiso/images/badges/linux.png" alt="tilde.club badge") + + ( + %a(href="/~tasiaiso/images/badges/credits.txt") credits + ) + + %br + + %a(href="https://citrons.xyz/a/memetic-apioform-page.html") memetic apiopage + + %br + %hr + + This webite's source code and built webpages when shared in their entirety are provided under the + %a(href="https://www.gnu.org/licenses/gpl-3.0.en.html") GPL-3.0 + license. All blog posts, articles and Markdown files contained within the + %a(href="https://gitea.com/tasiaiso/tilde") git repository + are shared under the + %a(href="https://creativecommons.org/licenses/by-nc-sa/4.0/") CC BY-NC-SA 4.0 + license. If you want to use my content for commercial purposes, feel free to contact me. + + %br + %br + + This is an + %a(href="https://actualwebsite.org") actual website + \. This page is cleaner than 0% of all web pages globally according to + %a(href="https://www.websitecarbon.com/website/tilde-club-tasiaiso") websitecarbon.com + \. + + %br + + Built by + %a(href="https://www.mkdocs.org") mkdocs + and served by + %a(href="https://tilde.club") tilde.club + \. + + %br + %br + + -# Johnvertisement + %iframe(src="https://john.citrons.xyz/embed?ref=example.com" style="margin-left: auto; display: block; margin-right: auto; max-width: 732px; width: 100%; height: 94px; border: none;") + + %br + %br \ No newline at end of file diff --git a/shell.nix b/shell.nix index 0a18352..6c27333 100644 --- a/shell.nix +++ b/shell.nix @@ -3,5 +3,6 @@ pkgs.mkShell{ nativeBuildInputs = with pkgs; [ python310Packages.mkdocs python310Packages.mkdocs-minify + rubyPackages.haml ]; } diff --git a/theme/main.html b/theme/main.html deleted file mode 100644 index 758b66a..0000000 --- a/theme/main.html +++ /dev/null @@ -1,185 +0,0 @@ - - -
- - - - - - - - -- ← - tilde.club - → -
- - -