fix pre-commit

This commit is contained in:
Gabriel Augendre 2023-05-31 09:56:29 +02:00
parent 9995ad3a4d
commit cf7e2d9a05
24 changed files with 73 additions and 79 deletions

View file

@ -37,7 +37,7 @@ jobs:
- name: Install Hugo CLI - name: Install Hugo CLI
run: | run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ 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 - name: Install Dart Sass Embedded
run: sudo snap install dart-sass-embedded run: sudo snap install dart-sass-embedded
- name: Checkout - name: Checkout
@ -60,7 +60,7 @@ jobs:
hugo \ hugo \
--gc \ --gc \
--minify \ --minify \
--baseURL "${{ steps.pages.outputs.base_url }}/" --baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact - name: Upload artifact
uses: actions/upload-pages-artifact@v1 uses: actions/upload-pages-artifact@v1
with: with:
@ -77,4 +77,3 @@ jobs:
- name: Deploy to GitHub Pages - name: Deploy to GitHub Pages
id: deployment id: deployment
uses: actions/deploy-pages@v2 uses: actions/deploy-pages@v2

View file

@ -8,4 +8,3 @@ git clone git@github.com:Crocmagnon/blog.git
cd blog cd blog
git submodule update --init --recursive git submodule update --init --recursive
``` ```

View file

@ -3,4 +3,3 @@ title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }} date: {{ .Date }}
draft: true draft: true
--- ---

View file

@ -18,4 +18,3 @@ cover:
# showToc: true # showToc: true
# TocOpen: false # TocOpen: false
--- ---

View file

@ -1,65 +1,65 @@
:root { :root {
--info-background: #d1ecf1; --info-background: #d1ecf1;
--info-text: #0c5460; --info-text: #0c5460;
--success-background: #d4edda; --success-background: #d4edda;
--success-text: #155724; --success-text: #155724;
--danger-background: #f8d7da; --danger-background: #f8d7da;
--danger-text: #721c24; --danger-text: #721c24;
--warning-background: #fff3cd; --warning-background: #fff3cd;
--warning-text: #856404; --warning-text: #856404;
} }
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root { :root {
--info-background: #0c5460; --info-background: #0c5460;
--info-text: #d1ecf1; --info-text: #d1ecf1;
--success-background: #155724; --success-background: #155724;
--success-text: #d4edda; --success-text: #d4edda;
--danger-background: #721c24; --danger-background: #721c24;
--danger-text: #f8d7da; --danger-text: #f8d7da;
--warning-background: #856404; --warning-background: #856404;
--warning-text: #fff3cd; --warning-text: #fff3cd;
} }
} }
.admonition .title { .admonition .title {
font-weight: bold; font-weight: bold;
margin-bottom: 0; margin-bottom: 0;
} }
.admonition { .admonition {
background-color: var(--nc-bg-2); background-color: var(--nc-bg-2);
box-shadow: 0 0 8px -1px var(--nc-bg-3); box-shadow: 0 0 8px -1px var(--nc-bg-3);
border: 1px solid var(--nc-bg-3); border: 1px solid var(--nc-bg-3);
padding: 1ex; padding: 1ex;
border-radius: 5px; border-radius: 5px;
margin-bottom: 1rem; margin-bottom: 1rem;
} }
.admonition > :last-child { .admonition > :last-child {
margin-bottom: 0; margin-bottom: 0;
} }
.admonition.info { .admonition.info {
--nc-bg-2: var(--info-background); --nc-bg-2: var(--info-background);
--nc-bg-3: var(--info-text); --nc-bg-3: var(--info-text);
color: var(--info-text); color: var(--info-text);
} }
.admonition.success { .admonition.success {
--nc-bg-2: var(--success-background); --nc-bg-2: var(--success-background);
--nc-bg-3: var(--success-text); --nc-bg-3: var(--success-text);
color: var(--success-text); color: var(--success-text);
} }
.admonition.warning { .admonition.warning {
--nc-bg-2: var(--warning-background); --nc-bg-2: var(--warning-background);
--nc-bg-3: var(--warning-text); --nc-bg-3: var(--warning-text);
color: var(--warning-text); color: var(--warning-text);
} }
.admonition.danger { .admonition.danger {
--nc-bg-2: var(--danger-background); --nc-bg-2: var(--danger-background);
--nc-bg-3: var(--danger-text); --nc-bg-3: var(--danger-text);
color: var(--danger-text); color: var(--danger-text);
} }

