-
Create an issue and propose the topic. Wait for approval before contributing, unless you've already been asked to contribute a post.
-
Create a new YAML file in
blog/_posts
- see this example for how to set the post title and description. -
Prefix it with the date.
-
Add images to
/images/
- resize all images to under 200-300KB, for a faster page loading time -
Make sure you have a cropped image for the background / title of the post, this will show up on the page roll-up at /blog/ - good sources for images are: unsplash.com and pexels.com
-
Sign-off any commits you make with
git commit -s
, this is not GPG or cryptography, but a simple declaration -
Raise a Pull Request and fill out the whole template, including how you tested the page and the instructions.
If you use any copyrighted material such as text, code, or images, then you must credit the author.
For Linux:
Update the inotify settings:
echo 2048 | sudo tee /proc/sys/fs/inotify/max_user_instances
sudo sysctl -p
For MacOS/Linux:
Run a yarn install
locally:
sudo npm i -g yarn
yarn install
Then bring the site up with:
docker-compose up --build
Access the site at: http://127.0.0.1:4000/
When you're finished, run: docker-compose down
.
You will need node.js in order to install yarn:
$ npm i -g yarn
You may need to run brew install/upgrade ruby
if the bundle
command is unavailable.
If it's still unavailable run:
$ gem install bundle
Install Bundler, and set up your Ruby gem environment:
MacOS:
export GEM_HOME=$HOME/.gem
export PATH=$HOME/.gem/bin:$PATH
$ arch -arch x86_64 gem install bundler:2.2.13
$ arch -arch x86_64 bundle install
Other systems:
export GEM_HOME=$HOME/.gem
export PATH=$HOME/.gem/bin:$PATH
$ gem install bundler:2.2.13
$ bundle install
Install Yarn dependencies:
$ yarn install
$ yarn run tailwind init _includes/tailwind.config.js
JEKYLL_ENV=production bundle exec jekyll build
Content will be in _site
$GEM_HOME/bin/bundle exec jekyll serve
Access the site at: http://127.0.0.1:4000/
Apple M1:
export GEM_HOME=$HOME/.gem
export PATH=$HOME/.gem/bin:$PATH
arch -arch x86_64 $GEM_HOME/bin/bundle install
arch -arch x86_64 $GEM_HOME/bin/bundle exec jekyll serve
If you have had some issues installing the various gems, then you can use Docker instead:
docker-compose up
Then access the site at http://127.0.0.1:4000