Code Monkey home page Code Monkey logo

openastronomy.github.io's Introduction

About

This is the source for the openastronomy.github.io website.

Building

To build the site locally, you will need jekyll to be installed. Clone this repository locally, then inside it, type:

gem install bundler
bundler install

Depending on your Ruby setup this may require superuser privileges to install to the default location, so you may want to instead use:

gem install -i vendor/bundle bundler
bundle config --local path 'vendor/bundle'
bundle install

to install the dependencies locally at vendor/bundle.

You can then build the website with:

bundle exec jekyll build

To view the site locally, you will then need to run:

bundle exec jekyll serve

this will track the changes and rebuild automatically. However, it won't reflect changes on _config.yaml

Building using a Jekyll container

mkdir -p ../vendor/bundle # so it's available for other projects
export JEKYLL_VERSION=3.8
# only needs to run it once to download the dependencies
docker run --rm -e BUNDLE_APP_CONFIG="/srv/vendor/bundle" -e BUNDLE_HOME="/srv/vendor/bundle" -e BUNDLE_PATH="/srv/vendor/bundle" --volume="$PWD:/srv/jekyll" --volume="$PWD/../vendor:/srv/vendor" -it jekyll/jekyll:$JEKYLL_VERSION  bundle install
# build
docker run --rm -e BUNDLE_APP_CONFIG="/srv/vendor/bundle" -e BUNDLE_HOME="/srv/vendor/bundle" -e BUNDLE_PATH="/srv/vendor/bundle" --volume="$PWD:/srv/jekyll" --volume="$PWD/../vendor:/srv/vendor" -it jekyll/jekyll:$JEKYLL_VERSION  bundle exec jekyll build
# serve from python
python -m http.server -d _site

Submodule

Note that this uses a submodule to complete the build process of the site. So you may need to do:

git submodule init
git submodule update

in a fresh clone, or just the second line to update the submodule.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.