Compare commits

...
9 Commits
Author SHA1 Message Date
Vezpi e835486965 change: add HUGO_DEST and remove metrics
Deploy / Deploy (push) Failing after 3s
2025-06-02 13:04:51 +00:00
Vezpi 4d1a265b9d fix: change verbose to logLevel
Deploy / Deploy (push) Successful in 3s
2025-06-02 12:58:32 +00:00
Vezpi c05ccae7ff change: harden hugo page generation
Deploy / Deploy (push) Successful in 4s
2025-06-02 12:56:18 +00:00
Vezpi 82170a7ee5 add: index.json layout
Deploy / Deploy (push) Successful in 3s
2025-06-02 12:52:40 +00:00
Vezpi 31ab29ccbb remove: unused themes PaperMod and hugo-coder
Deploy / Deploy (push) Successful in 3s
2025-06-02 11:28:37 +02:00
Vezpi 687595b4c9 fix: add recurse-submodules in the git clone
Deploy / Deploy (push) Successful in 4s
2025-06-02 09:21:09 +00:00
Vezpi 51a5046f3c fix: change image base from alpine to stable
Deploy / Deploy (push) Successful in 4s
2025-06-02 08:38:52 +00:00
Vezpi b9b4d0bf8b add: docker folder for image build
Deploy / Deploy (push) Successful in 6s
2025-06-02 08:02:23 +00:00
Gitea Actions 6b194c5069 Auto-update blog content from Obsidian: 2025-06-01 18:48:25
Deploy / Deploy (push) Successful in 4s
2025-06-01 18:48:25 +00:00
8 changed files with 85 additions and 6 deletions
-6
View File
@@ -1,9 +1,3 @@
[submodule "themes/hugo-coder"]
path = themes/hugo-coder
url = https://github.com/luizdepra/hugo-coder.git
[submodule "themes/PaperMod"]
path = themes/PaperMod
url = https://github.com/adityatelange/hugo-PaperMod.git
[submodule "themes/stack"]
path = themes/stack
url = https://github.com/CaiJimmy/hugo-theme-stack.git
@@ -58,6 +58,8 @@ L'idée est simple :
De cette façon, je n'ai plus besoin de copier manuellement de fichiers ni de gérer les déploiements. Tout se déroule, de l'écriture de Markdown dans Obsidian au déploiement complet du site web.
![Workflow depuis l'écriture de notes sur Obsidian au Blog publié](img/obsidian-blog-gitea-actions-workflow.png)
---
## ⚙️ Implémentation
@@ -57,6 +57,8 @@ The idea is simple:
This way, I never need to manually copy files or trigger deployments. Everything flows from writing markdown in Obsidian to having a fully deployed website.
![Workflow depuis l'écriture de notes sur Obsidian au Blog publié](img/obsidian-blog-gitea-actions-workflow.png)
---
## ⚙️ Implementation
+28
View File
@@ -0,0 +1,28 @@
FROM nginx:stable
ARG HUGO_VERSION
ENV HUGO_VERSION=${HUGO_VERSION}
ENV HUGO_DEST=/usr/share/nginx/html
# Install dependencies
RUN apt-get update && apt-get install -y \
curl \
git \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Download Hugo
RUN curl -sSL https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz \
| tar -xz -C /usr/local/bin hugo
# Add entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Copy custom nginx config
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Nginx serves on port 80
EXPOSE 80
# Set default entrypoint
ENTRYPOINT ["/entrypoint.sh"]
+16
View File
@@ -0,0 +1,16 @@
#!/bin/sh
set -e
# Configuration
REPO_URL="${REPO_URL:-https://git.vezpi.me/Vezpi/blog.git}"
BRANCH="${BRANCH:-preview}"
CLONE_DIR="${CLONE_DIR:-/blog}"
echo "- Cloning $REPO_URL (branch: $BRANCH)..."
git clone --depth 1 --recurse-submodules --branch "$BRANCH" "$REPO_URL" "$CLONE_DIR"
echo "- Building site with Hugo v$HUGO_VERSION in $HUGO_DEST..."
hugo --source "$CLONE_DIR" --destination "$HUGO_DEST" --logLevel info --cleanDestinationDir --gc --panicOnWarning --printI18nWarnings
echo "- Starting Nginx..."
exec nginx -g 'daemon off;'
+26
View File
@@ -0,0 +1,26 @@
map $http_accept_language $lang {
default en;
~fr fr;
}
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Redirect users to their language home page
rewrite ^/$ /$lang/ redirect;
location / {
try_files $uri $uri/ =404;
}
# Custom 404 page
error_page 404 /$lang/404.html;
location = /$lang/404.html {
internal;
}
}
+11
View File
@@ -0,0 +1,11 @@
{{- $.Scratch.Add "index" slice -}}
{{- range .Site.RegularPages -}}
{{- $.Scratch.Add "index" (dict
"title" .Title
"permalink" .Permalink
"summary" .Summary
"tags" .Params.tags
"date" (.Date.Format "2006-01-02")
) -}}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}
Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB