This project uses the live web rewriting and banner injection capabilities of pywb web replay system to automatically add hypothes.is annotations to any web pages.
Hosted at: https://via.hypothes.is/
Some examples:
https://via.hypothes.is/http://hypothes.is/
-
Via integrates with h and the Hypothesis client, so you will need to set up development environments for each of those before you can develop Via:
-
pyenv Follow the instructions in the pyenv README to install it. The Homebrew method works best on macOS.
git clone https://github.com/hypothesis/via.git
This will download the code into a via
directory in your current working
directory. You need to be in the via
directory from the remainder of the
installation process:
cd via
make dev
The first time you run make dev
it might take a while to start because it'll
need to install the application dependencies and build the assets.
This will start the server on port 9080 (http://localhost:9080), reload the application whenever changes are made to the source code, and restart it should it crash for some reason.
That's it! You’ve finished setting up your Via development environment. Run
make help
to see all the commands that're available for running the tests,
linting, code formatting, etc.
To serve Via over SSL locally, you will need to:
- Create SSL certificates for localhost (you can reuse these for other Hypothesis services). See https://hyp.is/5xXOUMiuEeiDy2smINki5w/letsencrypt.org/docs/certificates-for-localhost/
- Copy or symlink the certificate and private key as
.tlscert.pem
and.tlskey.pem
respectively in the root of your checkout of this repository. - Start Via using
make dev-ssl
Steps (1) and (2) are the same as for setting up SSL support in other Hypothesis projects.
Note that this configuration is not suitable for production use. Hypothesis' production services use SSL termination provided by AWS load balancers.
Via serves PDFs using PDF.js. PDF.js is
vendored into the source tree and the viewer HTML is patched to load the Hypothesis
client. To update the PDF viewer, run tools/update-pdfjs
.