View file

@ -1,14 +1,14 @@
#reply { #reply {
text-align: center; text-align: center;
margin-top: 2em; margin-top: 2em;
} }
#reply a button { #reply a button {
font-size: 1.2rem; font-size: 1.2rem;
padding: 8px 16px; padding: 8px 16px;
} }
a button { a button {
background: #0069e5; background: #0069e5;
color: #fff; color: #fff;
border-radius: 4px; border-radius: 4px;
box-sizing: border-box; box-sizing: border-box;
} }

View file

@ -10,7 +10,7 @@ custom_css: >-
justify-content: space-evenly; justify-content: space-evenly;
flex-wrap: wrap; flex-wrap: wrap;
} }
.pictures a { .pictures a {
box-shadow: 0 0; box-shadow: 0 0;
} }

Binary file not shown.

View file

@ -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" >}}) Link to another section: [link]({{< ref "#-applying-to-python--poetry" >}})
## 🐍 Applying to Python & Poetry ## 🐍 Applying to Python & Poetry
### Install the dependencies ### 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] Let's start with a basic Dockerfile with a single stage that will just install this blog's dependencies and run the project.[^blog]

Binary file not shown.

View file

@ -28,9 +28,9 @@ func main() {
```Dockerfile ```Dockerfile
# Dockerfile # Dockerfile
FROM golang:alpine as builder FROM golang:alpine as builder
RUN mkdir /build RUN mkdir /build
ADD . /build/ ADD . /build/
WORKDIR /build WORKDIR /build
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o main . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o main .
FROM scratch 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 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: I use it like this:

BIN
content/posts/pi-hole/11.svg (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

View file

@ -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: 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 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) > \- [htmx docs](https://htmx.org/docs/#introduction)
Since I really don't like javascript that much, this promise is very tempting to me&nbsp;😁 Since I really don't like javascript that much, this promise is very tempting to me&nbsp;😁

View file

@ -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 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 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 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* > \- *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. 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.

View file

@ -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. 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. 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. 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 ## 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. 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.

View file

@ -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 * [Smartfire](https://www.smartfire.pro/) - small tech agency
Anyway, I'm really excited to start my new job! Wish me luck 😊 Anyway, I'm really excited to start my new job! Wish me luck 😊

View file

@ -6,4 +6,3 @@ layout: "search" # is necessary
summary: "search" summary: "search"
placeholder: "placeholder text in search input box" placeholder: "placeholder text in search input box"
--- ---

View file

@ -43,4 +43,4 @@ class Command(BaseCommand):
f.write("\n") f.write("\n")
f.write(content) f.write(content)
f.write("\n") f.write("\n")
self.stdout.write(self.style.SUCCESS("Successfully wrote all posts.")) self.stdout.write(self.style.SUCCESS("Successfully wrote all posts."))

View file

@ -2,4 +2,4 @@
<a href="mailto:ga-notes@augendre.info?subject={{.Title}}&amp;body={{.Permalink}}"> <a href="mailto:ga-notes@augendre.info?subject={{.Title}}&amp;body={{.Permalink}}">
<button>✉️ Reply via email</button> <button>✉️ Reply via email</button>
</a> </a>
</section> </section>

View file

@ -16,4 +16,4 @@ data-goatcounter="https://gc.gabnotes.org/count"></script>
<img src="https://gc.gabnotes.org/count?p={{ .RelPermalink }}" <img src="https://gc.gabnotes.org/count?p={{ .RelPermalink }}"
alt="GoatCounter tracking pixel"> alt="GoatCounter tracking pixel">
</noscript> </noscript>
{{ end }} {{ end }}

View file

@ -1,3 +1,3 @@
{{ if .Params.custom_css }} {{ if .Params.custom_css }}
<style>{{ .Params.custom_css | safeCSS }}</style> <style>{{ .Params.custom_css | safeCSS }}</style>
{{ end }} {{ end }}

View file

@ -1 +1 @@
{{ .Inner }} {{ .Inner }}