Skip to content

Repository files navigation

Magnetic Earth website

Check the live deployment of the site at https://magneticearth.org/

Use Gitpod to develop on the website:

Open in Gitpod

Technical details

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.

Local development

  1. Install Jekyll

  2. 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)

  1. Serve the website locally:
bundle exec jekyll serve

Browse to http://127.0.0.1:4000/. Make changes and refresh the page to see them.

Tips for working with Jekyll

  • Markdown cheat sheet
  • Put images in pages/figs/ and insert in-line with e.g. ![Swarm spacecraft](/pages/figs/swarm_sc.png)
  • 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 just uv 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 its unpkg.com URLs to /assets/vendor/... again — otherwise the page will go back to hanging on unpkg.

About

magneticearth.org: A place to learn about geomagnetism

Topics

Resources

Stars

10 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages