My personal website, which I also use to try things out.
- Tailwind CSS: Styling, so I don't have to write CSS.
- Node.js: Runs the Tailwind build.
- GitHub Actions/GitHub Pages: Builds the CSS and publishes the site on push.
-
Clone the repository
git clone https://github.com/samuel-garmany/samuel-garmany.github.io.git cd samuel-garmany.github.io -
Install dependencies
npm install
-
Start the Tailwind watcher
npm run dev
Use
npm run buildfor a one-off build instead of watching. -
View the site
Open
index.htmlin your browser
Photos in assets/ are resized to 1200px on the long edge before being
committed, which keeps the page under a couple of megabytes:
magick photo.jpg -auto-orient -resize '1200x1200>' -quality 82 -strip -interlace Plane assets/photo.jpg-auto-orient matters: phone photos often store a rotation flag that -strip
would otherwise discard, leaving the photo sideways.
The <img> tags deliberately carry no width/height. The gallery is the last
thing on the page, so there is nothing below it to push down, and leaving the
sizes off means a new photo only needs one line of markup.