From 788d97acf8b1dea397cb6a5e36bc5ed6f362350c Mon Sep 17 00:00:00 2001 From: Yabir G Date: Fri, 20 Mar 2020 00:04:43 +0100 Subject: [PATCH] Fixed minor bugs --- arcade/commands.py | 1 + arcade/parsing.py | 4 ++-- themes/baseline/footer.html | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arcade/commands.py b/arcade/commands.py index eb13ea7..a631378 100644 --- a/arcade/commands.py +++ b/arcade/commands.py @@ -19,6 +19,7 @@ def init() -> None: #copytree(os.path.join(local_path,'themes/baseline'), os.path.join(calling_path, 'themes', 'baseline')) click.echo("Project created! Modify the arcade.yaml configuration file") + click.echo("Don't forget to download a theme for your blog before starting. Visit https://github.com/yabirgb/arcade for more info") @click.command() diff --git a/arcade/parsing.py b/arcade/parsing.py index b87d1cf..e84d3de 100644 --- a/arcade/parsing.py +++ b/arcade/parsing.py @@ -92,7 +92,7 @@ def render_content(base_path:str, # TODO: Overwrite this hardcoded constant get = min(len(data), 10) post_data['posts'] = [x.to_dict() for x in - sorted(data[:get], reverse=True) if not x.is_index] + sorted([x for x in data if not x.is_index][:get], reverse=True) if not x.is_index] render = index_tmpl.render(post_data) @@ -112,7 +112,7 @@ def render_content(base_path:str, history = env.get_template("full_list.html") content=dict() - content['posts'] = list(map(lambda x: x.to_dict(), [x for x in reversed(data) if not x.is_index])) + content['posts'] = list(map(lambda x: x.to_dict(), reversed([x for x in data if not x.is_index]))) content['config'] = index_config render = history.render(content) diff --git a/themes/baseline/footer.html b/themes/baseline/footer.html index 459a224..166f428 100644 --- a/themes/baseline/footer.html +++ b/themes/baseline/footer.html @@ -1,4 +1,4 @@ -