Setting up the parlette.org website
In searching for a Python static site generator, I found Pelican. It seems to be what I'm looking for, has various themes and open-source repos that can help, and has fairly straightforward configurations. I searched the Python subreddit and found this great recent blog series by Ayush Kumar Shah, and started following it for my initial setup.
The biggest difference from the tutorial is that I'm hosting on AWS S3 instead of Github Pages. I tend to gravitate to AWS services, mostly because by getting more familiar with them, it helps me in my day job.
When answering the initial Pelican setup questions, I switched my answers to say 'yes' to S3 and 'no' to GitHub Pages, though I think I could have just edited the configuration file afterwards. I had to set up a few things, including:
- The domain parlette.org (done in Google Domains, not AWS)
- DNS setup for parlette.org in AWS Route 53
- A public certificate for parlette.org in AWS Certificate Manager
- A bucket for parlette.org with public permissions
- A CDN distribution in AWS Cloudfront
- An A record in Route 53 pointing back at that Cloudfront distribution
I then ran these commands:
pelican aws s3 cp output/ s3://mybucketname/ --recursive aws cloudfront create-invalidation --distribution-id MYDISTMYDIST --paths '/*'