From e3bfa2f53fcd38a3db3f1fb766c105554851d2e0 Mon Sep 17 00:00:00 2001 From: slonkazoid Date: Sat, 3 Aug 2024 10:19:35 +0300 Subject: [PATCH] load custom css from /static/custom --- README.md | 16 ++++++++++++++++ templates/error.html | 2 ++ templates/index.html | 2 ++ templates/post.html | 2 ++ 4 files changed, 22 insertions(+) diff --git a/README.md b/README.md index 8dae17e..26d379d 100644 --- a/README.md +++ b/README.md @@ -166,6 +166,22 @@ standard. examples of valid and invalid dates: - # everything else is also invalid ``` +## Custom Content (CSS, HTML, JS) + +though you can modify the content and commit it so you still get changes from +upstream with minimal problems. +you can edit the css and js however you want but changing the html requires a +recompilation as it is made from compile-time parsed templates. + +bingus-blog currently loads css files from `/static/custom`: + +- `/static/custom/style.css` for all pages +- `/static/custom/post.css` for posts +- `/static/custom/error.css` for the error page + +you can create a `custom` directory inside the `static_dir` you set in the +config and put the css files there. + ## Routes - `GET /`: index page, lists posts diff --git a/templates/error.html b/templates/error.html index 6e1bdea..0aa7565 100644 --- a/templates/error.html +++ b/templates/error.html @@ -5,6 +5,8 @@ error + +
diff --git a/templates/index.html b/templates/index.html index 4f5fb27..fd00eb1 100644 --- a/templates/index.html +++ b/templates/index.html @@ -12,6 +12,8 @@ {% when None %} {% endmatch %} {{ title }} + + {% if rss %} {% endif %} diff --git a/templates/post.html b/templates/post.html index 7250a8e..38fed50 100644 --- a/templates/post.html +++ b/templates/post.html @@ -31,6 +31,8 @@ {{ meta.title }} + + {% if js %}