diff --git a/.gitignore b/.gitignore index 524724d..89e2f9e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ # Build artifacts _site/ -.jekyll-cache/ \ No newline at end of file +assets/img/*.jpg +blog.tar.gz diff --git a/Makefile b/Makefile index 53eb70e..ab2ad70 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,44 @@ -img: assets/img/raw/* - for file in assets/img/raw/* ; do \ +BUILD_DATE := $(shell date '+%H:%M %d.%m.%Y') +RAW_IMAGES := $(wildcard assets/img/raw/*.jpg) +OPTIMIZED_IMAGES := $(foreach img,${RAW_IMAGES},assets/img/$(notdir ${img})) + +${OPTIMIZED_IMAGES}: ${RAW_IMAGES} + for file in ${RAW_IMAGES} ; do \ basename=`basename $$file`; \ - convert assets/img/raw/$$basename -sampling-factor 4:2:0 -strip -quality 75 -interlace JPEG -colorspace RGB assets/img/$$basename ; \ + convert \ + assets/img/raw/$$basename \ + -sampling-factor 4:2:0 \ + -strip \ + -quality 75 \ + -interlace JPEG \ + -colorspace RGB \ + assets/img/$$basename ; \ done -build: img - rm -rf _site; exit 0 - ~/.gem/ruby/2.7.0/bin/jekyll build - tar -czf blog.tar.gz _site +serve: ${OPTIMIZED_IMAGES} + python ../shared-assets/makesite.py \ + -p params.json \ + -v page_assets=/assets \ + -v build_time="${BUILD_DATE}" \ + --assets ../shared-assets/assets \ + --assets ./assets \ + --copy-assets \ + --ignore ../shared-assets/assets/img \ + --ignore assets/img/raw \ + --include robots.txt \ + --blog \ + --rss + cd _site/ && python -m http.server 8080 -serve: img - ~/.gem/ruby/2.7.0/bin/jekyll serve \ - --drafts \ - --unpublished \ - --future +build: ${OPTIMIZED_IMAGES} + python ../shared-assets/makesite.py \ + -p params.json \ + -v page_assets=https://cdn.polynom.me \ + -v build_time="${BUILD_DATE}" \ + --assets ./assets \ + --copy-assets \ + --ignore assets/img/raw \ + --include robots.txt \ + --blog \ + --rss + tar -czf blog.tar.gz _site diff --git a/_config.yml b/_config.yml deleted file mode 100644 index 5460ed4..0000000 --- a/_config.yml +++ /dev/null @@ -1,44 +0,0 @@ -title: PapaTutuWawa's Blog - -social: - blog: blog.polynom.me - mastodon: fosstodon.org/@polynomdivision - git: git.polynom.me/PapaTutuWawa - email: - address: papatutuwawa - domain: polynom.me - gpg: https://pki.polynom.me/pubkeys/papatutuwawa.pub - -author: - name: PapaTutuWawa - email: papatutuwawa ["a" with a weird circle] polynom.me - -source: . -destination: ./_site -permalink: /:title - -defaults: - - scope: - path: "" - values: - layout: default - - scope: - path: "" - type: "posts" - values: - layout: post - -plugins: - - jekyll-paginate - - jekyll-seo-tag - - jekyll-sitemap - -# jekyll-paginate -paginate: 5 -paginate_path: "/page/:num/" - -# jekyll-seo-tag -url: "https://blog.polynom.me" -description: "PapaTutuWawa's Blog. Mainly tech stuff." - -exclude: ["assets/img/raw/", "blog.tar.gz"] diff --git a/_drafts/.gitkeep b/_drafts/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/_includes/footer.html b/_includes/footer.html deleted file mode 100644 index 1d3049e..0000000 --- a/_includes/footer.html +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/_includes/head.html b/_includes/head.html deleted file mode 100644 index 6176ee7..0000000 --- a/_includes/head.html +++ /dev/null @@ -1,9 +0,0 @@ - - {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %} - - {% seo %} - - - - - diff --git a/_layouts/default.html b/_layouts/default.html deleted file mode 100644 index 9a99fe8..0000000 --- a/_layouts/default.html +++ /dev/null @@ -1,24 +0,0 @@ - - - {% include head.html %} - -

