I’m iterating over recently modified pages and listing them using Hugo’s pagination.
I can view the list in the right order on my primary computer, and also when I run hugo server --bind=0.0.0.0 --baseURL=http://0.0.0.0:1313 on a Ubuntu web server and view it on my computer (both devices are on the same network).
I run the below workflow on Ubuntu server to update the website:
cd /var/www/domainname.com
git pull
hugo --cleanDestinationDir --minify
sudo systemctl reload nginx
where /var/www/domainname.com/public is the site root configured in NGINX.
This doesn’t list the pages in the correct last modified by order.
What is your process for building for ‘dev’ and ‘prod’ versus ‘deploying to Nginx’?
As frjo mentioned the web server is not the issue (unless perhaps you are doing something silly like using the Hugo local server behind Nginx as a reverse proxy).
I’m not doing this to deploy a Hugo site. I’m running this on a Ubuntu server to test the website from different devices on the same network (laptop, mobile).
I’m already deploying the contents of public/ directory and serving it with NGINX.