How am I publishing this
How am I publishing this
September 5, 2025 || #tech
Dejo aquí el proceso detallado de cómo he publicado esto.
Mi intención es:
SETUP
-
Construirlo con Obsidian en Markdown
-
Exportarlo en html con el plugin webpage html export en una carpeta local
Un grande Nathan George
- Configurar un repositorio de github donde hacer push
Create new repository.
Shell from project folder
echo "# digital-garden-test-i" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/atysen/digital-garden-test-i.git
git push -u origin main
Estas son instrucciones del mismo github. Yo además añado un "add ." para añadir todos los archivos al commit.
- En mi servidor linux, hacer un git clone de ese repositorio
git clone git@github.com:atysen/digital-garden-test-i.git
- Levantar esa carpeta apuntando a un puerto local 8000
cd digital-garden-test-i
python3 -m http.server 8000 --bind 127.0.0.1
Está configurado con nginx para apuntar a http://weye.duckdns.org, un dominio al mismo tiempo que ya tengo de dns. Resultados de otro proyecto. La idea más adelante es darle otro puerto para poder levantar más proyectos en el mismo server (o quizá al próximo proyecto más bien darle un puerto nuevo)
Posteriormente he copiado el archivo digital-garden-test-i y lo he puesto en el directorio principal como index.html, de esta manera hemos visto que aterriza directamente ahí.
UPDATE
El proceso luego de update será:
-
Modificación
-> Modificar notas en obsidian
Hago mi modificación -
Exportar en html
-> Exportar html
Ctrl + P 'export using previous settings' -
Git push from my computer
-> Locally
cd desktop
cd "Digital Garden Test I"
git status #opcional para comprobar
git add .
git commit -m "commit 2025.09.06"
git push
- Git clone from my linux server
-> On server
ssh root@91.98.21.159
cd digital-garden-test-i
git pull
- Start server
-> Luego levantar el servidor y comprobar cambios (Ctrl+C si estaba levantado para interrumpir)
python3 -m http.server 8000 --bind 127.0.0.1
AUTOMATION
Agilizo el proceso de pull and push con un .bat que meto en el directorio raíz de usuario
- htprev (obsidian)
- dgpush.bat
- serverconnect.bat
- ~/dgpull.sh
- ~/dgstart.sh
- weye.bat
Versión integrada:
0. htprev (obsidian)
- idgpush.bat
- ./idgpull.sh
- weye.bat (display)
dgpush.bat
cd desktop
cd "Digital Garden Test I"
git status #opcional para comprobar
git add .
git commit -m "commit 2025.09.06"
git push
serverconnect.bat
ssh root@91.98.21.159
~/dgpull.sh
cd digital-garden-test-i
git pull
~/dgstart.sh
cd digital-garden-test-i
python3 -m http.server 8000 --bind 127.0.0.1
Versiones integradas para agilizar el proceso:
idgpush.bat
cd desktop
cd "Digital Garden Test I"
git status #opcional para comprobar
git add .
git commit -m "commit 2025.09.06"
git push
ssh root@91.98.21.159
~/idgpull.sh
cd digital-garden-test-i
git pull
python3 -m http.server 8000 --bind 127.0.0.1
HTTPS, NGINX, SERVICE
Lo siguiente ha sido configurar nginx puerto 8002 url http://tysengarden.duckdns.org
A ese dominio hacerle un certificado HTTPS.
Después crear un servicio en el server de linux parametrizado para levantar el server en el arranque y dejarlo funcionando
NGINX
Crear un archivo
nano /etc/nginx/sites-available/digital-garden
Prepararlo con esto
server {
listen 80;
server_name tysengarden.duckdns.org;
location / {
proxy_pass http://127.0.0.1:8002;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
configurado para el puerto 8002
HTTPS
certbot --nginx -d tysengarden.duckdns.org
SERVICE
Crear un archivo
nano /etc/systemd/system/tysengarden.service
Con esto
[Unit]
Description=Tysengarden Server
After=network.target
[Service]
ExecStart=/usr/bin/python3 -m http.server 8002 --bind 127.0.0.1
WorkingDirectory=/root/digital-garden-test-i
Restart=always
User=www-data
Group=www-data
[Install]
WantedBy=multi-user.target
Luego:
sudo systemctl daemon-reload
sudo systemctl enable tysengarden
sudo systemctl start tysengarden
sudo systemctl status tysengarden
journalctl -u tysengarden -f #opcional - para ver el log
Y queda corriendo. Si en algún momento quiero pararlo:
sudo systemctl stop tysengarden
NOTES
UPDATE COMMANDS (service version):
- Ctrl + P (obsidian) -> htprev // update local html files
- Win + R -> idgpush // push to github and open server shell
- Linux bash -> ~/idgpull.sh // pull from github
- Win + R -> tysengarden // open http://tysengarden.duckdns.org with chrome
htprev
idgpush
~/idgpull.sh
tysengarden










