Skip to main content

Sphinx extensions for writing interactive documents.

Project description

Join the chat at https://gitter.im/RunestoneInteractive/RunestoneComponents

Packaging of the Runestone components for publishing educational materials using Sphinx and restructuredText. Check out the Overview To see all of the extensions in action. NOTE – If you have used an older version of this repo, please know this is a total restart. I think much better, and it WILL stay up to date as this is now the master copy of the components not just a copy. Check out the Development Roadmap to get an understanding of our migration towards webcomponents.

Quick Start

If you are completely new to pip and github text editors, I have written a more thorough getting started

tutorial on my blog Otherwise, you can install everything you need with one simple command! (Although I recommend that you first create a virtual environment for your work.)

pip install runestone

Or, if you prefer to live on the development edge, you can check out the very latest from:

pip install git+git://github.com/RunestoneInteractive/RunestoneTools.git

To start a project, create a new folder and then run the following command (installed by pip) in that new folder runestone init For example:

mkdir myproject
cd myproject
runestone init

The init command will ask you some questions and setup a default project for you.

To build the included default project run

runestone build

You will now have a build folder with a file index.html in it, along with some default content. The contents of the build folder are suitable for hosting anywhere that you can serve static web content from! For a small class you could even serve the content using the builtin Python webserver.

$ runestone serve

Now from your browser you can open up http://localhost:8000/index.html You should see the table of contents for a sample page. If you edit _sources/index.html or _sources/overview.rst and then rebuild and serve again you will see your changes. The best documentation is probably the overview.rst file itself, as it demonstrates how to use all of the common components and shows most of their options.

Windows Users I have tested the installation, along with init, build, and serve on Windows 8.1. The biggest pain is probably setting your PATH environment variable so you can simply type the commands from the shell. Please note that I am not a regular user of windows, I only test things on my VMWare installation every so often. If you are new to using Python on windows I recommend you check out this link on Using Python with Windows

Developing and Hacking

So, you would like to help out with developing the Runestone Components. What do you need to know?

  1. Make a Fork of this repository.

  2. Setup your environment on your development machine

    1. Make a virtual environment for testing and working I recommend pyvenv-3.4 as it is baked in to Python 3.4 and higher.

    2. Rather than following the instructions above for installing runestone simply run pip install -e . from the top level runestone directory. This will install all of the required prerequisites and setup the runestone install as a link to the development directory.

  3. When you have some changes to share, make a Pull Request.

Notes for more Advanced Users

If you already have an existing Sphinx project and you want to incorporate the runestone components into your project you can just make a couple of simple edits to your existing conf.py file.

  • First add the following import line from runestone import runestone_static_dirs, runestone_extensions

  • Then modify your extensions. You may have a different set of extensions already enabled, but it doesn’t matter just do this: extensions = ['sphinx.ext.mathjax'] + runestone_extensions()

  • Then modify your html_static_path: html_static_path = ['_static'] + runestone_static_dirs() Again you may have your own set of static paths in the initial list.

See https://github.com/bnmnetp/runestone/wiki/DevelopmentRoadmap to get a sense for how this is all going to come together.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

runestone-2.1.1.tar.gz (3.7 MB view details)

Uploaded Source

Built Distributions

runestone-2.1.1-py3-none-any.whl (7.7 MB view details)

Uploaded Python 3

runestone-2.1.1-py2-none-any.whl (7.7 MB view details)

Uploaded Python 2

File details

Details for the file runestone-2.1.1.tar.gz.

File metadata

  • Download URL: runestone-2.1.1.tar.gz
  • Upload date:
  • Size: 3.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for runestone-2.1.1.tar.gz
Algorithm Hash digest
SHA256 8483c28eb27d24bef5d8e967789748ff1b9cba2a59450a51672089b7d9f4de30
MD5 6d4ee17a11c14c1e6f11ce40343662b1
BLAKE2b-256 be2279213eba2f0b223b7e31330f08952c4f003d822ec64e563bbdf653406a7f

See more details on using hashes here.

File details

Details for the file runestone-2.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for runestone-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 899caa68fb3af1231e8b106651538dd9cdfeeadf45e2487b6a1d88f12315e6de
MD5 b4cd8866440d5e992b290a77d16a7aef
BLAKE2b-256 0846481664eff5c7f0d43a38cf39a393d355c61eb1e9452ad431483a11d50f9f

See more details on using hashes here.

File details

Details for the file runestone-2.1.1-py2-none-any.whl.

File metadata

File hashes

Hashes for runestone-2.1.1-py2-none-any.whl
Algorithm Hash digest
SHA256 f963b7def7a61c068c9513de80f82b3629aa3363c2305678d2bbdc4b06d8640e
MD5 4ae165819bc0e2c667178878d395c36d
BLAKE2b-256 830afb5fc048dd81db26e541f514f197758e3239da02481606abdfeb8778cfa8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page