Introducing Gerby: the tools and website
A little while ago I explained how to take the Stacks project and convert it to a bunch of small HTML files, which is the first step in setting up the new website for the Stacks project. In this post I'll explain the next two steps: creating the database behind the website, and setting up the website. For now, this part is not as streamlined as we'd want it to be, but in any case, it's not too hard.
I will assume you have performed plasTeX step with the most recent version of the Gerby renderer.
Instructions on creating the database
To get Gerby website and the toolset:
run
git clone https://github.com/pbelmans/gerby-website.git
install the following Python libraries:
flask
,peewee
,pybtex
(and apply this patch if you want to be exact),flask_profiler
(or just delete this code fromgerby/gerby.py
),feedparser
inside the directory
gerby/tools/
we'll link to the output (usingln -s
) from the first step as follows:- create a soft link to the output directory
tags/tmp/book/
inside your clone of the Stacks project, namedstacks
- create a soft link to the tags file
tags/tags
inside your clone of the Stacks project, namedstacks.tags
- create a soft link to the file
tags/tmp/book.paux
, namedstacks.paux
- create a soft link to the output directory
run
python3 update.py
(sit back and relax, this takes a bit, but not as long as plasTeX)create a soft link in
gerby/
togerby/tools/stacks.sqlite
, namedstacks.sqlite
All these filenames are governed by the file gerby/config.py
, and can be changed. Eventually I should make a better configuration system.
Instructions on serving the website
The following instructions are for running a local copy of the new Stacks project website. You could use this for having a local copy of the Stacks project (with the caveat that right now you'll need an internet connection for the JavaScript libraries). Eventually we'll make a standalone version, for which you don't need an internet connection.
Until then, it suffices to do the following:
set
FLASK_APP=gerby
in your path (in bash this is done byexport FLASK_APP=gerby
)inside the directory
gerby/
runflask run
open
localhost:5000
in your browser
That's it. Enjoy! As you can tell if you have successfully performed these steps, it won't take too long (something on the order of 2 months) until we will use the new system for the actual Stacks project website. Until then, please give suggestions on the beta version.
If you are interested in running a Stacks-project like system for your own project, please get in touch with me.