mirror of
https://github.com/Crocmagnon/blog.git
synced 2024-12-21 13:22:00 +01:00
fix pre-commit
This commit is contained in:
parent
9995ad3a4d
commit
cf7e2d9a05
24 changed files with 73 additions and 79 deletions
5
.github/workflows/hugo.yaml
vendored
5
.github/workflows/hugo.yaml
vendored
|
@ -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
|
||||
|
||||
|
|
|
@ -8,4 +8,3 @@ git clone git@github.com:Crocmagnon/blog.git
|
|||
cd blog
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
|
|
|
@ -3,4 +3,3 @@ title: "{{ replace .Name "-" " " | title }}"
|
|||
date: {{ .Date }}
|
||||
draft: true
|
||||
---
|
||||
|
||||
|
|
|
@ -18,4 +18,3 @@ cover:
|
|||
# showToc: true
|
||||
# TocOpen: false
|
||||
---
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ custom_css: >-
|
|||
justify-content: space-evenly;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
|
||||
.pictures a {
|
||||
box-shadow: 0 0;
|
||||
}
|
||||
|
|
BIN
content/posts/bitwarden-and-password-managers/3.svg
(Stored with Git LFS)
BIN
content/posts/bitwarden-and-password-managers/3.svg
(Stored with Git LFS)
Binary file not shown.
|
@ -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]
|
||||
|
|
BIN
content/posts/i-needed-a-budget-with-four-rules/20.svg
(Stored with Git LFS)
BIN
content/posts/i-needed-a-budget-with-four-rules/20.svg
(Stored with Git LFS)
Binary file not shown.
|
@ -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:
|
||||
|
||||
|
|
BIN
content/posts/pi-hole/11.svg
(Stored with Git LFS)
BIN
content/posts/pi-hole/11.svg
(Stored with Git LFS)
Binary file not shown.
BIN
content/posts/poetry-python-dependencies-management/35.svg
(Stored with Git LFS)
BIN
content/posts/poetry-python-dependencies-management/35.svg
(Stored with Git LFS)
Binary file not shown.
|
@ -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 😁
|
||||
|
|
|
@ -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.
|
||||
|
|
BIN
content/posts/replacing-my-synology-nas-with-a-self-built-server/26.svg
(Stored with Git LFS)
BIN
content/posts/replacing-my-synology-nas-with-a-self-built-server/26.svg
(Stored with Git LFS)
Binary file not shown.
|
@ -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.
|
||||
|
|
|
@ -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 😊
|
||||
|
||||
|
|
|
@ -6,4 +6,3 @@ layout: "search" # is necessary
|
|||
summary: "search"
|
||||
placeholder: "placeholder text in search input box"
|
||||
---
|
||||
|
||||
|
|
|
@ -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."))
|
||||
self.stdout.write(self.style.SUCCESS("Successfully wrote all posts."))
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
<a href="mailto:ga-notes@augendre.info?subject={{.Title}}&body={{.Permalink}}">
|
||||
<button>✉️ Reply via email</button>
|
||||
</a>
|
||||
</section>
|
||||
</section>
|
||||
|
|
|
@ -16,4 +16,4 @@ data-goatcounter="https://gc.gabnotes.org/count"></script>
|
|||
<img src="https://gc.gabnotes.org/count?p={{ .RelPermalink }}"
|
||||
alt="GoatCounter tracking pixel">
|
||||
</noscript>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{{ if .Params.custom_css }}
|
||||
<style>{{ .Params.custom_css | safeCSS }}</style>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{{ .Inner }}
|
||||
{{ .Inner }}
|
||||
|
|
Loading…
Reference in a new issue