This is the source code for my personal website, JoshPadnick.com.
This site is statically generated using Hugo, Go-based static website generator. Here's how to make edits to the site:
-
Git clone this repo:
git clone https://github.com/josh-padnick/JoshPadnick.com cd JoshPadnick.com
-
Run Hugo in server mode. In this mode, Hugo will continually re-generate the site every time you make an update to any Hugo files.
hugo server -D
The
-D
tells Hugo to also render content pages that are in still in "draft" mode. A page is identified as being in draft mode if its front matter includes adraft
property set totrue
. If thedraft
property is absent or set tofalse
, the page is considered ready to publish. -
Now access the site at http://localhost:1313!
When you run hugo server -D
Hugo, generates all the files in memory, which means it doesn't write them to disk. This
is great because it keeps your local file systems clean and is super-fast. But sometimes, you want to see all the files
that Hugo generates for debugging purposes. To do that, run:
hugo server --renderToDisk -D
Deployment works by generating the static website files, and git push
ing them to https://github.com/josh-padnick/josh-padnick.github.io. That repo is configured with GitHub Pages, so as soon as files are pushed to that repo, they're immediately available for viewing over the web!
To deploy, you'll need write access to https://pages.github.com/. Then run the deploy script:
./deploy.sh