This repository contains the Apache DataFusion blog at https://datafusion.apache.org/blog/
Based on instructions at https://jekyllrb.com/docs/installation/macos/
brew install chruby ruby-install xz
ruby-install ruby 3.1.3
Note: I did not have a ~/.zshrc
file so had to create one first.
echo "source $(brew --prefix)/opt/chruby/share/chruby/chruby.sh" >> ~/.zshrc
echo "source $(brew --prefix)/opt/chruby/share/chruby/auto.sh" >> ~/.zshrc
echo "chruby ruby-3.1.3" >> ~/.zshrc # run 'chruby' to see actual version
Quit and restart terminal.
ruby -v
Should be ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin23]
or similar.
gem install jekyll bundler
bundle exec jekyll serve
If you don't wish to change or install ruby and nodejs locally, you can use docker to build and preview the site with a command like:
docker run -v `pwd`:/datafusion-site -p 4000:4000 -it ruby bash
cd datafusion-site
gem install jekyll bundler
bundle install
# Serve using local container address
bundle exec jekyll serve --host 0.0.0.0
Then open http://localhost:4000/blog/ to see the blog locally
This is currently a manual process. Basic steps are:
# Check out latest code
git checkout main
git pull
# build site (html is left in _site directory)
bundle exec jekyll build
Checkout a separate copy of datafusion-site
git checkout asf-site
git pull
# create a branch for the publishing
git checkout -b publish_blog
# push code upstream
git push
# copy content built from _site directory
cp -R ../datafusion-site/_site/* .
git commit -a -m 'Publish blog content'
For example, see #9