Compare commits

...

9 Commits

7 changed files with 37 additions and 16 deletions

View File

@ -1,5 +1,10 @@
# Changelog # Changelog
## 0.2.24
- Better default fonts - `sans-serif` style for the index and the titles,
`serif` for the articles' body.
## 0.2.19 ## 0.2.19
- Added `short_feed` configuration flag to permanently disable returning the - Added `short_feed` configuration flag to permanently disable returning the

View File

@ -1 +1 @@
__version__ = '0.2.23' __version__ = '0.2.26'

View File

@ -140,7 +140,7 @@ class BlogApp(Flask):
else None else None
), ),
content=markdown( content=markdown(
f.read(), extensions=["fenced_code", "codehilite", MarkdownLatex()] f.read(), extensions=["fenced_code", "codehilite", "tables", MarkdownLatex()]
), ),
skip_header=skip_header, skip_header=skip_header,
skip_html_head=skip_html_head, skip_html_head=skip_html_head,

View File

@ -1,5 +1,7 @@
import os import os
import re
from typing import Optional from typing import Optional
from urllib.parse import urljoin
from flask import ( from flask import (
jsonify, jsonify,
@ -160,22 +162,29 @@ def rss_route():
<link>{base_link}{link}</link> <link>{base_link}{link}</link>
<pubDate>{published}</pubDate> <pubDate>{published}</pubDate>
<description><![CDATA[{content}]]></description> <description><![CDATA[{content}]]></description>
<media:content medium="image" url="{base_link}{image}" width="200" height="150" /> <media:content medium="image" url="{image}" width="200" height="150" />
</item> </item>
""" """
).format( ).format(
base_link=config.link, base_link=config.link,
title=page.get("title", "[No Title]"), title=page.get("title", "[No Title]"),
link=page.get("uri", ""), link=page.get("uri", ""),
published=page["published"].strftime( published=(
"%a, %d %b %Y %H:%M:%S GMT" page["published"].strftime("%a, %d %b %Y %H:%M:%S GMT")
) if "published" in page
if "published" in page else ""
else "", ),
content=page.get("description", "") content=(
if short_description page.get("description", "")
else page.get("content", ""), if short_description
image=page.get("image", ""), else page.get("content", "")
),
image=(
urljoin(config.link, page["image"])
if page.get("image")
and not re.search(r"^https?://", page["image"])
else page.get("image", "")
),
) )
for _, page in pages for _, page in pages
] ]

View File

@ -2,7 +2,7 @@ html {
height: -webkit-fill-available; height: -webkit-fill-available;
height: -moz-available; height: -moz-available;
font-size: 20px; font-size: 20px;
font-family: -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Open Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: Lora, "Palatino Linotype", "Book Antiqua", "New York", "DejaVu serif", serif;
font-weight: 400; font-weight: 400;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
} }
@ -119,6 +119,10 @@ h2 {
line-height: 1.1em; line-height: 1.1em;
} }
h1, h2, h3, h4, h5, h6 {
font-family: -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Open Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
footer { footer {
width: 100%; width: 100%;
font-size: .65em; font-size: .65em;
@ -129,3 +133,7 @@ footer {
text-align: center; text-align: center;
box-shadow: 1px -2px 2px 0 #bbb; box-shadow: 1px -2px 2px 0 #bbb;
} }
.index {
font-family: -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Open Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

View File

@ -1,8 +1,7 @@
[bumpversion] [bumpversion]
current_version = 0.2.23 current_version = 0.2.26
commit = True commit = True
tag = True tag = True
[metadata] [metadata]
description-file = README.md description-file = README.md

View File

@ -11,7 +11,7 @@ def readfile(file):
setup( setup(
name='madblog', name='madblog',
version='0.2.23', version='0.2.26',
author='Fabio Manganiello', author='Fabio Manganiello',
author_email='info@fabiomanganiello.com', author_email='info@fabiomanganiello.com',
description='A minimal platform for Markdown-based blogs', description='A minimal platform for Markdown-based blogs',