timsaucer commented on code in PR #40: URL: https://github.com/apache/datafusion-site/pull/40#discussion_r1869661294
########## README.md: ########## @@ -2,85 +2,36 @@ This repository contains the Apache DataFusion blog at https://datafusion.apache.org/blog/ -## Setup for Mac - -Based on instructions at https://jekyllrb.com/docs/installation/macos/ - -```shell -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. - -```shell -ruby -v -``` -Should be `ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin23]` or similar. - -```shell -gem install jekyll bundler -``` - -### Preview site locally +## Setup for Docker ```shell -bundle exec jekyll serve +git clone https://github.com/apache/infrastructure-actions.git +cd infrastructure-actions +docker build -t df-site-build pelican ``` -## Setup for Docker - -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: +Then within the directory that contains `datafusion-site` you can build and test +the site using: ```shell -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 +docker run --rm -it -p8000:8000 -v $PWD:/site df-site-build:latest ``` -Then open http://localhost:4000/blog/ to see the blog locally +Navigate in your web browser to [http://localhost:8000] to view the live website. +This page will monitor and rebuild the site when you make any changes to the file +structure, so you can edit and see the results by just refreshing your browser. ## Publish site -This is currently a manual process. Basic steps are: +The site publishes using a GitHub action provided by the ASF Infrastructure team. +See the [ASF-Pelican](https://infra.apache.org/asf-pelican.html) site for most details +on how this process works. -#### Check out `main` and build site -```shell -# Check out latest code -git checkout main -git pull -# build site (html is left in _site directory) -bundle exec jekyll build -``` - -#### Check out `asf-site` and copy content -Checkout a separate copy of `datafusion-site` - -```shell -git checkout asf-site -git pull -# create a branch for the publishing -git checkout -b publish_blog -# copy content built from _site directory -cp -R ../datafusion-site/_site/* . -git commit -a -m 'Publish blog content' -# push code upstream -git push -``` +To preview your site live, create a branch named `site/my-feature-x`. This should +auto-publish to https://datafusion.staged.apache.org/blog Review Comment: I *think* any branch that is `site/something` will publish to the staged site. My guess is that it is whatever the last one was? I need to play with it a bit, but can't do that until this merges into main. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
