Compare commits
No commits in common. "d18adc52203db2c48f456368612cc3951b48401e" and "88a21c71125aeda441c0aaafc832e7f07e12a22a" have entirely different histories.
d18adc5220
...
88a21c7112
6 changed files with 13 additions and 26 deletions
|
@ -1 +1 @@
|
|||
__version__ = '0.2.11'
|
||||
__version__ = '0.2.10'
|
||||
|
|
|
@ -97,13 +97,7 @@ class BlogApp(Flask):
|
|||
|
||||
return metadata
|
||||
|
||||
def get_page(
|
||||
self,
|
||||
page: str,
|
||||
title: Optional[str] = None,
|
||||
skip_header: bool = False,
|
||||
skip_html_head: bool = False
|
||||
):
|
||||
def get_page(self, page: str, title: Optional[str] = None, skip_header: bool = False):
|
||||
if not page.endswith('.md'):
|
||||
page = page + '.md'
|
||||
|
||||
|
@ -133,15 +127,13 @@ class BlogApp(Flask):
|
|||
else None
|
||||
),
|
||||
content=markdown(f.read(), extensions=['fenced_code', 'codehilite', MarkdownLatex()]),
|
||||
skip_header=skip_header,
|
||||
skip_html_head=skip_html_head,
|
||||
skip_header=skip_header
|
||||
)
|
||||
|
||||
def get_pages(
|
||||
self,
|
||||
with_content: bool = False,
|
||||
skip_header: bool = False,
|
||||
skip_html_head: bool = False,
|
||||
sorter: Type[PagesSorter] = PagesSortByTime,
|
||||
reverse: bool = True,
|
||||
) -> List[Tuple[int, dict]]:
|
||||
|
@ -153,8 +145,7 @@ class BlogApp(Flask):
|
|||
'content': (
|
||||
self.get_page(
|
||||
os.path.join(root, f),
|
||||
skip_header=skip_header,
|
||||
skip_html_head=skip_html_head,
|
||||
skip_header=skip_header
|
||||
)
|
||||
if with_content else ''
|
||||
),
|
||||
|
|
|
@ -75,7 +75,7 @@ def article_route(article: str):
|
|||
|
||||
@app.route('/rss', methods=['GET'])
|
||||
def rss_route():
|
||||
pages = app.get_pages(with_content=True, skip_header=True, skip_html_head=True)
|
||||
pages = app.get_pages(with_content=True, skip_header=True)
|
||||
short_description = 'short' in request.args
|
||||
|
||||
return Response('''<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
{% if not skip_html_head %}
|
||||
{% with title=title, skip_header=skip_header or not config.header, styles=['/css/blog.css', '/css/code.css'] %}
|
||||
{% include 'common-head.html' %}
|
||||
{% endwith %}
|
||||
{% with title=title, skip_header=skip_header or not config.header, styles=['/css/blog.css', '/css/code.css'] %}
|
||||
{% include 'common-head.html' %}
|
||||
{% endwith %}
|
||||
|
||||
<main>
|
||||
{% endif %}
|
||||
|
||||
<div class="container">
|
||||
{% if not skip_header %}
|
||||
{% if title %}
|
||||
|
@ -51,8 +48,6 @@
|
|||
</div>
|
||||
|
||||
{% include 'footer.html' %}
|
||||
|
||||
{% if not skip_html_head %}
|
||||
</main>
|
||||
{% include 'common-tail.html' %}
|
||||
{% endif %}
|
||||
|
||||
{% include 'common-tail.html' %}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
[bumpversion]
|
||||
current_version = 0.2.11
|
||||
current_version = 0.2.10
|
||||
commit = True
|
||||
tag = True
|
||||
|
||||
[metadata]
|
||||
description-file = README.md
|
||||
|
||||
|
|
2
setup.py
2
setup.py
|
@ -11,7 +11,7 @@ def readfile(file):
|
|||
|
||||
setup(
|
||||
name='madblog',
|
||||
version='0.2.11',
|
||||
version='0.2.10',
|
||||
author='Fabio Manganiello',
|
||||
author_email='info@fabiomanganiello.com',
|
||||
description='A minimal platform for Markdown-based blogs',
|
||||
|
|
Loading…
Reference in a new issue