src contains the sources for the files,
they are rendered to fill-in the blanks for the templates
and the output is placed into
There are various support scripts for processing the data sources
makefile to help working with it.
Make sure to not only clone from here or your fork, but also to initialize all submodules.
git clone --recursive email@example.com:sagemath/website.git
or if you forgot the
--recursive switch, do this:
git submodule update --init --recursive
Later, don't forget to not only update the
but also the submodules
(or whatever it is the right thing to do).
git submodule foreach "git checkout master; git pull origin master"
To get started on Ubuntu:
sudo apt-get install -y pybtex python-jinja2 python-markdown python-yaml
The websites needs various data-sources to build its pages.
For example, the publications pages use HTML snippets
generated by the
Ideally, a courageous
make should do everything for you
and and additional
make open opens up your web-browser
to inspect the result.
To test the website under realistic conditions,
make server starts a minimal HTTP server on port 8181 and
make show opens it in your web-browser.
Shrinking PNG images further down via e.g.
pngnq -v -f -s 64 index_icons.png
Continuous Build Mode
For your convenience, there is a continuous build mode available:
It depends on
pip install --user pyinotify- to pick up any changes in your local file-system.
apt-get install xdotool- which does reload the open tab in your web-browser (by sending
Their combined effect is, that less than a second after you "save" a file, you can see the result without lifting a finger.
Python: PEP8 is authoritative for various Python scripts -- except E501 (long lines). Just make sure your
autopep8is up-to-date and do a healthy
make styleto clean up your code before you commit.
The actual content and included media files are licensed under CC BY-SA 4.0 like the rest of the Sage documentation pages.
The included scripts have their appropriate licensing explained at the top of their respective source files. If no licensing information can be found, regard it as Apache 2.0.
That's copied from https://github.com/googlemaps/js-marker-clusterer
Google Cloud Storage Notes
gsutil -m rsync -d -r www gs://www.sagemath.org
- Publish all files:
gsutil -m acl ch -r -u AllUsers:R gs://www.sagemath.org
- Cache-Control 10 minutes:
gsutil -m setmeta -r -h "Cache-Control:public, max-age=600" gs://www.sagemath.org