diff options
| -rw-r--r-- | megapixels/app/builder/builder.py | 4 | ||||
| -rw-r--r-- | megapixels/app/builder/parser.py | 8 | ||||
| -rw-r--r-- | site/public/research/index.html | 20 |
3 files changed, 23 insertions, 9 deletions
diff --git a/megapixels/app/builder/builder.py b/megapixels/app/builder/builder.py index d1f882d6..cb5d8fe9 100644 --- a/megapixels/app/builder/builder.py +++ b/megapixels/app/builder/builder.py @@ -6,8 +6,8 @@ from jinja2 import Environment, FileSystemLoader, select_autoescape import app.settings.app_cfg as cfg -import app.builder.s3 -import app.builder.parser +import app.builder.s3 as s3 +import app.builder.parser as parser env = Environment( loader=FileSystemLoader(cfg.DIR_SITE_TEMPLATES), diff --git a/megapixels/app/builder/parser.py b/megapixels/app/builder/parser.py index ea84f658..985111ac 100644 --- a/megapixels/app/builder/parser.py +++ b/megapixels/app/builder/parser.py @@ -3,8 +3,8 @@ import re import glob import mistune -import app.settings.app_cfg -import app.builder.s3 +import app.settings.app_cfg as cfg +import app.builder.s3 as s3 renderer = mistune.Renderer(escape=False) markdown = mistune.Markdown(renderer=renderer) @@ -70,7 +70,7 @@ def parse_markdown(sections, s3_path, skip_h1=False): def parse_research_index(research_posts): content = "<div class='research_index'>" for post in research_posts: - s3_path = s3.make_s3_path(app_cfg.S3_SITE_PATH, post['path']) + s3_path = s3.make_s3_path(cfg.S3_SITE_PATH, post['path']) if 'image' in post: post_image = s3_path + post['image'] else: @@ -134,7 +134,7 @@ def parse_metadata(fn, sections): if key not in metadata: metadata[key] = default_metadata[key] - basedir = os.path.dirname(fn.replace(content_path, '')) + basedir = os.path.dirname(fn.replace(cfg.DIR_SITE_CONTENT, '')) basename = os.path.basename(fn) if basedir == '/': metadata['path'] = '/' diff --git a/site/public/research/index.html b/site/public/research/index.html index 59a5fee9..8b43ac17 100644 --- a/site/public/research/index.html +++ b/site/public/research/index.html @@ -26,9 +26,23 @@ </header> <div class="content"> - <section><h1>Research Blog</h1> -<h2>The darkside of datasets and the future of computer vision</h2> -</section><div class='research_index'><a href='/research/00_introduction/'><section class='wide'><img src='data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==' alt='Research post' /><section><h1>Untitled Page</h1><h2></h2></section></section></a><a href='/research/01_from_1_to_100_pixels/'><section class='wide'><img src='https://nyc3.digitaloceanspaces.com/megapixels/v1/site/research/01_from_1_to_100_pixels/assets/intro.jpg' alt='Research post' /><section><h1>From 1 to 100 Pixels</h1><h2>Photographs are for romantics. For the rest of us, it's all about data. And a photo contains a massive amount of information about who you are.</h2></section></section></a></div> + <section> + <h1>Research</h1> + <div class='meta'> + <div> + <div class='gray'>Posted</div> + <div>2018-12-15</div> + </div> + <div> + <div class='gray'>By</div> + <div>Adam Harvey</div> + </div> + + </div> + </section> + + <section><h2>The darkside of datasets and the future of computer vision</h2> +</section> </div> <footer> |