papatutuwawa@home:~$

-

by PapaTutuWawa

- -
-

About

-

Archive

-

RSS

-
- -
-
- {{ content }} -
-
- - -
- - {% include footer.html %} - diff --git a/_layouts/post.html b/_layouts/post.html deleted file mode 100644 index 4899905..0000000 --- a/_layouts/post.html +++ /dev/null @@ -1,10 +0,0 @@ ---- -layout: default ---- - -
-
-

{{ page.title }}

- {{ content }} -
-
diff --git a/about.html b/about.html deleted file mode 100644 index 0c8ade2..0000000 --- a/about.html +++ /dev/null @@ -1,33 +0,0 @@ ---- -layout: default ---- - -

About "PapaTutuWawa"

- -
- Profile Picture -
- -
- Student, Anime expert, Vocaloid listener, Docker and Linux fan and hobby SysAdmin. -
- - - -

Contact

- - -

About This Page

- diff --git a/archive.html b/archive.html deleted file mode 100644 index 29be81c..0000000 --- a/archive.html +++ /dev/null @@ -1,11 +0,0 @@ ---- -layout: default ---- - -

Archive

- - diff --git a/assets/css/blog.css b/assets/css/blog.css new file mode 100644 index 0000000..ffd3d03 --- /dev/null +++ b/assets/css/blog.css @@ -0,0 +1,18 @@ +img { + /* Prevent images in blog posts from getting too big */ + max-width: 800px; +} + +.post-list-item { + display: block; + max-width: 800px; +} + +.post { + display: block; + max-width: 800px; +} + +.post-title { + color: #3498db; +} diff --git a/assets/css/index.css b/assets/css/index.css deleted file mode 100644 index 03a1dde..0000000 --- a/assets/css/index.css +++ /dev/null @@ -1,100 +0,0 @@ -/* Fonts */ -@font-face { - font-family: roboto; - src: url(/assets/fonts/Roboto-Regular.ttf) -} - -@font-face { - font-family: overpass; - src: url(/assets/fonts/OpenSans-Regular.ttf) -} - -/* Element styling */ -html { - background-color: #212121; - color: #ffffff; - font-family: Overpass; -} - -footer { - width: 100%; -} - -h1, h2, h3 { - font-family: Roboto; - margin-bottom: 2px; -} - -a { - color: white; -} - -ul { - margin-top: 2px; -} - -img { - /* Prevent images in blog posts from getting too big */ - max-width: 800px; -} - -/* Layouting */ -.container { - display: flex; - justify-content: center; - width: 100%; -} - -.horizontal { - flex-direction: row; -} - -.vertical { - display: flex; - flex-direction: column; -} - -.subbar-link { - padding: 5px; -} - -.post-list-item { - display: block; - max-width: 600px; -} - -.post { - display: block; - max-width: 800px; -} - -.title-sub { - margin-top: 0px; - margin-bottom: 10px; -} - -.title-sub-subbar { - margin-top: -20px; -} - -/* Text styling */ -.highlight { - background-color: #373737; - padding: 4px; -} - -.quote { - border-left: 2px; - border-left-style: solid; - border-color: gray; - padding-left: 4px; - font-style: italic; -} - -/* Image styling */ - -.profile-picture { - width: 256px; - height: 256px; - margin-bottom: 10px; -} diff --git a/assets/fonts/OpenSans-Regular.ttf b/assets/fonts/OpenSans-Regular.ttf deleted file mode 100644 index 29bfd35..0000000 Binary files a/assets/fonts/OpenSans-Regular.ttf and /dev/null differ diff --git a/assets/fonts/Roboto-Regular.ttf b/assets/fonts/Roboto-Regular.ttf deleted file mode 100644 index 2b6392f..0000000 Binary files a/assets/fonts/Roboto-Regular.ttf and /dev/null differ diff --git a/content/about.html b/content/about.html new file mode 100644 index 0000000..a5fc3ec --- /dev/null +++ b/content/about.html @@ -0,0 +1,32 @@ + + + +

About "PapaTutuWawa"

+ +
+ Profile Picture +
+ +
+ Student, Anime expert, Vocaloid listener, Docker and Linux fan and hobby SysAdmin. +
+ + + +

Contact

+ + +

About This Page

+ diff --git a/_posts/2019-06-08-How-I-Play-Games.md b/content/blog/2019-06-08-How-I-Play-Games.md similarity index 99% rename from _posts/2019-06-08-How-I-Play-Games.md rename to content/blog/2019-06-08-How-I-Play-Games.md index 74426c3..8979d1f 100644 --- a/_posts/2019-06-08-How-I-Play-Games.md +++ b/content/blog/2019-06-08-How-I-Play-Games.md @@ -1,7 +1,4 @@ ---- -title: How I Play Games on My Linux PC -published: true ---- + I love Linux. In fact, I love it so much that it runs on every computer I use, except for my phone but that can be changed. It always amazes me how much control Linux gives me about my computer and how easy it is diff --git a/_posts/2019-07-01-Mainline-Hero.md b/content/blog/2019-07-01-Mainline-Hero.md similarity index 99% rename from _posts/2019-07-01-Mainline-Hero.md rename to content/blog/2019-07-01-Mainline-Hero.md index 923c45d..2081784 100644 --- a/_posts/2019-07-01-Mainline-Hero.md +++ b/content/blog/2019-07-01-Mainline-Hero.md @@ -1,10 +1,4 @@ ---- -title: Mainline Hero Part 0 - Modern Linux For My Galaxy S7 -hashtag: mainlinehero -published: true -use_math: true -show_warning: true ---- + Ever heard of [PostmarketOS](https://postmarketos.org/)? If not, then here's a short summary: PostmarketOS aims to bring *"[a] real Linux distribution for phones and other mobile devices [...]"* to, diff --git a/_posts/2019-08-21-Mainline-Hero-1.md b/content/blog/2019-08-21-Mainline-Hero-1.md similarity index 99% rename from _posts/2019-08-21-Mainline-Hero-1.md rename to content/blog/2019-08-21-Mainline-Hero-1.md index 7b60133..d86dbac 100644 --- a/_posts/2019-08-21-Mainline-Hero-1.md +++ b/content/blog/2019-08-21-Mainline-Hero-1.md @@ -1,8 +1,4 @@ ---- -title: Mainline Hero Part 1 - First Attempts At Porting -hashtag: mainlinehero -published: true ---- + In the first post of the series, I showed what information I gathered and what tricks can be used to debug our mainline port of the *herolte* kernel. While I learned a lot just by preparing for diff --git a/_posts/2019-10-06-Road-to-Foss.md b/content/blog/2019-10-06-Road-to-Foss.md similarity index 99% rename from _posts/2019-10-06-Road-to-Foss.md rename to content/blog/2019-10-06-Road-to-Foss.md index 57bba2c..57c07df 100644 --- a/_posts/2019-10-06-Road-to-Foss.md +++ b/content/blog/2019-10-06-Road-to-Foss.md @@ -1,7 +1,4 @@ ---- -title: Road2FOSS - My Journey to Privacy by Self-Hosting -hashtag: road2foss ---- + About one year ago, I made plans to ditch many of the proprietary services that I used on a daily basis and replace them with FOSS alternatives. Now it is a year later and diff --git a/_posts/2020-01-03-Selfhosting-Lessons.md b/content/blog/2020-01-03-Selfhosting-Lessons.md similarity index 98% rename from _posts/2020-01-03-Selfhosting-Lessons.md rename to content/blog/2020-01-03-Selfhosting-Lessons.md index ac87df3..284c795 100644 --- a/_posts/2020-01-03-Selfhosting-Lessons.md +++ b/content/blog/2020-01-03-Selfhosting-Lessons.md @@ -1,7 +1,4 @@ ---- -title: Lessons Learned From Self-Hosting -hashtag: selfhostlessons ---- + Roughly eight months ago, according to my hosting provider, I spun up my VM which I use to this day to self-host my chat, my mail, my git and so on. At the beginning, I thought that diff --git a/_posts/2020-02-13-Running-Prosody-traefik.md b/content/blog/2020-02-13-Running-Prosody-traefik.md similarity index 98% rename from _posts/2020-02-13-Running-Prosody-traefik.md rename to content/blog/2020-02-13-Running-Prosody-traefik.md index 6d01dbb..39f6a0b 100644 --- a/_posts/2020-02-13-Running-Prosody-traefik.md +++ b/content/blog/2020-02-13-Running-Prosody-traefik.md @@ -1,7 +1,4 @@ ---- -title: Running Prosody on Port 443 Behind traefik -hashtag: prosodytraefik ---- + *TL;DR: This post is about running prosody with HTTPS services both on port 443. If you only care about the how, then jump to* **Considerations** *and read from there.* diff --git a/index.html b/index.html index a9ff5fe..247a7b6 100644 --- a/index.html +++ b/index.html @@ -6,13 +6,13 @@ layout: default {% for post in paginator.posts %}
-

{{ post.title }}

+

{{ post.title }}

> {{ post.date | date_to_string }}

- {{ post.excerpt }} + {{ post.excerpt }}...

diff --git a/layout/feed.xml b/layout/feed.xml new file mode 100644 index 0000000..65ab8a5 --- /dev/null +++ b/layout/feed.xml @@ -0,0 +1,16 @@ + + + + {{ title }} + https://{{ blog_url }}/ + + {{ blog_description }} + + {{ author_name }} + {{ email_user }} [a] {{ email_domain }} + https://{{ blog_url }}/about.html + + + {{ content }} + + diff --git a/layout/item.html b/layout/item.html new file mode 100644 index 0000000..77cbd03 --- /dev/null +++ b/layout/item.html @@ -0,0 +1,11 @@ +
+

{{ title }}

+ +

> {{ date }}

+ +

+

+ {{ summary }}... +
+

+
diff --git a/layout/item.xml b/layout/item.xml new file mode 100644 index 0000000..9a11802 --- /dev/null +++ b/layout/item.xml @@ -0,0 +1,15 @@ + + {{ title }} + https://{{ blog_url }}/{{ slug }}.html + + + https://{{ blog_url }}/{{ slug }}.html + + + + + + {{ rfc_2822_date }} + diff --git a/layout/list.html b/layout/list.html new file mode 100644 index 0000000..cfb50ff --- /dev/null +++ b/layout/list.html @@ -0,0 +1,3 @@ +
+ {{ content }} +
diff --git a/layout/page.html b/layout/page.html new file mode 100644 index 0000000..d9458f3 --- /dev/null +++ b/layout/page.html @@ -0,0 +1,39 @@ + + + + {{ title }} + + + + + + + + + +

papatutuwawa@home:~$

+

by PapaTutuWawa

+ +
+

About

+

Archive

+

RSS

+
+ +
+
+ {{ content }} +
+
+ + +
+ + + diff --git a/layout/post.html b/layout/post.html new file mode 100644 index 0000000..129af5e --- /dev/null +++ b/layout/post.html @@ -0,0 +1,7 @@ +
+
+

{{ title }}

+ + {{ content }} +
+
diff --git a/params.json b/params.json new file mode 100644 index 0000000..7f06f17 --- /dev/null +++ b/params.json @@ -0,0 +1,11 @@ +{ + "author_name": "Alexander 'PapaTutuWawa'", + "title": "PapaTutuWawa's Blog", + "blog_description": "My personal blog. Mainly tech stuff.", + "git_url": "git.polynom.me", + "blog_url": "blog.polynom.me", + "mastodon_url": "https://fosstodon.org/@polynomdivision", + "email_gpg_url": "https://pki.polynom.me/pubkeys/papatutuwawa.pub", + "email_user": "papatutuwawa", + "email_domain": "polynom.me" +}