I was getting security warnings from my github pages commits from the dependabot about a kramdown dependency.
I thought it would be easy to fix, but nah, it was easier to just reinstall everything.
I don’t have time to learn the ins-and-outs of Ruby and Jekyll, so here is my dirty (but long winded) fix…
- Setup a Jekyll Sandbox
- Setup GIT with Chocolatey
- Install Ruby Dev tools and Jekyll
- Clone and backup your website
- Make a new jekyll website
- Restore your blogs and stuff
Setup a Jekyll Sandbox
I do this in a sandbox on Windows 10 because I dont really want Ruby on my day-to-day pc when I only use it every 18 months or so…
I am absolutely sure that this could be done in a Github-Codespace-container-thing and I’m really looking forward to updating this someday.
- Make sure you have Win10 and Sandboxes enabled.
- Make a file called
SandBox.wsbwith this content:
<Configuration> <MappedFolders> <MappedFolder> <HostFolder>C:\Users\Jon\Desktop\GIT\Sandbox-Jekyll</HostFolder> <ReadOnly>false</ReadOnly> </MappedFolder> </MappedFolders> </Configuration>
Setup GIT with Chocolatey
In the sandbox, run this in the Powershell ISE as steps
Set-ExecutionPolicy Unrestricted Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Then install Git
choco install notepadplusplus -y choco install git -y choco install tortoisegit -y
Install Ruby Dev tools and Jekyll
- Install Ruby from the installer - I used
ridk installto setup MSYS2 and dev toolchain
- This is option 3 on the cmd window installer
- Install Jekyll with
gem install jekyll bundlerin a new cmd window
- Check with
- Check with
Clone and backup your website
- Clone to sandbox
- I use TortoiseGit
- Delete everything except:
index.markdownif you have changed them
- Move everything except the
Make a new jekyll website
- Navigate the cmd window to the website folder
- Make a new jekyll website with
jekyll new .
- Replace the
gem "github-pages"in the gemfile as per instructions on link
- Dont forget the version bit
Restore your blogs and stuff
- Put everything back except the
- Put all the missing bits back into the
_config.ymlfrom the backup
- Check renames
If you find this useful, go be nice to someone. Pay it forward.