Skip to content

this is the code for the sagemath.org website

Notifications You must be signed in to change notification settings

simonbrandhorst/website

 
 

Repository files navigation

Sagemath.org WebsiteBuild Status

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"

Ubuntu Packages

To get started on Ubuntu:

sudo apt-get install -y pybtex python-jinja2 python-markdown python-yaml

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.

NQ8 Images

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: 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.

markerclusterer.js

That's copied from https://github.com/googlemaps/js-marker-clusterer

Google Cloud Storage Notes

  • RSync: 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

About

this is the code for the sagemath.org website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 92.9%
  • JavaScript 3.1%
  • Python 3.1%
  • Other 0.9%