Jekyll Webmentions and GitHub Pages

I had to change my workflow because I am new to the right way of doing this and I’m finding my groove in all of it. First, I was pushing all of my build files and ignoring _site folder to GitHub Pages and letting it build the site. That was just fine until I wanted to use Jekyll Webmentions gem and it was outside GitHub’s safe boundary that I received the ah-ha moment when I read this support answer. They won’t run them and it took me a while to find out what the error message in the email that I received from GitHub Pages that there was a page build failure but they didn’t show a nice tip to tell what the problem was like other attempts.

Here’s the commands I use now, placed here as a reminder to myself (now using bash script):

  • cd /WORKING FILES GITHUB FOLDER FOR BUILDING
  • git checkout full-local-backup switch to full-local-backup branch
  • bundle install
  • bundle exec jekyll build --incremental builds site and gathers external webmentions because webmentions gem is already installed
  • jekyll webmention gather and send out your webmentions to webmentions.io website
  • git add .
  • git commit -m "commit full-local-backup changes"
  • git push origin full-local-backup
  • git checkout master switch to master branch
  • cp -a /WORKING FILES GITHUB FOLDER FOR BUILDING/_SITE/. /FOLDER TO PUSH TO GITHUB period means copy only contents of _site to GitHub folder for pushing to GitHub Pages
  • cd /FOLDER TO PUSH TO GITHUB switch to copied site folder to push to GitHub Pages
  • touch .nojekyll make new file in folder to tell GitHub Pages not to build site with Jekyll, done each time the _site is generated
  • git add .
  • git commit -m "update website"
  • git push origin master
  • echo danielbrinneman.com is deployed

Leave a Reply (choose a login you already have or create a free WordPress account)

%d bloggers like this: