Source for the GeoNode project website, a static site built with Jekyll and served at geonode.org.
The site is built and deployed automatically by GitHub Actions (.github/workflows/jekyll.yml): every push to the master branch runs jekyll build and deploys the result to GitHub Pages. There is no manual publish step — merging to master is what ships the site.
The build uses the gems pinned in this repo's Gemfile. The site tracks the github-pages gem, which keeps Jekyll and its plugins aligned with what GitHub Pages supports (currently Jekyll 3.x).
You can run the site either with Docker (no Ruby toolchain needed on your machine) or with a native Ruby setup.
Build the image once:
docker build -t geonode-site .Serve the site at http://localhost:4000:
docker run --rm -p 4000:4000 geonode-siteServe with live-reload while editing, by mounting the working tree:
docker run --rm -p 4000:4000 -v "$PWD":/site geonode-siteBuild only and extract the generated static site to ./_site (no server):
docker run --rm -v "$PWD":/site geonode-site bundle exec jekyll buildOn Linux/WSL the generated files are owned by
root. To have them owned by your user, add--user "$(id -u):$(id -g)"to thedocker runcommand.
Install the prerequisites (Debian/Ubuntu example):
sudo apt-get install ruby-full build-essential zlib1g-devIf gems fail to install globally, install them under your home directory:
echo '# Install Ruby gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcInstall the project gems and serve the site:
gem install bundler
bundle install
bundle exec jekyll serve # default port 4000; override with -P <port>View at http://localhost:4000.
Drafts live in _drafts/ and are excluded from production builds.
-
Create the draft and set its YAML front matter:
cd _drafts vi newpost.md--- layout: base ---
-
Preview drafts (they show up as the latest post):
bundle exec jekyll serve --drafts # or, with Docker: docker run --rm -p 4000:4000 -v "$PWD":/site geonode-site \ bundle exec jekyll serve --host 0.0.0.0 --drafts
-
When ready to publish, move the draft into
_posts/with a dated filename:git mv _drafts/newpost.md _posts/YYYY-MM-DD-newpost.md vi _posts/YYYY-MM-DD-newpost.md
-
Commit and push to
master— the GitHub Actions workflow builds and deploys the site automatically:git commit -am 'publish article' git push origin master