Commit fa891f9d authored by Daniel W Bond's avatar Daniel W Bond
Browse files

Merge branch 'master' into 'master'

Use CI to generate a static version of the site

See merge request !10
parents 0a0515e5 e9afc615
*.sw*
*.pyc
*~
srctweb/website/build/
.venv
.virtualevn
image: python:2
pages:
script:
- pip install -r requirements.txt
- python srctweb/srctweb.py build
- mv srctweb/website/build/ public/
artifacts:
paths:
- public/
only:
- master
......@@ -7,3 +7,4 @@ argparse==1.2.1
gunicorn==18.0
itsdangerous==0.23
wsgiref==0.1.2
Frozen-Flask==0.11
#!flask/bin/python
from website import website
from website import freezer
import sys
if __name__ == '__main__': ## This is for debugging use only.
if len(sys.argv) > 1 and sys.argv[1] == "build":
freezer.freeze()
sys.exit();
website.run(debug=True)
## This is for execution via gunicorn.
......
from flask import Flask
from flask_frozen import Freezer
from flask.ext.gravatar import Gravatar
website = Flask(__name__)
freezer = Freezer(website)
from website import views
# initialize gravatar defaults
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment