Skip to content

Building the Website

Ayush Agarwal edited this page Oct 11, 2018 · 2 revisions

Building the website

The website utilizes StaticJinja to build and compile data and templates into a final static build. StaticJinja uses Jinja2 templating system, refer to Jinja2 website for template designer documentation.

Initial Steps

When building for the first time, certain dependencies need to be installed to successfully build the website.

Create and activate a python virtual environment (Optional)

Though the step is optional but highly recommended to ensure the dependencies does not conflict with system installed libraries.

Install Virtualenv

Install Python3 and Pip and then run:

pip install virtualenv

Create a virtual environment

virtualenv VENV_NAME

Activate Environment:

Linux:

source VENV_NAME/bin/activate

Windows:

./VENV_NAME/Scripts/activate

Install the requirements

Requirements are listed in standard pip requirements file in /requirements.txt

pip install -r requirements.txt

Run build.py

Run build.py to automatically build and render top-level HTML files.

python build.py

To run a development Server (Optional):

python -m http.server