Multiple small fixes and upgrades

This commit is contained in:
Thanwer 2026-05-09 22:34:02 +02:00
parent 60d5b995b1
commit 4c61829556
20 changed files with 275 additions and 119 deletions

56
AGENTS.md Normal file
View File

@ -0,0 +1,56 @@
# AGENTS.md — Thanwer's Blog
## Project
Hugo blog (multilingual EN + PT-BR) using the **anubis2** theme as a git submodule (`themes/anubis2`, v1.6.0). Deployed via rsync to a VPS.
## Commands
```bash
hugo server # dev server at localhost:1313
hugo # build to ./public/
./deploy.sh # hugo --minify && rsync to server
```
No tests, linter, or typecheck.
## Content conventions
- **Posts**: `content/posts/<slug>.md` (EN), `content/posts/<slug>.pt.md` (PT-BR)
- **Images**: `static/images/<filename>` — referenced as `/images/<filename>` in markdown
- **PT translations** set `canonical = "/posts/<en-slug>"` in frontmatter to point to the English original
- **`lastmod`** in frontmatter must use bare TOML datetime (no quotes): `lastmod = 2026-05-09T00:00:00Z`. With `enableGitInfo = true`, the template prefers `.Params.lastmod` over git dates — avoid `'<string>'` quoted format (Hugo stores it as string, not `time.Time`)
- **Archetype**: `hugo new posts/<slug>.md` uses `archetypes/default.md`
- **Tags** only (no categories used): `tags = ["GNU/Linux", "Tools"]`
## Theme overrides (site `layouts/` shadows theme)
- `layouts/partials/head.html` — overrides theme head: adds canonical from frontmatter (`Params.canonical`), production-only Umami analytics
- `layouts/partials/post-info.html` — overrides theme: prefers `.Params.lastmod` over `.Lastmod` (git override), shows "Last modified" when `lastmod ≠ date`
- `layouts/partials/footer-extra.html` — Ko-fi floating chat widget
- `layouts/robots.txt` — custom sitemap entries for both languages
## Configuration quirks
- Theme expects **all lowercase keys** under `params.anubis2`: `colortheme`, `enablecolorthemeswitcher`, `readnextposts`, `socialicons`, etc. — see `themes/anubis2/PARAMS.md`
- `[params.anubis2.services.umami]` uses lowercase keys: `id`, `url`
- Analytics only inject in production (`hugo.IsProduction`). For testing analytics locally: `hugo server --environment production`
- Config uses modern Hugo keys: `locale` (not `languageCode`), `label` (not `languageName`)
- `enableGitInfo = true``.Lastmod` is derived from git; template falls back to frontmatter `lastmod` when set
## Frontmatter reference
```toml
date = 2024-10-26T16:59:23-03:00
lastmod = 2026-05-09T00:00:00Z # bare datetime, no quotes
title = 'Post Title'
description = "One-line summary for SEO and RSS"
tags = ["tag1", "tag2"]
canonical = "/posts/original-post" # PT translations only
```
## Deprecated Hugo keys (avoid)
- `languageCode` → use `locale`
- `languageName` → use `label`
- `.Site.LanguageCode` → use `.Site.Language.Locale`

13
content/about.md Normal file
View File

@ -0,0 +1,13 @@
+++
date = '2026-05-09T00:00:00Z'
title = 'About'
description = "About Pietro Arancibia \"Thanwer\""
+++
Hey, I'm **Pietro Arancibia** (a.k.a. **Thanwer**), a sysadmin and GNU/Linux enthusiast currently based in Germany.
I created this blog to share practical knowledge about server administration, security, and tools I use in my day-to-day work. Most posts come from real problems I've encountered — things I wished someone had told me earlier.
When I'm not breaking or fixing servers, I enjoy contributing to open-source projects and exploring new technologies.
Feel free to reach out via any of the social links on this site!

14
content/about.pt.md Normal file
View File

@ -0,0 +1,14 @@
+++
date = '2026-05-09T00:00:00Z'
title = 'Sobre'
description = "Sobre Pietro Arancibia \"Thanwer\""
canonical = "/about"
+++
Olá, sou **Pietro Arancibia** (conhecido como **Thanwer**), um sysadmin e entusiasta de GNU/Linux atualmente baseado na Alemanha.
Criei este blog para compartilhar conhecimento prático sobre administração de servidores, segurança e ferramentas que uso no meu dia a dia. A maioria dos posts vem de problemas reais que encontrei - coisas que gostaria que alguém tivesse me dito antes.
Quando não estou quebrando ou consertando servidores, gosto de contribuir com projetos open-source e explorar novas tecnologias.
Sinta-se à vontade para entrar em contato através dos links sociais deste site!

