Skip to content

Latest commit

 

History

History
85 lines (57 loc) · 2.62 KB

README.md

File metadata and controls

85 lines (57 loc) · 2.62 KB

Sagemath.org Website

The src contains the sources for the files, they are rendered to fill-in the blanks for the templates and the output is placed into www.

There are various support scripts for processing the data sources and a makefile to help working with it.

Getting Started

Make sure to not only clone from here or your fork, but also to initialize all submodules.

git clone --recursive git@github.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 website project, but also the submodules (or whatever it is the right thing to do). For example:

git submodule foreach "git checkout master; git pull origin master"

Development

The websites needs various data-sources to build its pages. For example, the publications pages use HTML snippets generated by the publications submodule.

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.

Continuous Build Mode

For your convenience, there is a continuous build mode available: make cont

It depends on

  • pyInotify - pip install --user pyinotify - to pick up any changes in your local file-system.

  • xdotool - apt-get install xdotool - which does reload the open tab in your web-browser (by sending Shift+Ctrl+R).

Their combined effect is, that less than a second after you "save" a file, you can see the result without lifting a finger.

Style

  • HTML: Modern HTML5, but nothing too fancy please. One of the main design goals is that everything should still work without Javascript and no Flash.

  • Python: PEP8 is authoritative for various Python scripts -- except E501 (long lines). Just make sure your pep8 and autopep8 is up-to-date and do a healthy make style to clean up your code before you commit.

License

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.