McTech Solutions Technology solutions for East Cork
Posts with the tag Raspberry-Pi:

Local Hugo development on a Raspberry Pi — VS Code + live preview + Giscus comments

This article documents a working setup to develop a Hugo site on a Raspberry Pi and edit it from a laptop using VS Code Remote‑SSH. It covers:

  • Running Hugo (Docker or native) on the Pi with remote access
  • Editing with VS Code (Remote‑SSH)
  • Where to put new posts
  • Adding Giscus (GitHub Discussions) for comments, with a small “refresh comments” helper
  • Pushing changes back to GitHub with SSH keys

You can reproduce this end‑to‑end on your own Pi.

Power management of HDD on the RPi

Most spinning disk drives (HDDs) have built-in power management features that will automatically spin down after a period of inactivity, but you can also configure this behavior on your Raspberry Pi for more control.

Default behavior: Many drives will automatically enter a low-power state after 10-20 minutes of inactivity, but this varies by manufacturer and model.

Manual control options

1. Using hdparm

sudo hdparm -C /dev/sda
sudo hdparm -S 60 /dev/sda

2. Using hd-idle

sudo apt install hd-idle
sudo hd-idle -a sda -i 300

3. System-level power management

Configure in /etc/hdparm.conf to make settings persistent across reboots.