Static site app?

we all love wordpress (i think) because it’s easy but also very flexible.
but what if i want to learn how to make a static website?
the only app available on ynh seems to be Pelican (which seems to be maintained despite being flagged the opposite).
but what about other options?
s anything else going to be packaged in the future? or is it just not possible?

2 Likes

You could also pull changes done in your website repository with git, then build the website in the server, and eventually publish it in my_webapp, without needing to upload all the files of the website built, which could be too intensive for the bandwith and costly in terms of time.

1 Like

Yes I use this.

I build my site on my own computer with hugo. That folder I build it in is synced to nextcloud. Every evening I have a cron job to copy my site from the nextcloud folder (on Yunohost) to the web directory that my_webapp makes.

4 Likes

You may alsp use rsync to deploy it from your own computer: Deployment with Rsync | Hugo

2 Likes

Do you have this setup documented somewhere in a little more detail?

There is also a good compromise in the form of flat-file CMS, such as Grav

Do you have this setup documented somewhere in a little more detail?

No, but I’ll give you an idea of the setup here.

  • My hugo folder is located in a folder i sync to nextcloud.
  • I make new content.
  • I do hugo and it updates the files.
  • It takes about 15 minutes to sync all those little hugo files to my yunohost server. I’m in no hurry to update my blog.

Then, this is the script I run every night.

#!/bin/bash
now=$(date +%F_%H%M%S)
echo $now
filename=website_$now
echo $filename

echo "* BLOG *"
echo "** MAKE BACKUP **"
sudo tar -cf /home/yunohost.backup/archives/$filename.tar /var/www/my_webapp/www/
echo "*** SYNC PAGES TO WEB SERVER ***"
sudo rsync -ah --delete /home/yunohost.app/nextcloud/data/michael/files/Documents/hugo_website/public/ /var/www/my_webapp/www/
echo "**** CHANGE OWNERSHIP OF /var/www/my_webapp/ ****"
sudo chown -R admin:www-data /var/www/my_webapp/
echo "***** DELETE BACKUPS OLDER THAN 7 days *****"
find /home/yunohost.backup/archives/ -type f -iname 'website_*' -mtime +7 -delete
echo "** FINISHED! **"
5 Likes

I have started using hugo some time ago. I’m using nextcloud notes to write some articles on my phone that is synced with my laptop, then I copy the content of these notes to posts on my hugo working folder, render the website and upload it.
But it’s been a while since I’ve updated it because I have so little free time at home.
Working with hugo on a phone is possible but very complicated. Using termux, a good markdown editor and a syncing app can make it but it’s not as convenient as using a computer. May be an online solution, directly on the server may be helpful. (it’s been months since the last time I updated the website, even though I have about 10 articles)

3 Likes

so, just to summarise, basically no one uses pelican?
and the go to app is hugo?

2 Likes

Pelican is fine too. I used Pelican before for my static blog. Hugo seems more actively developed though, but I think Pelican is great too.

2 Likes

yeah, i will give it a go, havent got around reading the docs yet. :stuck_out_tongue: