write post

This commit is contained in:
2021-12-24 15:27:09 +01:00
parent ac7db40baa
commit 1682f8fef9
4 changed files with 27 additions and 9 deletions

View File

@ -12,7 +12,7 @@ steps:
image: plugins/docker
settings:
registry: registry.okami101.io
repo: registry.okami101.io/adr1enbe4udou1n/blog
repo: adr1enbe4udou1n/blog
tags: latest
username:
from_secret: registry_username

1
.vscode/ltex.dictionary.en-US.txt vendored Normal file
View File

@ -0,0 +1 @@
shortcodes

View File

@ -11,8 +11,8 @@ Hi folks, I'm a web lover working [@Cesson-Sévigné](https://fr.wikipedia.org/w
I love develop proper API design following `DDD` + `Hexa` principles if applicable. My favorite backend stack is `ASP.NET Core` and `C#`. I'm also comfortable on [`Nest.js`](https://nestjs.com/) with combination on [`MikroORM`](https://mikro-orm.io/). I also used [`FastAPI`](https://fastapi.tiangolo.com/) as well as `Spring Boot` (*Java*).
Furthermore, I encourage `TDD` or at least proper **integration tests** on all types of backend frameworks, following `AAA` aka *Arrange Act Assert* principle. Mastering `PHPUnit` or [`Pest`](https://pestphp.com/) for *PHP*, `xUnit.net` with [`Fluent Assertions`](https://github.com/fluentassertions/fluentassertions) for *.NET Core*, `Jest` and `pytest` on respective *NodeJS* end *Python* stacks.
Furthermore, I encourage `TDD` or at least proper **integration tests** on all types of backend frameworks, following `AAA` aka *Arrange Act Assert* principle. Mastering `PHPUnit` or [`Pest`](https://pestphp.com/) for *PHP*, `xUnit.net` with [`Fluent Assertions`](https://github.com/fluentassertions/fluentassertions) for *.NET Core*, `JUnit` with [`REST Assured`](https://rest-assured.io/) for *Spring Boot*, `Jest` and `pytest` on respective *NodeJS* end *Python* stacks.
Fully embracing app containerization as `Docker`, from local, staging to production. I push to use `CI/CD` whenever is possible with proper configuration. I personally use [`Drone`](https://www.drone.io/) and `GitLab` as main CI/CD solutions.
Fully embracing app containerization as `Docker`, from local, staging to production. I push to use `CI/CD` whenever is possible with proper configuration. I personally use [`Drone CI`](https://www.drone.io/) and `GitLab` as main CI/CD solutions.
Mastering installations of `Docker Swarm` clusters with [`Traefik`](https://traefik.io/traefik/) as cloud proxy and [`Portainer`](https://www.portainer.io/) as proper GUI system for cluster management. I personally use combinations of `Grafana`, `Loki`, `Prometheus`, `Jaeger` as main *logging*, *metrics* and *tracing* tools.

View File

@ -5,20 +5,37 @@ description: "Now I can say I finally have a blog..."
tags: ["hugo", "docker", "drone"]
---
Here we are, never too late too init my first blog 🙊.
{{< lead >}}
Here we are, never too late too init my first blog 🙊.
{{< /lead >}}
So as a [cliché](https://www.hsablonniere.com/once-upon-a-blog--9849zg/), this first post must have to talk about his blog...
## Why Hugo ?
I first exit obviously standard all-in-one CMS as `Wordpress` because I wanted to stay minimalist, by writing markdown posts. Markdown-based headless CMS as `Strapi` is more suited, but I prefer to avoid DB storing write posts directly via VS Code with proper Markdown extensions, all versioned on Git. Besides, I wanted to have minimal work to do on frontend side with all basic blog features (pagination, tags and so on...), just some configurations, without lose any more advanced customization if needed.
I first exit obviously standard all-in-one CMS as `Wordpress`. As a markdown lover, Markdown-based headless CMS as `Strapi` seemed more suited, but I clearly prefer to avoid any heavy BO+DB storing combo and use Git power for proper native source revisions. Writing posts directly via VS Code with proper [Markdown extensions](https://github.com/valentjn/vscode-ltex) stays an invaluable experience for me 👌
So static generator was the obvious choice and `Hugo` was by far the easiest to use in order to make minimally featured proper blog. So many modern and artistic [themes](https://themes.gohugo.io/). [Congo](https://github.com/jpanther/congo) was the perfect choice for me with `Dark Mode`and `Tailwind` as a bonus 😍.
Besides, I wanted to have minimal work to do on frontend side 🚀 with all basic blog features (pagination, tags and so on...) 🎉, just some configurations, without lose any more advanced customization if needed 🛠️.
So flat-file based 📄 static generator was the obvious choice and `Hugo` was by far the easiest to use in order to make minimally featured proper blog. Hugo site documentation is clear and proposes many modern and artistic [themes](https://themes.gohugo.io/).
### The theme
[Congo](https://github.com/jpanther/congo) was the perfect choice for me with `Dark Mode`and `Tailwind` as a bonus 😍. It provides [additional shortcodes](https://jpanther.github.io/congo/docs/shortcodes/) as alert, badge, button, icons, katex, lead, as well as complete [charts](https://jpanther.github.io/congo/samples/charts/) and [diagrams](https://jpanther.github.io/congo/samples/diagrams-flowcharts/) system.
### The comments system
I found [utterances](https://utteranc.es/) as the perfect Disqus alternative choice between tracking-free, quick and easiest install, open source and not too much vendor locking by integrate comments directly to actual blog Github repo issues.
You obviously must have a Github account, if you prefer self-hosted solution and multi social login choices, it seems that [Remark42](https://github.com/umputun/remark42) is the perfect choice. Besides, it has official ready to go [Docker](https://hub.docker.com/r/umputun/remark42) image.
### The repo
As you can see the repo of this blog `https://github.com/adr1enbe4udou1n/blog`, thanks hugo modules we easily successfully manage to have only what maters in the repo, i.e. only hugo and theme related config files and obviously the contents and layouts overload for customization.
As you can see the [repo of this blog](https://github.com/adr1enbe4udou1n/blog), thanks to Hugo modules we easily successfully manage to have *only what maters* versioned, i.e. only hugo and theme related config files and obviously the contents and layouts overload for customization.
## Deployment
### Deployment
Hugo supports many deployments methods, with Github Actions as the simplest. In my case I prefer more self-hosted approach with my favorite CI/CD tool aka [Drone CI](https://www.drone.io/). Here is the simplest way to build an image and pushing into a custom private docker image registry.
```yaml
kind: pipeline
@ -35,7 +52,7 @@ steps:
image: plugins/docker
settings:
registry: registry.okami101.io
repo: registry.okami101.io/adr1enbe4udou1n/blog
repo: adr1enbe4udou1n/blog
tags: latest
username:
from_secret: registry_username