View File

@ -1,7 +1,7 @@
+++ +++
date = '2024-10-23T20:43:44-03:00' date = '2024-10-23T20:43:44-03:00'
title = 'Securing Your Linux Server with Fail2Ban for SSH Protection' title = 'Securing Your Linux Server with Fail2Ban for SSH Protection'
description = "Thanwer's Blog Post about how to use Fail2ban" description = "Learn how to configure Fail2ban SSH jails on GNU/Linux with custom ban times, multipliers, and trusted IPs to protect your server from brute-force attacks."
tags = [ tags = [
"webserver", "webserver",
"GNU/Linux", "GNU/Linux",
@ -86,7 +86,7 @@ As you can see, the SSH service on a cloud VPS is constantly being attacked, my
Today I showed how to protect your GNU/Linux SSH service, but is is not over, you can use fail2ban to protect any service that you run! Today I showed how to protect your GNU/Linux SSH service, but is is not over, you can use fail2ban to protect any service that you run!
You can even integrate fail2ban protection with [Cloudflare](https://github.com/nesrual/fail2ban-cloudflare!) if you use their services! You can even integrate fail2ban protection with [Cloudflare](https://github.com/nesrual/fail2ban-cloudflare) if you use their services!
I suggest you to check the `/etc/fail2ban/filter.d` folder, which contains the default filters for popular services, like Apache, Asterisk, Mail server services, etc... I suggest you to check the `/etc/fail2ban/filter.d` folder, which contains the default filters for popular services, like Apache, Asterisk, Mail server services, etc...

View File

@ -1,20 +1,20 @@
+++ +++
date = '2024-10-23T20:43:44-03:00' date = '2024-10-23T20:43:44-03:00'
title = 'Melhorando a segurança do seu servidor com o Fail2ban' title = 'Melhorando a segurança do seu servidor com o Fail2ban'
description = "Post no blog do Thanwer sobre como usar o Fail2ban" description = "Aprenda a configurar jails SSH no Fail2ban em GNU/Linux com tempos de banimento customizados, multiplicadores e IPs confiáveis para proteger seu servidor contra ataques de força bruta."
tags = [ tags = [
"webserver", "webserver",
"GNU/Linux", "GNU/Linux",
"Basics Series", "Basics Series",
] ]
canonical = "posts/fail2ban-basics" canonical = "/posts/fail2ban-basics"
+++ +++
[Fail2ban](https://github.com/fail2ban/fail2ban) é um software que escaneia arquivos de logs como o `/var/log/auth.log` e bane IPs com muitas falhas de login. [Fail2ban](https://github.com/fail2ban/fail2ban) é um software que escaneia arquivos de logs como o `/var/log/auth.log` e bane IPs com muitas falhas de login.
Isso é apenas uma camada de segurança e deve ser utilizada em conjunto com outras ferramentas como o iptables e melhorias na configuração do SSH. Isso é apenas uma camada de segurança e deve ser utilizada em conjunto com outras ferramentas como o iptables e melhorias na configuração do SSH.
Eu sempre configuro uma jail para SSH usando o fail2ban em meus servidoresGNU/Linux. Eu sempre configuro uma jail para SSH usando o fail2ban em meus servidores GNU/Linux.
Hoje, vou mostrar como configurar uma jail simples para o SSH. Hoje, vou mostrar como configurar uma jail simples para o SSH.
@ -87,7 +87,7 @@ Como voce pode ver, o serviço SSH em uma VPS em cloud é constantemente atacada
Hoje eu mostrei como proteger o seu serviço SSH em uma maquina GNU/Linux, mas não acabou, voce pode usar o fail2ban para qualquer serviço! Hoje eu mostrei como proteger o seu serviço SSH em uma maquina GNU/Linux, mas não acabou, voce pode usar o fail2ban para qualquer serviço!
Voce pode até mesmo integrar a proteção do fail2ban com o [Cloudflare](https://github.com/nesrual/fail2ban-cloudflare!) se voce usa os serviços deles! Voce pode até mesmo integrar a proteção do fail2ban com o [Cloudflare](https://github.com/nesrual/fail2ban-cloudflare) se voce usa os serviços deles!
Eu sugiro que voce veja o diretório `/etc/fail2ban/filter.d`, que contem os filtros default para vários serviços populares, como Apache, Asterisk, serviços de servidor de e-mail, etc... Eu sugiro que voce veja o diretório `/etc/fail2ban/filter.d`, que contem os filtros default para vários serviços populares, como Apache, Asterisk, serviços de servidor de e-mail, etc...

View File

@ -1,7 +1,7 @@
+++ +++
date = '2024-10-19T23:00:41-03:00' date = '2024-10-19T23:00:41-03:00'
title = 'First Post' title = 'First Post'
description = "A simple blog post about using Hugo as a framework for Thanwer's Blog" description = "Starting a sysadmin blog with Hugo: why I chose a static site generator, how I deployed it on Hetzner Cloud via rsync, and what to expect from this blog."
tags = [ tags = [
"webserver", "webserver",
"Hugo", "Hugo",
@ -28,7 +28,7 @@ You can also use [Github Pages](https://pages.github.com/) or [Cloudflare Pages]
## The deploy ## The deploy
I followed Hugo guide to [deploy by rsync](https://gohugo.io/hosting-and-deployment/deployment-with-rsync/) and I worked very well for me. I followed Hugo guide to [deploy by rsync](https://gohugo.io/hosting-and-deployment/deployment-with-rsync/) and it worked very well for me.
A simple bash script to generate the website and deploy, all in one line! A simple bash script to generate the website and deploy, all in one line!
@ -39,4 +39,4 @@ hugo && rsync -avz --delete public/ shinobi.thanwer.com:/srv/www/blog/
## The Conclusion ## The Conclusion
From my experience until now (which is only the contents of this post btw...), this platform seems to meet my expectations I will continue to bring move topics and keep you guys posted! From my experience until now (which is only the contents of this post btw...), this platform seems to meet my expectations I will continue to bring more topics and keep you guys posted!

View File

@ -1,7 +1,7 @@
+++ +++
date = '2024-10-19T23:00:41-03:00' date = '2024-10-19T23:00:41-03:00'
title = 'First Post' title = 'First Post'
description = "A simple blog post about using Hugo as a framework for Thanwer's Blog" description = "Iniciando um blog de sysadmin com Hugo: por que escolhi um gerador de sites estáticos, como fiz deploy na Hetzner Cloud via rsync, e o que esperar deste blog."
tags = [ tags = [
"webserver", "webserver",
"Hugo", "Hugo",
@ -40,4 +40,4 @@ hugo && rsync -avz --delete public/ shinobi.thanwer.com:/srv/www/blog/
## Conclusões ## Conclusões
Pela minha experiência até agora (que foi apenas o conteúdo dessa pagina a propósito...), essa plataforma parece atender minhas expectativas, vou continuar trazendo mais conteúdo e mantenho vocês informados. Pela minha experiência até agora (que foi apenas o conteúdo dessa página a propósito...), essa plataforma parece atender minhas expectativas, vou continuar trazendo mais conteúdo e mantenho vocês informados.

View File

@ -1,7 +1,7 @@
+++ +++
date = '2024-10-20T14:22:33-03:00' date = '2024-10-20T14:22:33-03:00'
title = 'Mastering iptables: Basic Firewall Configurations for a Newly Deployed GNU/Linux Server' title = 'Mastering iptables: Basic Firewall Configurations for a Newly Deployed GNU/Linux Server'
description = "The basic usage of iptables for a new GNU/Linux webserver" description = "A step-by-step guide to configuring iptables firewall rules for a newly deployed GNU/Linux server, covering SSH, HTTP/HTTPS, IPv6, ICMP, and security best practices."
tags = [ tags = [
"webserver", "webserver",
"GNU/Linux", "GNU/Linux",

View File

@ -1,7 +1,7 @@
+++ +++
date = '2024-10-20T14:22:33-03:00' date = '2024-10-20T14:22:33-03:00'
title = 'Dominando o iptables: Configurações básicas de firewall para um servidor GNU/Linux recém-implantado' title = 'Dominando o iptables: Configurações básicas de firewall para um servidor GNU/Linux recém-implantado'
description = "O uso básico do iptables para um novo servidor web GNU/Linux" description = "Um guia passo a passo para configurar regras de firewall iptables em um servidor GNU/Linux recém-implantado, cobrindo SSH, HTTP/HTTPS, IPv6, ICMP e melhores práticas de segurança."
tags = [ tags = [
"webserver", "webserver",
"GNU/Linux", "GNU/Linux",
@ -14,7 +14,7 @@ Ao configurar um novo servidor Linux, uma das primeiras coisas que você deve fa
Nesta publicação, vou mostrar algumas configurações básicas do iptables para um servidor recém-implantado. No final, você terá um firewall sólido para proteger seus serviços e, ao mesmo tempo, manter as coisas simples. Nesta publicação, vou mostrar algumas configurações básicas do iptables para um servidor recém-implantado. No final, você terá um firewall sólido para proteger seus serviços e, ao mesmo tempo, manter as coisas simples.
## Oque é iptables? ## O que é iptables?
iptables é um utilitário de firewall por linha de comando que utiliza "chains" para gerenciar o tráfego. As "chains" são basicamente uma lista de regras que aplicam para pacotes de entrada ou saída. Voce pode fazer as regras baseadas em IPs de origem, portas e protocolos, por exemplo. iptables é um utilitário de firewall por linha de comando que utiliza "chains" para gerenciar o tráfego. As "chains" são basicamente uma lista de regras que aplicam para pacotes de entrada ou saída. Voce pode fazer as regras baseadas em IPs de origem, portas e protocolos, por exemplo.

View File

@ -1,7 +1,7 @@
+++ +++
date = '2024-10-31T22:00:53-03:00' date = '2024-10-31T22:00:53-03:00'
title = 'Netcat' title = 'Netcat'
description = "Thanwer's Blog Post about netcat tool" description = "Learn how to use netcat (nc) for network troubleshooting, file transfers, port scanning, and directly communicating with services like SMTP on GNU/Linux."
tags = [ tags = [
"GNU/Linux", "GNU/Linux",
"Tools", "Tools",
@ -101,7 +101,7 @@ nc -l -p 1234 > received_file.txt
On the senders end, assuming that 192.0.0.2 is the receiving server: On the senders end, assuming that 192.0.0.2 is the receiving server:
```bash ```bash
nc 192.0.0.2 -p 1234 < file_to_send.txt nc 192.0.0.2 1234 < file_to_send.txt
``` ```
This can be useful for transferring a log file for example. This can be useful for transferring a log file for example.

View File

@ -1,7 +1,7 @@
+++ +++
date = '2024-10-31T22:00:53-03:00' date = '2024-10-31T22:00:53-03:00'
title = 'Netcat' title = 'Netcat'
description = "Post no blog do Thanwer sobre a ferramenta netcat." description = "Aprenda a usar o netcat (nc) para troubleshooting de rede, transferência de arquivos, varredura de portas e comunicação direta com serviços como SMTP no GNU/Linux."
tags = [ tags = [
"GNU/Linux", "GNU/Linux",
"Tools", "Tools",
@ -102,12 +102,12 @@ nc -l -p 1234 > arquivo_recebido.txt
No transmissor, assumindo que o receptor seja o IP 192.0.0.2:: No transmissor, assumindo que o receptor seja o IP 192.0.0.2::
```bash ```bash
nc 192.0.0.2 -p 1234 < arquivo_para_enviar.txt nc 192.0.0.2 1234 < arquivo_para_enviar.txt
``` ```
Isso pode ser util para transferir um arquivo de log, por exemplo. Isso pode ser util para transferir um arquivo de log, por exemplo.
#### Port scac #### Port scan
nc pode ser usado como uma alternativa "mais barata" para o nmap: nc pode ser usado como uma alternativa "mais barata" para o nmap:

View File

@ -1,13 +1,12 @@
+++ +++
date = '2025-10-12T13:41:47+02:00' date = '2025-10-12T13:41:47+02:00'
title = 'Shrink VMDK safely' title = 'Shrink VMDK safely'
description = "Thanwer's Blog Post about how to safely resize a VMDK file" description = "A safe method to shrink VMDK disk files in ESXi using Clonezilla, without manually editing VMX files — perfect for physical-to-virtual conversions."
tags = [ tags = [
"GNU/Linux", "GNU/Linux",
"Tools", "Tools",
"ESXi", "ESXi",
] ]
canonical = "/posts/shrink-vmdk"
+++ +++
I recently was tasked to convert a couple physical servers to virtual machines. I recently was tasked to convert a couple physical servers to virtual machines.
@ -77,3 +76,7 @@ After following the rest of the wizard, the cloning process will start.
After the process is complete, you will have a new virtual machine with a smaller disk size, and the same data as the original virtual machine. After the process is complete, you will have a new virtual machine with a smaller disk size, and the same data as the original virtual machine.
This will leave you with the original VMDK file, and a smaller one. After verifying that the new virtual machine works correctly, you can delete the original one to free up space. This will leave you with the original VMDK file, and a smaller one. After verifying that the new virtual machine works correctly, you can delete the original one to free up space.
## Conclusion
Using Clonezilla to clone to a smaller disk is a safe and reliable method to shrink VMDK files without touching VMX files directly. While it requires more steps than the manual approach, it reduces the risk of configuration errors that could leave your VM unbootable. As always, keep backups before attempting any disk resizing operations.

View File

@ -1,12 +1,11 @@
+++ +++
date = '2025-09-14T10:19:39+02:00' date = '2025-09-14T10:19:39+02:00'
title = 'Slurm' title = 'Slurm'
description = "Thanwer's Blog Post about the Slurm tool" description = "A practical guide to setting up a Slurm cluster for HPC and bioinformatics workloads, covering installation, configuration, job submission, and useful tips."
tags = [ tags = [
"GNU/Linux", "GNU/Linux",
"Tools", "Tools",
] ]
canonical = "/posts/slurm"
+++ +++
So recently I was tasked to set up a Slurm cluster for bioinformatics workloads, and I thought it would be a good idea to share some notes about the installation and configuration process. So recently I was tasked to set up a Slurm cluster for bioinformatics workloads, and I thought it would be a good idea to share some notes about the installation and configuration process.

View File

@ -1,7 +1,7 @@
+++ +++
date = '2024-10-26T16:59:23-03:00' date = '2024-10-26T16:59:23-03:00'
title = 'Advanced SSH Hardening Best Practices' title = 'Advanced SSH Hardening Best Practices'
description = "Thanwer's Blog Post about best practices for hardening SSH servers" description = "Strengthen your SSH server security with key-based authentication, 2FA, encryption hardening, access restrictions, and disabling unused auth methods."
tags = [ tags = [
"webserver", "webserver",
"GNU/Linux", "GNU/Linux",
@ -65,3 +65,7 @@ AllowUsers *@192.0.0.0/24
Match User alice Match User alice
AllowUsers alice@192.0.0.2 AllowUsers alice@192.0.0.2
``` ```
## Conclusion
SSH hardening is a continuous process, not a one-time task. Start with key-based authentication and disable password login, then layer on 2FA, encryption hardening, and access restrictions. Combined with iptables rules and fail2ban jails, you can significantly reduce the attack surface of your server. Review your SSH configuration periodically and keep up with the latest security recommendations.

View File

@ -1,7 +1,7 @@
+++ +++
date = '2024-10-26T16:59:23-03:00' date = '2024-10-26T16:59:23-03:00'
title = 'Boas praticas para configuração do SSH' title = 'Boas práticas para configuração do SSH'
description = "Post no blog do Thanwer sobre melhores praticas para configurar servidores SSH" description = "Fortaleça a segurança do seu servidor SSH com autenticação por chaves, 2FA, hardening de criptografia, restrições de acesso e desativação de métodos não utilizados."
tags = [ tags = [
"webserver", "webserver",
"GNU/Linux", "GNU/Linux",
@ -14,7 +14,7 @@ Como voce pode ver no meu ultimo post sobre [fail2ban]({{< ref "/posts/fail2ban-
Além de regras do iptables e jails do fail2ban, temos alguns parâmetros que podemos ajustar nos nossos servidores para termos mais uma medida de proteção. Além de regras do iptables e jails do fail2ban, temos alguns parâmetros que podemos ajustar nos nossos servidores para termos mais uma medida de proteção.
## Métodos de autenticação SSG ## Métodos de autenticação SSH
Por padrão, o serviço SSH permite autenticação por senha para todos os usuários exceto o root, oque é um bom começo, mas podemos fazer mais. Por padrão, o serviço SSH permite autenticação por senha para todos os usuários exceto o root, oque é um bom começo, mas podemos fazer mais.
@ -33,7 +33,7 @@ PermitRootLogin no
### Autenticação por dois fatores (2FA) ### Autenticação por dois fatores (2FA)
Se voce quiser mais um nivel de segurança, voce pode implementar [autenticação de dois fatores com o Google Autenticator](https://docs.vultr.com/how-to-use-two-factor-authentication-with-sudo-and-ssh-on-linux-with-google-authenticator). Se voce quiser mais um nivel de segurança, voce pode implementar [autenticação de dois fatores com o Google Authenticator](https://docs.vultr.com/how-to-use-two-factor-authentication-with-sudo-and-ssh-on-linux-with-google-authenticator).
### Desativar métodos de autenticação não utilizados ### Desativar métodos de autenticação não utilizados
@ -66,3 +66,7 @@ AllowUsers *@192.0.0.0/24
Match User alice Match User alice
AllowUsers alice@192.0.0.2 AllowUsers alice@192.0.0.2
``` ```
## Conclusão
O hardening do SSH é um processo contínuo, não uma tarefa única. Comece com autenticação por chaves e desative o login por senha, depois adicione camadas como 2FA, hardening de criptografia e restrições de acesso. Combinado com regras de iptables e jails do fail2ban, você pode reduzir significativamente a superfície de ataque do seu servidor. Revise sua configuração SSH periodicamente e mantenha-se atualizado com as recomendações de segurança mais recentes.

View File

@ -1,2 +1,2 @@
#!/usr/bin/env bash #!/usr/bin/env bash
hugo && rsync -avz --delete public/ shinobi.thanwer.com:/srv/www/blog/ hugo --minify && rsync -avz --delete public/ shinobi.thanwer.com:/srv/www/blog/

View File

@ -1,28 +1,87 @@
baseURL = 'https://blog.thanwer.com/' baseURL = 'https://blog.thanwer.com/'
languageCode = 'en-us' locale = 'en-US'
theme = "anubis2" theme = "anubis2"
title = "Thanwer's Blog" title = "Thanwer's Blog"
enableRobotsTXT = true enableRobotsTXT = true
enableGitInfo = true enableGitInfo = true
defaultContentLanguage = 'en' defaultContentLanguage = 'en'
[pagination]
pagerSize = 5
[taxonomies]
tag = "tags"
[languages] [languages]
[languages.en] [languages.en]
languageName = 'EN' label = 'EN'
weight = 1 weight = 1
[languages.pt]
languageName = 'BR' [[languages.en.menu.main]]
languageCode = 'pt-BR' identifier = "home"
name = "Home"
url = "/"
weight = 1
[[languages.en.menu.main]]
identifier = "tags"
name = "Tags"
url = "/tags/"
weight = 2 weight = 2
[[languages.en.menu.main]]
identifier = "archive"
name = "Archive"
url = "/posts/"
weight = 3
[[languages.en.menu.main]]
identifier = "about"
name = "About"
url = "/about/"
weight = 4
[languages.pt]
label = 'BR'
locale = 'pt-BR'
weight = 2
[[languages.pt.menu.main]]
identifier = "home"
name = "Início"
url = "/"
weight = 1
[[languages.pt.menu.main]]
identifier = "tags"
name = "Tags"
url = "/tags/"
weight = 2
[[languages.pt.menu.main]]
identifier = "archive"
name = "Arquivo"
url = "/posts/"
weight = 3
[[languages.pt.menu.main]]
identifier = "about"
name = "Sobre"
url = "/about/"
weight = 4
[params] [params]
author.name = "Pietro Arancibia" author.name = "Pietro Arancibia"
author.email = "admin@thanwer.com" author.email = "admin@thanwer.com"
author.location = "Germany" author.location = "Germany"
anubis2.colorTheme = "auto"
anubis2.enableColorThemeSwitcher = true
description = "A blog written by Pietro Arancibia \"Thanwer\"" description = "A blog written by Pietro Arancibia \"Thanwer\""
anubis2.socialIcons = [ dateFormat = "2006-01-02"
[params.anubis2]
colorTheme = "auto"
enableColorThemeSwitcher = true
readNextPosts = 3
socialIcons = [
{ id = "github", url = "https://github.com/thanwer" }, { id = "github", url = "https://github.com/thanwer" },
{ id = "linkedin", url = "https://www.linkedin.com/in/thanwer/" }, { id = "linkedin", url = "https://www.linkedin.com/in/thanwer/" },
{ id = "email", url = "mailto:admin@thanwer.com" }, { id = "email", url = "mailto:admin@thanwer.com" },
@ -30,10 +89,15 @@ anubis2.socialIcons = [
{ id = "instagram", url = "https://www.instagram.com/thanwer/" }, { id = "instagram", url = "https://www.instagram.com/thanwer/" },
{ id = "telegram", url = "https://t.me/thanwer" }, { id = "telegram", url = "https://t.me/thanwer" },
{ id = "x", url = "https://x.com/thanwer" }, { id = "x", url = "https://x.com/thanwer" },
{ id = "youtube", url = "https://youtube.com/lordthanwer" } { id = "youtube", url = "https://youtube.com/lordthanwer" },
] ]
[params.anubis2.services.umami]
id = "eded536d-a598-471a-945b-faaebc4837a9"
url = "https://umami.thanwer.com/script.js"
[markup.goldmark.renderer] [markup.goldmark.renderer]
unsafe = true # true | false; Enable unsafe mode to have a better experience unsafe = true
[markup.highlight] [markup.highlight]
style = 'base16-snazzy' # Highlight.js style style = 'base16-snazzy'

View File

@ -1,47 +1,37 @@
<!-- Basic stuff -->
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="HandheldFriendly" content="True"> <meta name="HandheldFriendly" content="True">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer-when-downgrade"> <meta name="referrer" content="no-referrer-when-downgrade">
<meta name="theme-name" content="Anubis2">
{{ partial "title.html" . }} {{ partial "title.html" . }}
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"> <meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}">
<meta name="author" content="{{ with .Params.author }}{{ . }}{{ else }}{{ with site.Params.author }}{{ . }}{{ end }}{{ end -}}">
<meta name="copyright" content="{{ with site.Params.copyright }}{{ . }}{{ else }}{{ with site.Params.author }}{{ . }}{{ end }}{{ end -}}">
{{ with .Keywords }} {{ with .Keywords }}
<meta name="keywords" content="{{ range $i, $e := . }}{{ if $i }},{{ end }}{{ $e }}{{ end }}"> <meta name="keywords" content="{{ range $i, $e := . }}{{ if $i }},{{ end }}{{ $e }}{{ end }}">
{{ end }} {{ end }}
{{ if and (.IsPage) (eq .Params.hidden true)}} {{ if and (.IsPage) (eq .Params.private true)}}
<meta name="robots" content="noindex" /> <meta name="robots" content="noindex" />
{{ end }} {{ end }}
{{ with .OutputFormats.Get "rss" -}} {{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink site.Title | safeHTML }}
{{ end -}} {{ end -}}
{{ partial "favicons.html" . }} {{ partial "head/favicons.html" . }}
{{ $colorTheme := "light" }} {{ $params := partial "params-helper.html" . }}
{{ $colorThemeSwitcher := true }}
{{ if and (isset site.Params "colortheme") (ne site.Params.colortheme "") }} {{ if or (eq $params.enableColorThemeSwitcher true) (eq $params.colorTheme "auto") }}
{{ $colorTheme = site.Params.colortheme | lower }}
{{ end }}
{{ if isset site.Params "colorthemeswitcher" }}
{{ $colorThemeSwitcher = site.Params.colorthemeswitcher }}
{{ else }}
{{ $colorThemeSwitcher = true }}
{{ end }}
{{ if or (eq $colorThemeSwitcher true) (eq $colorTheme "auto") }}
<style> <style>
body { body {
visibility: hidden; visibility: hidden;
opacity: 0; opacity: 0;
} }
</style> </style>
<noscript> <noscript>
<style> <style>
body { body {
@ -50,80 +40,33 @@
} }
</style> </style>
</noscript> </noscript>
{{end}} {{ end }}
{{ partial "resource.html" (dict "context" . "type" "css" "filename" "css/main.css") }} {{ partial "resource.html" (dict "context" . "type" "css" "filename" "css/main.css") }}
{{ partial "resource.html" (dict "context" . "type" "css" "filename" "css/light.css") }} {{ partial "resource.html" (dict "context" . "type" "css" "filename" "css/light.css") }}
{{ partial "resource.html" (dict "context" . "type" "css" "filename" "css/dark.css") }} {{ partial "resource.html" (dict "context" . "type" "css" "filename" "css/dark.css") }}
{{ partial "features/custom-css.html" . }}
{{ partial "features/custom-js.html" . }}
{{ $opts := dict "transpiler" "libsass" "targetPath" "css/style.css" }} {{ if $params.enableCopyCodeButton }}
{{ range site.Params.customCSS }}
{{ $r := "" }}
{{ with resources.Get . }}
{{ $r = . }}
{{ else }}
{{ errorf "error: You defined customCSS, but %s was not found, please check your config." . }}
{{ end }}
{{ if $r}}
{{ with $r | toCSS $opts | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{ end }}
{{ end }}
{{ end }}
{{ if site.Params.isso.enabled }} {{/* TODO: maybe we can remove it */}}
<style>
#isso-thread .textarea {
color: #000;
}
#isso-thread .isso-feedlink {
position: relative;
z-index: 1;
}
</style>
{{ end }}
{{ if .Site.Params.copyCodeButton | default true }}
{{ partial "resource.html" (dict "context" . "type" "js" "filename" "js/copy-code.js") }} {{ partial "resource.html" (dict "context" . "type" "js" "filename" "js/copy-code.js") }}
{{ end }} {{ end }}
{{ range .Site.Params.customJS -}} {{ range $params.customJS -}}
{{ partial "resource.html" (dict "context" $ "type" "js" "filename" . ) }} {{ partial "resource.html" (dict "context" $ "type" "js" "filename" . ) }}
{{- end }} {{- end }}
{{ if isset .Site.Params "webmentions" }}
{{ if isset .Site.Params.webmentions "login" }}
<link rel="webmention" href="https://webmention.io/{{.Site.Params.webmentions.login}}/webmention" />
{{ if eq .Site.Params.webmentions.pingback true }}
<link rel="pingback" href="https://webmention.io/{{.Site.Params.webmentions.login}}/xmlrpc" />
{{ end }}
{{ end }}
{{ if isset .Site.Params.webmentions "url" }}
<link rel="webmention" href="{{.Site.Params.webmentions.url}}" />
{{ end }}
{{ end }}
{{- if isset .Params "canonical" -}} {{- if isset .Params "canonical" -}}
<link rel="canonical" href="{{ .Params.canonical }}" /> <link rel="canonical" href="{{ .Params.canonical }}" />
{{- else -}} {{- else -}}
<link rel="canonical" href="{{ .Permalink }}" /> <link rel="canonical" href="{{ .Permalink }}" />
{{- end }} {{- end }}
<!-- Article tags -->
<!-- <meta property="article:published_time" content="">
<meta property="article:modified_time" content="">
<meta property="article:tag" content="">
<meta property="article:publisher" content="https://www.facebook.com/XXX"> -->
{{ if (.Site.Params.GoogleAnalytics.enabled) }}
{{ partial "google_analytics.html" . }}
{{ end }}
{{ if (.Site.Params.UmamiAnalytics.enabled ) }}
{{ partial "umami_analytics.html" . }}
{{ end }}
{{ partial "head-extra.html" . }} {{ partial "head-extra.html" . }}
<script defer src="https://umami.thanwer.com/script.js" data-website-id="eded536d-a598-471a-945b-faaebc4837a9"></script>
{{ if hugo.IsProduction }}
{{ if isset $params.services "umami" }}
{{ partial "analytics/umami_analytics.html" . }}
{{ end }}
{{ end }}

View File

@ -0,0 +1,56 @@
{{ $dateFormat := "2006-01-02" }}
{{ if site.Params.dateFormat }}
{{ $dateFormat = site.Params.dateFormat }}
{{ end }}
{{ $machineDateFormat := "2006-01-02" }}
{{ $lastmod := .Lastmod }}
{{ if .Params.lastmod }}
{{ $lastmod = .Params.lastmod }}
{{ end }}
<div class="post-info noselect">
{{ if .Params.date }}
<div class="post-date dt-published">
<time datetime="{{ .Params.date.Format $machineDateFormat }}">
{{- .Params.date.Format $dateFormat -}}
</time>
{{ if and $lastmod (ne $lastmod .Date) -}}
[{{ i18n "lastMod" }} <time datetime="{{ $lastmod.Format $machineDateFormat }}">
{{- $lastmod.Format $dateFormat -}}
</time>]
{{- end }}
</div>
{{ end }}
<a class="post-hidden-url u-url" href="{{ .RelPermalink }}">{{ .RelPermalink }}</a>
<a href="{{ site.BaseURL }}" class="p-name p-author post-hidden-author h-card" rel="me">{{ .Params.author | default site.Params.author }}</a>
<div class="post-taxonomies">
{{ if .Params.categories }}
<ul class="post-categories">
{{ range $cat_name := .Params.categories }}
{{ $cat_url := (printf "/categories/%s" $cat_name | urlize ) }}
<li><a href="{{ $cat_url }}">{{ $cat_name }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ if .Params.tags }}
<ul class="post-tags">
{{ range $tag_name := .Params.tags }}
{{ $tag_url := (printf "/tags/%s" ($tag_name | urlize)) }}
<li><a href="{{ $tag_url }}">#{{ $tag_name }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ if .Params.authors }}
<ul class="post-authors">
{{ range $author_name := .Params.authors }}
{{ $author := (site.GetPage (printf "/authors/%s" $author_name | urlize )) }}
<li><a href="{{ $author.RelPermalink }}">@{{ $author_name }}</a></li>
{{ end }}
</ul>
{{ end }}
</div>
</div>

@ -1 +1 @@
Subproject commit d55179e08b3148bf46db7849d54ad81e06bb0306 Subproject commit 9c4e5b169d285c4c008a754bbd361181407323ed