Skip to content
Snippets Groups Projects
Commit 882715fe authored by Josh Borrow's avatar Josh Borrow
Browse files

Completely changed to using a dynamic renderer

parent 66c60b81
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ This is the website for the SWIFT project. You can build the website by doing th
+ Create a virtual environment (`` virtualenv3 env `` or `` virtualenv env``) and ensure that it is `` python3 ``.
+ Activate it (`` source env/bin/activate ``) [note to deactivate you want to use the `` deactivate `` keyword in your shell]
+ Use that virtual environment to install the required packages (`` pip install -r requirements.txt ``)
+ Please note that the website also requires that pandoc be installed somewhere on the machine.
+ If ```pandoc``` is installed on your machine, I would recommend also installing ```pypandoc```. If not, then the system will use the ```mistune``` python-only renderer.
+ You can then compile the website by running `` python3 compiler.py `` from this directory. The conpiled files will be placed in `` ./compiled ``, and they can then simply be uploaded to a webserver. It is a fully static website so no need to worry about installing anything!
Adding to the Website
......@@ -82,4 +82,4 @@ To add a talk, you need to add the following data structure to ```data/talks.yam
and recompile the website with ```compiler.py```.
You can place slides, etc. in the ```/talks``` directory and reference them here with ```href: filename``` with no need to worry about the directory -- again, these are all copied automatically.
\ No newline at end of file
You can place slides, etc. in the ```/talks``` directory and reference them here with ```href: filename``` with no need to worry about the directory -- again, these are all copied automatically.
......@@ -9,7 +9,7 @@ from distutils.dir_util import copy_tree
import jinja2
import yaml
import pypandoc
from mdcomp import convert_text
def get_from_filesystem(template_names, template_dir=".", data_dir="../data"):
......@@ -48,7 +48,7 @@ def get_associated_data(template_names, data_dir="../data"):
# Markdown Search
try:
with open(f"{data_dir}/{stub}.md", "r") as handle:
markdown = pypandoc.convert_text(handle.read(), 'html', 'md')
markdown = convert_text(handle.read())
this_data["markdown_content"] = markdown
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment