※ veridical.net
  • About
  • Publications
  • 3 Questions
  • Top N
  • Tags
  • Archives

Pelican Yak Shaving

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.

  1. Install Rosetta2 /usr/sbin/softwareupdate --install-rosetta --agree-to-license so I can install Homebrew for ARM M1.
  2. Install Homebrew for ARM M1 arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”
  3. Use Homebrew to install pipx arch -x86_64 brew install.
  4. Use pipx to install virtualenv pipx install virtualenv
  5. pipx ensurepath
  6. Install Pelican into the virtual environment python -m pip install "pelican[markdown]”
  7. Install typographical enhancements python -m pip install typogrify
  8. 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.
  9. Install bs4 pip install beautifulsoup4, which is needed for some plug-ins that I use.
  10. Install render_math (for LaTeX) pipx install pelican-render-math
  11. Install AWS CLI pip install awscli, the Amazon Web Services Command-Line Interface.
  12. Set up AWS CLI configuration keys. Also, AWS has really good documentation.
  13. Change the default AWS command in the makefile to use s3cmd rather than aws because s3cmd supports in-line Cloud Front cache invalidation s3cmd 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).
  14. Merge the new-mac branch with master, which was mostly basic stuff like the name of the site, links to social media accounts, etc.
  15. 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 worked make s3_upload.

  • « The Rise and Decline of Nations by Mancur Olson
  • Axis and Allies »

Published

Dec 19, 2021

by Adam Wuerl

Tags

  • meta 7

Contact

Twitter
RSS
Mastodon
LinkedIn
Stack Exchange
Micro.blog
  • Powered by Pelican. Theme: Elegant by Talha Mansoor