From 0caefb7ad6e7d88f6774853f57ecc30926f39976 Mon Sep 17 00:00:00 2001 From: Jocelyn Date: Fri, 22 Nov 2024 12:36:50 +0100 Subject: [PATCH 1/7] Removed unused escape_newlines function --- build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/build.sh b/build.sh index 4e5031b..ee80ea5 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,6 @@ #!/bin/bash source_to_target() { sed -E -e 's:\.\./src/:\./:' -e 's/.md$/.html/'; } -escape_newlines() { tr -d "\\n"; } shopt -s globstar rm -rf dist/ From bfb6544b097e8682fa0d64d3f44378d98e16a047 Mon Sep 17 00:00:00 2001 From: Jocelyn Date: Fri, 22 Nov 2024 12:47:22 +0100 Subject: [PATCH 2/7] Added build signature to template --- template.tpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/template.tpl b/template.tpl index b6104b9..bc55eeb 100755 --- a/template.tpl +++ b/template.tpl @@ -17,6 +17,8 @@
% echo $CONTENT +
+ %(Last built $(date -I) on $(hostname)%)
From c99afd569d31c4834d5633d0514ec09f3d58e2d1 Mon Sep 17 00:00:00 2001 From: Joss Date: Tue, 26 Nov 2024 20:41:25 +0100 Subject: [PATCH 3/7] Added README.md --- README.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..c0045b5 --- /dev/null +++ b/README.md @@ -0,0 +1,53 @@ +# Jocelyns HSMW website + +This repository contains the generator, static files and source files for my [HSMW website](https://www.student.hs-mittweida.de/~jotto5) + +## Build + +To build this website you need: + +* GNU Bash (5.2.32) +* GNU awk (1.3.4) +* sed (4.9) +* Pandoc (3.1.11.1) + +Any half-recent version should suffice, I added a tested version in parentheses. To run the build, execute the `build.sh` script from the root directory. This will: + +* Delete the `dist` folder if it exists +* Create a dist folder +* Copy over all static files +* Compile the website from `src` into `dist` + +## Templates + +Templates use a custom template language heavily inspired by the one used by `werc`. It works by embedding bash code directly into the html skeleton used to build the pages. There are two ways of doing so: + +### Escaped lines + +If a line starts with an arbitrary amount of whitespace (even 0) followed by a percent sign, the rest of the line will be treated as a shell command, and the commands output will be inserted in its place. For example: + +``` +

+% echo 'Hallo Mittweida!' +

+``` + +will be evaluated to + +``` +

+Hallo Mittweida! +

+``` + +> NOTE: Keep control over your templates, as they could expose information about your system! + +### Inline expressions + +Inline expressions can be written by encasing the expression in `%(` and `%)`. Those expressions will be evaluated as if put in double quotes, and the result will be inserted in their place. Example: + +``` +link +``` + +will put the contents of the shell variable `LINK` in the `href`-attribute field of the link object. From 5d0cbfc000568511b4e3167245fe460e82d713b1 Mon Sep 17 00:00:00 2001 From: Joss Date: Tue, 26 Nov 2024 20:45:38 +0100 Subject: [PATCH 4/7] Moved style.css to static directory --- build.sh | 2 +- style.css => static/style.css | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename style.css => static/style.css (100%) diff --git a/build.sh b/build.sh index ee80ea5..038380c 100755 --- a/build.sh +++ b/build.sh @@ -5,7 +5,7 @@ source_to_target() { sed -E -e 's:\.\./src/:\./:' -e 's/.md$/.html/'; } shopt -s globstar rm -rf dist/ mkdir dist&&cd dist -cp ../style.css . +cp -r ../static/* . for file in $(du -a ../src/ | cut -f2 | grep -E '.md$'); do target="$(echo $file | source_to_target)" export CONTENT="$(pandoc --from markdown+emoji --wrap=none -i $file)" diff --git a/style.css b/static/style.css similarity index 100% rename from style.css rename to static/style.css From 5794cc38f7e2513f40bad749625f8b728ae440e8 Mon Sep 17 00:00:00 2001 From: Joss Date: Wed, 27 Nov 2024 18:26:49 +0100 Subject: [PATCH 5/7] Fixed Emilians name --- src/others.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/others.md b/src/others.md index a5bd654..9f56870 100644 --- a/src/others.md +++ b/src/others.md @@ -2,7 +2,7 @@ This is a place for me to put links to friendly websites! -* Emil's site: [~emarche](https://www.student.hs-mittweida.de/~emarche) +* Emilian's site: [~emarche](https://www.student.hs-mittweida.de/~emarche) * My private homepage at [jossco.de](https://jossco.de) If you want to be here, contact me :grin: From d353f2e5e6c134eaaffa674bf80ef8d131346e50 Mon Sep 17 00:00:00 2001 From: Joss Date: Wed, 27 Nov 2024 18:38:57 +0100 Subject: [PATCH 6/7] Removed misused and useless cat command --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 038380c..453b2f5 100755 --- a/build.sh +++ b/build.sh @@ -12,5 +12,5 @@ for file in $(du -a ../src/ | cut -f2 | grep -E '.md$'); do export PREFIX=$(realpath --relative-to $(dirname $target) .) export SIDEBAR=$(for x in ../src/**/*.md; do echo "
  • $(realpath --relative-to ../src/ $x | sed -e 's/.md$//')
  • "; done) mkdir -p $(dirname $target) - cat ../template.tpl | awk -f ../template.awk | bash > $target + awk -f ../template.awk ../template.tpl | bash > $target done From 6d470dadb27e3af67d8bd97ed8780584769033d0 Mon Sep 17 00:00:00 2001 From: Joss Date: Wed, 27 Nov 2024 21:50:44 +0100 Subject: [PATCH 7/7] Content: Added stuff to queer page --- src/contact.md | 2 +- src/queer.md | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/contact.md b/src/contact.md index 2a51658..27fa068 100644 --- a/src/contact.md +++ b/src/contact.md @@ -7,6 +7,6 @@ You can contact me in the following ways: * Others on request If you don't know what to contact me about: Try computers graphics, programming, music and trains! You can also talk to me if you want -to talk about trans-topics, or just want to vent about the difficulties of being queer :heart: +to talk about trans-topics, or just want to vent about the difficulties of being queer (see the `queer` page) :heart: While not a contact channel per se, I can also be found in the fediverse as [@joss@tech.lgbt](https://tech.lgbt/@joss)! diff --git a/src/queer.md b/src/queer.md index 99a3e92..6e61f0f 100644 --- a/src/queer.md +++ b/src/queer.md @@ -1 +1,9 @@ -# Yes. +# Being queer... + +...can be an endless struggle, no matter which unique (and totally valid!) flavor of queer one might identify as. If you have any questions about being queer or queer identities in general you can reach out to me, see the `contact` page for more information. + +My experience is mostly with being transfeminine, but I can talk about a lot more fields. I also have some ties with the queer community of the university. + +Also please note that I am no psychologist, and can't help with everything. + +
    :rainbow_flag: