From cf7e2d9a0501f5b73a4829b3c339c187b3b1c580 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Wed, 31 May 2023 09:56:29 +0200 Subject: [PATCH] fix pre-commit --- .github/workflows/hugo.yaml | 5 +- README.md | 1 - archetypes/default.md | 1 - archetypes/posts.md | 1 - assets/css/extended/admonitions.css | 78 +++++++++---------- assets/css/extended/style.css | 16 ++-- content/about/index.md | 2 +- .../bitwarden-and-password-managers/3.svg | 4 +- .../index.md | 2 +- .../i-needed-a-budget-with-four-rules/20.svg | 4 +- .../index.md | 6 +- content/posts/pi-hole/11.svg | 4 +- .../35.svg | 4 +- .../index.md | 2 +- .../index.md | 2 +- .../26.svg | 4 +- content/posts/sourcehut/index.md | 4 +- content/posts/to-a-new-adventure/index.md | 1 - content/search.md | 1 - contrib/sqlite_to_posts.py | 2 +- layouts/partials/comments.html | 2 +- layouts/partials/extend_footer.html | 2 +- layouts/partials/extend_head.html | 2 +- layouts/shortcodes/unsafe.html | 2 +- 24 files changed, 73 insertions(+), 79 deletions(-) diff --git a/.github/workflows/hugo.yaml b/.github/workflows/hugo.yaml index bbb185f..82a3033 100644 --- a/.github/workflows/hugo.yaml +++ b/.github/workflows/hugo.yaml @@ -37,7 +37,7 @@ jobs: - name: Install Hugo CLI run: | wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ - && sudo dpkg -i ${{ runner.temp }}/hugo.deb + && sudo dpkg -i ${{ runner.temp }}/hugo.deb - name: Install Dart Sass Embedded run: sudo snap install dart-sass-embedded - name: Checkout @@ -60,7 +60,7 @@ jobs: hugo \ --gc \ --minify \ - --baseURL "${{ steps.pages.outputs.base_url }}/" + --baseURL "${{ steps.pages.outputs.base_url }}/" - name: Upload artifact uses: actions/upload-pages-artifact@v1 with: @@ -77,4 +77,3 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v2 - diff --git a/README.md b/README.md index 1793da7..c277cbf 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,3 @@ git clone git@github.com:Crocmagnon/blog.git cd blog git submodule update --init --recursive ``` - diff --git a/archetypes/default.md b/archetypes/default.md index 00e77bd..26f317f 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -3,4 +3,3 @@ title: "{{ replace .Name "-" " " | title }}" date: {{ .Date }} draft: true --- - diff --git a/archetypes/posts.md b/archetypes/posts.md index 0509e76..c416949 100644 --- a/archetypes/posts.md +++ b/archetypes/posts.md @@ -18,4 +18,3 @@ cover: # showToc: true # TocOpen: false --- - diff --git a/assets/css/extended/admonitions.css b/assets/css/extended/admonitions.css index e1a90dd..34c4be9 100644 --- a/assets/css/extended/admonitions.css +++ b/assets/css/extended/admonitions.css @@ -1,65 +1,65 @@ :root { - --info-background: #d1ecf1; - --info-text: #0c5460; - --success-background: #d4edda; - --success-text: #155724; - --danger-background: #f8d7da; - --danger-text: #721c24; - --warning-background: #fff3cd; - --warning-text: #856404; + --info-background: #d1ecf1; + --info-text: #0c5460; + --success-background: #d4edda; + --success-text: #155724; + --danger-background: #f8d7da; + --danger-text: #721c24; + --warning-background: #fff3cd; + --warning-text: #856404; } @media (prefers-color-scheme: dark) { - :root { - --info-background: #0c5460; - --info-text: #d1ecf1; - --success-background: #155724; - --success-text: #d4edda; - --danger-background: #721c24; - --danger-text: #f8d7da; - --warning-background: #856404; - --warning-text: #fff3cd; - } + :root { + --info-background: #0c5460; + --info-text: #d1ecf1; + --success-background: #155724; + --success-text: #d4edda; + --danger-background: #721c24; + --danger-text: #f8d7da; + --warning-background: #856404; + --warning-text: #fff3cd; + } } .admonition .title { - font-weight: bold; - margin-bottom: 0; + font-weight: bold; + margin-bottom: 0; } .admonition { - background-color: var(--nc-bg-2); - box-shadow: 0 0 8px -1px var(--nc-bg-3); - border: 1px solid var(--nc-bg-3); - padding: 1ex; - border-radius: 5px; - margin-bottom: 1rem; + background-color: var(--nc-bg-2); + box-shadow: 0 0 8px -1px var(--nc-bg-3); + border: 1px solid var(--nc-bg-3); + padding: 1ex; + border-radius: 5px; + margin-bottom: 1rem; } .admonition > :last-child { - margin-bottom: 0; + margin-bottom: 0; } .admonition.info { - --nc-bg-2: var(--info-background); - --nc-bg-3: var(--info-text); - color: var(--info-text); + --nc-bg-2: var(--info-background); + --nc-bg-3: var(--info-text); + color: var(--info-text); } .admonition.success { - --nc-bg-2: var(--success-background); - --nc-bg-3: var(--success-text); - color: var(--success-text); + --nc-bg-2: var(--success-background); + --nc-bg-3: var(--success-text); + color: var(--success-text); } .admonition.warning { - --nc-bg-2: var(--warning-background); - --nc-bg-3: var(--warning-text); - color: var(--warning-text); + --nc-bg-2: var(--warning-background); + --nc-bg-3: var(--warning-text); + color: var(--warning-text); } .admonition.danger { - --nc-bg-2: var(--danger-background); - --nc-bg-3: var(--danger-text); - color: var(--danger-text); + --nc-bg-2: var(--danger-background); + --nc-bg-3: var(--danger-text); + color: var(--danger-text); } diff --git a/assets/css/extended/style.css b/assets/css/extended/style.css index 84906de..2c47ba6 100644 --- a/assets/css/extended/style.css +++ b/assets/css/extended/style.css @@ -1,14 +1,14 @@ #reply { - text-align: center; - margin-top: 2em; + text-align: center; + margin-top: 2em; } #reply a button { - font-size: 1.2rem; - padding: 8px 16px; + font-size: 1.2rem; + padding: 8px 16px; } a button { - background: #0069e5; - color: #fff; - border-radius: 4px; - box-sizing: border-box; + background: #0069e5; + color: #fff; + border-radius: 4px; + box-sizing: border-box; } diff --git a/content/about/index.md b/content/about/index.md index fa296d6..3e1139e 100644 --- a/content/about/index.md +++ b/content/about/index.md @@ -10,7 +10,7 @@ custom_css: >- justify-content: space-evenly; flex-wrap: wrap; } - + .pictures a { box-shadow: 0 0; } diff --git a/content/posts/bitwarden-and-password-managers/3.svg b/content/posts/bitwarden-and-password-managers/3.svg index bb27d14..1fdf796 100644 --- a/content/posts/bitwarden-and-password-managers/3.svg +++ b/content/posts/bitwarden-and-password-managers/3.svg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f106b7fc74f97c967ce6c24962c2d8e0e789cf32dd2679d5bce380ef36fef9c9 -size 4980 +oid sha256:5daf31143f67097dbcc1d8cdc965d2a132997969eb0ea582eb1b68af62e379ab +size 4981 diff --git a/content/posts/demo-example-should-never-be-published/index.md b/content/posts/demo-example-should-never-be-published/index.md index d512f11..f101045 100644 --- a/content/posts/demo-example-should-never-be-published/index.md +++ b/content/posts/demo-example-should-never-be-published/index.md @@ -100,7 +100,7 @@ In this extreme case, the final image weighs nothing more than the binary itself Link to another section: [link]({{< ref "#-applying-to-python--poetry" >}}) -## 🐍 Applying to Python & Poetry +## 🐍 Applying to Python & Poetry ### Install the dependencies Let's start with a basic Dockerfile with a single stage that will just install this blog's dependencies and run the project.[^blog] diff --git a/content/posts/i-needed-a-budget-with-four-rules/20.svg b/content/posts/i-needed-a-budget-with-four-rules/20.svg index 3a2cf54..522b67c 100644 --- a/content/posts/i-needed-a-budget-with-four-rules/20.svg +++ b/content/posts/i-needed-a-budget-with-four-rules/20.svg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:beda35206500f1231348547c5fae1e5a92b5a624a0fdd38f7e12983c1f6ea5ac -size 895 +oid sha256:56d36cee0e428262c964a9a0fb9bccff870f23e3c44c0b5ff40fd6597c04e2f3 +size 896 diff --git a/content/posts/lighten-your-python-image-docker-multi-stage-builds/index.md b/content/posts/lighten-your-python-image-docker-multi-stage-builds/index.md index dbffe32..193213c 100644 --- a/content/posts/lighten-your-python-image-docker-multi-stage-builds/index.md +++ b/content/posts/lighten-your-python-image-docker-multi-stage-builds/index.md @@ -28,9 +28,9 @@ func main() { ```Dockerfile # Dockerfile FROM golang:alpine as builder -RUN mkdir /build +RUN mkdir /build ADD . /build/ -WORKDIR /build +WORKDIR /build RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o main . FROM scratch @@ -197,7 +197,7 @@ CMD ["/app/docker/run.sh"] There are not much differences between this and the previous one, except for an added stage to retrieve the git commit hash and some tweaking when copying the code. -There is also the addition of the `POETRY_OPTIONS` build argument. It allows me to build the same Dockerfile with two different outputs: one with the development dependencies like `pytest` or `pre-commit` and the other without. +There is also the addition of the `POETRY_OPTIONS` build argument. It allows me to build the same Dockerfile with two different outputs: one with the development dependencies like `pytest` or `pre-commit` and the other without. I use it like this: diff --git a/content/posts/pi-hole/11.svg b/content/posts/pi-hole/11.svg index 31e08b1..e30491f 100644 --- a/content/posts/pi-hole/11.svg +++ b/content/posts/pi-hole/11.svg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f9ad49c576d10856cafcd5d805bede38f780e008b5980eb066d4ef2753f0a68d -size 4652 +oid sha256:e05b538e1d1b4974b37121dde266b2c1ff7da1fe6b12cdb6c33b6a28c7fd587e +size 4653 diff --git a/content/posts/poetry-python-dependencies-management/35.svg b/content/posts/poetry-python-dependencies-management/35.svg index 0d9e55d..ba32f3d 100644 --- a/content/posts/poetry-python-dependencies-management/35.svg +++ b/content/posts/poetry-python-dependencies-management/35.svg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f30b763a2243bc45ab11e0f4e122464b7bfa0762cf618da91ccfe9ddaefb3a50 -size 2922 +oid sha256:2026941fe675c44d5678fb0bff68c4b448bcc4909fba8a924dea71781e2b6408 +size 2923 diff --git a/content/posts/reduce-your-page-load-time-with-htmx-in-less-than-an-hour/index.md b/content/posts/reduce-your-page-load-time-with-htmx-in-less-than-an-hour/index.md index 75a6495..f0a54b9 100644 --- a/content/posts/reduce-your-page-load-time-with-htmx-in-less-than-an-hour/index.md +++ b/content/posts/reduce-your-page-load-time-with-htmx-in-less-than-an-hour/index.md @@ -10,7 +10,7 @@ summary: HTMX is a wonderful piece of technology for backend developers who don' During DjangoCon EU 2022, a talk reminded me of [htmx](https://htmx.org/). As the authors put it: > Htmx is a library that allows you to access modern browser features directly from HTML, rather than using javascript. -> +> > \- [htmx docs](https://htmx.org/docs/#introduction) Since I really don't like javascript that much, this promise is very tempting to me 😁 diff --git a/content/posts/releasing-my-works-into-the-public-domain/index.md b/content/posts/releasing-my-works-into-the-public-domain/index.md index 770f9ac..aaf14c9 100644 --- a/content/posts/releasing-my-works-into-the-public-domain/index.md +++ b/content/posts/releasing-my-works-into-the-public-domain/index.md @@ -30,7 +30,7 @@ I still believe that users should be treated as first-party when building softwa * The freedom to study how the program works, and change it so it does your computing as you wish. Access to the source code is a precondition for this. * The freedom to redistribute copies so you can help others. * The freedom to distribute copies of your modified versions to others. By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this. -> +> > \- *The Free Software Foundation* And to me, releasing my works in the public domain is the easiest and most comprehensible way of giving these freedoms to my users. Of course this doesn't ensure that all derivatives will be released under the same terms, but frankly I think I don't care. diff --git a/content/posts/replacing-my-synology-nas-with-a-self-built-server/26.svg b/content/posts/replacing-my-synology-nas-with-a-self-built-server/26.svg index af606fc..8ef8234 100644 --- a/content/posts/replacing-my-synology-nas-with-a-self-built-server/26.svg +++ b/content/posts/replacing-my-synology-nas-with-a-self-built-server/26.svg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eeef6c6b7307a29ac1c9277685b9bc15bd6c01b6f7f4088dc91958820506abbe -size 7149 +oid sha256:cb89862e7c7e54c8b5c80541f24ed6d4b302fd83aed6d44414ffab74001a48bf +size 7150 diff --git a/content/posts/sourcehut/index.md b/content/posts/sourcehut/index.md index af4054b..8714bae 100644 --- a/content/posts/sourcehut/index.md +++ b/content/posts/sourcehut/index.md @@ -50,7 +50,7 @@ I also tried reviewing some code since it's a big part of collaboration around s At first I found it a bit hard since there's no guidance in the web UI. But once you understand that you can do that via email, then everything falls into place. -You just need to reply to the email you received when the contributor sent the patch. You can even add inline comments and they'll be shown inline in the web UI. See an example of such discussion [here](https://lists.sr.ht/~sircmpwn/email-test-drive/patches/10576). +You just need to reply to the email you received when the contributor sent the patch. You can even add inline comments and they'll be shown inline in the web UI. See an example of such discussion [here](https://lists.sr.ht/~sircmpwn/email-test-drive/patches/10576). I found that to be very clever, though there is still room for improvement. Especially on the docs or UI to guide people. @@ -64,7 +64,7 @@ Their business model is based on paid users. They [don't have any investors](htt So if you just want an account to use the web UI to publish issues for example, you won't have to pay. But as I said, you don't even need an account for that: you can use email! You would need an account to get write access to any repository or read access to private repos though. -During the alpha you don't need to pay but I figured it would be a nice way to contribute to the free and open source software environment so I decided to subscribe. +During the alpha you don't need to pay but I figured it would be a nice way to contribute to the free and open source software environment so I decided to subscribe. ## CI / Builds I also wanted to talk a bit about their CI system. It's as simple as writing a YAML file (called a manifest) and submitting it either through the API or using a web form. diff --git a/content/posts/to-a-new-adventure/index.md b/content/posts/to-a-new-adventure/index.md index 6fc03ff..0b020ca 100644 --- a/content/posts/to-a-new-adventure/index.md +++ b/content/posts/to-a-new-adventure/index.md @@ -36,4 +36,3 @@ Here are some links (in alphabetical order) so you can check their work: * [Smartfire](https://www.smartfire.pro/) - small tech agency Anyway, I'm really excited to start my new job! Wish me luck 😊 - diff --git a/content/search.md b/content/search.md index 697b7c2..398762e 100644 --- a/content/search.md +++ b/content/search.md @@ -6,4 +6,3 @@ layout: "search" # is necessary summary: "search" placeholder: "placeholder text in search input box" --- - diff --git a/contrib/sqlite_to_posts.py b/contrib/sqlite_to_posts.py index 3fa83df..3b8349e 100644 --- a/contrib/sqlite_to_posts.py +++ b/contrib/sqlite_to_posts.py @@ -43,4 +43,4 @@ class Command(BaseCommand): f.write("\n") f.write(content) f.write("\n") - self.stdout.write(self.style.SUCCESS("Successfully wrote all posts.")) \ No newline at end of file + self.stdout.write(self.style.SUCCESS("Successfully wrote all posts.")) diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index 97123be..55b83bc 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -2,4 +2,4 @@ - \ No newline at end of file + diff --git a/layouts/partials/extend_footer.html b/layouts/partials/extend_footer.html index 2c5cb9c..6db2978 100644 --- a/layouts/partials/extend_footer.html +++ b/layouts/partials/extend_footer.html @@ -16,4 +16,4 @@ data-goatcounter="https://gc.gabnotes.org/count"> GoatCounter tracking pixel -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/partials/extend_head.html b/layouts/partials/extend_head.html index 5bf0344..dc5f3db 100644 --- a/layouts/partials/extend_head.html +++ b/layouts/partials/extend_head.html @@ -1,3 +1,3 @@ {{ if .Params.custom_css }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/shortcodes/unsafe.html b/layouts/shortcodes/unsafe.html index 88c822a..59448a1 100644 --- a/layouts/shortcodes/unsafe.html +++ b/layouts/shortcodes/unsafe.html @@ -1 +1 @@ -{{ .Inner }} \ No newline at end of file +{{ .Inner }}