Check the live deployment of the site at https://magneticearth.org/
Use Gitpod to develop on the website:
The site is built using Jekyll and hosted for free using GitHub Pages. We use the Hydeout Jekyll theme.
Changes to the repository main branch are automatically built and deployed.
-
Get the repository and install the environment:
git clone git@github.com:MagneticEarth/MagneticEarth.github.io.git
cd MagneticEarth.github.io
bundle install(you may need to run bundle update if you encounter version conflicts)
- Serve the website locally:
bundle exec jekyll serveBrowse to http://127.0.0.1:4000/. Make changes and refresh the page to see them.
- Markdown cheat sheet
- Put images in
pages/figs/and insert in-line with e.g. - Include html from static files (e.g. html tables) stored in
pages/figs/with{{ "{% include_relative figs/table_models.html " }}%} - Figures generated from code have their scripts in
pages/figs/src/. Each declares its own dependencies inline (PEP 723), so regenerating one is justuv run pages/figs/src/make_igrf_map.py(install uv). The resulting image is committed, so this is only needed when the figure itself changes. - The JS/CSS that Panel/Bokeh figures depend on is vendored into
assets/vendor/rather than loaded from unpkg.com, which was returning 500s and 60s timeouts for some of these files and blocking page render. Panel exports (e.g.pages/figs/hvplot_mag_obs_map.html) point at these local copies, so if you regenerate such a figure, rewrite itsunpkg.comURLs to/assets/vendor/...again — otherwise the page will go back to hanging on unpkg.