summaryrefslogtreecommitdiff
path: root/megapixels/app/site
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-04-16 17:24:25 +0200
committerJules Laplace <julescarbon@gmail.com>2019-04-16 17:24:25 +0200
commitb3bfb2f6f34f5065658e4c0ef289791ab24e5ae2 (patch)
tree8de6718f9b9e9037f081fae28f58701fe3c3d20c /megapixels/app/site
parentb8a0d4a4517497acc7d8a9ab4841f35d738cd7a2 (diff)
wide sidebar
Diffstat (limited to 'megapixels/app/site')
-rw-r--r--megapixels/app/site/parser.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/megapixels/app/site/parser.py b/megapixels/app/site/parser.py
index 6b71e041..aa2ddcda 100644
--- a/megapixels/app/site/parser.py
+++ b/megapixels/app/site/parser.py
@@ -59,10 +59,14 @@ def parse_markdown(metadata, sections, s3_path, skip_h1=False):
if 'sidebar' not in section.lower():
current_group.append(section)
in_stats = True
+ if 'end sidebar' in section.lower():
+ groups.append(format_section(current_group, s3_path, 'right-sidebar', tag='div'))
+ current_group = []
+ in_stats = False
elif in_stats and not section.strip().startswith('## ') and 'end sidebar' not in section.lower():
current_group.append(section)
elif in_stats and section.strip().startswith('## ') or 'end sidebar' in section.lower():
- current_group = [format_section(current_group, s3_path, 'left-sidebar', tag='div')]
+ current_group = [format_section(current_group, s3_path, 'right-sidebar', tag='div')]
if 'end sidebar' not in section.lower():
current_group.append(section)
in_stats = False