diff --git a/config.json b/config.json index 9c879b3..d7c1576 100644 --- a/config.json +++ b/config.json @@ -176,7 +176,23 @@ // - run usemin on all html in build/website // - sync build/website with bucket "deploy": { - "stg": {"bucket": "timeline.knilab.com", "usemin_context": {"cdn": "dev"}}, - "prd": {"bucket": "timeline.knightlab.com", "usemin_context": {"cdn": "latest"}} + "stg": { + "bucket": "timeline.knilab.com", + "usemin_context": { + "cdn": "dev" + }, + "deploy_context": { + "generator_embed_path": "//test.knightlab.com/libs/timeline/dev/embed/index.html" + } + }, + "prd": { + "bucket": "timeline.knightlab.com", + "usemin_context": { + "cdn": "latest" + }, + "deploy_context": { + "generator_embed_path": "//test.knightlab.com/libs/timeline/latest/embed/index.html" + } + } } } \ No newline at end of file diff --git a/website/app.py b/website/app.py index 8f988ab..d84ebe2 100644 --- a/website/app.py +++ b/website/app.py @@ -74,12 +74,12 @@ def catch_source(path): @app.route('/') @app.route('/') -def catch_all(path='index.html'): +def catch_all(path='index.html', context=None): """Catch-all function which serves every URL.""" - + context = context or {} if not os.path.splitext(path)[1]: path = os.path.join(path, 'index.html') - return render_template(path) + return render_template(path, **context) if __name__ == "__main__": diff --git a/website/templates/base.html b/website/templates/base.html index 524a8f2..3b6ae47 100644 --- a/website/templates/base.html +++ b/website/templates/base.html @@ -142,7 +142,7 @@