It required a bit of Yak Shaving to get things configured so I could update this site again on my new M1 Mac, so I’m consolidating the steps and links for my own future sanity.
For brevity, I’ve imposed a bit of retroactive continuity and squashed the steps down to what actually worked, not what I tried. Links are to more detailed instructions elsewhere. I store all the entire Pelican directory (created in Step #8) in a Git repository, so before I did any of this I created a new-mac
branch and played around in there.
- Install Rosetta2
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
so I can install Homebrew for ARM M1. - Install Homebrew for ARM M1
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”
- Use Homebrew to install pipx
arch -x86_64 brew install
. - Use pipx to install virtualenv
pipx install virtualenv
pipx ensurepath
- Install Pelican into the virtual environment
python -m pip install "pelican[markdown]”
- Install typographical enhancements
python -m pip install typogrify
- Quickstart Pelican
pelican-quickstart --path /path/to/my/local/git/repo/whereIstorePelicanfiles
. This overwrote my previous config files, but I had them in a git repo so I could reapply the custom changes I’d made. I wanted to see the latest stock setup, since I hadn’t updated things in a while. - Install bs4
pip install beautifulsoup4
, which is needed for some plug-ins that I use. - Install render_math (for LaTeX)
pipx install pelican-render-math
- Install AWS CLI
pip install awscli
, the Amazon Web Services Command-Line Interface. - Set up AWS CLI configuration keys. Also, AWS has really good documentation.
- Change the default AWS command in the makefile to use
s3cmd
rather thanaws
becauses3cmd
supports in-line Cloud Front cache invalidations3cmd sync --acl-public --delete-removed --cf-invalidate "$(OUTPUTDIR)"/ s3://$(S3_BUCKET)
, which pushes the site live right away instead of waiting for it to propagate through the Cloud Front CDN (content delivery network). - Merge the
new-mac
branch withmaster
, which was mostly basic stuff like the name of the site, links to social media accounts, etc. - Confirm I could build the site locally
make html; make serve
, and then push it out with some small change so I’d know it had workedmake s3_upload
.