From 2332fbdf263043c4adb4975cdbbbfb36bbbda39b Mon Sep 17 00:00:00 2001 From: Lucas Cimon Date: Wed, 13 Feb 2019 21:50:27 +0100 Subject: [PATCH] Minor HTML syntax fixes --- run.sh | 6 +++--- templates/article.html | 4 ++-- templates/page.html | 6 +++--- templates/partials/article-short.html | 1 - 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/run.sh b/run.sh index cff5ab8..7e90c9c 100755 --- a/run.sh +++ b/run.sh @@ -5,14 +5,14 @@ set -o pipefail -o errexit -o nounset -o xtrace install () { - pip install beautifulsoup4 html5lib html5validator markdown pelican pillow + pip install beautifulsoup4 markdown pelican pillow ./gen_statics_bundles.py || true } install_dev () { npm install -g eslint eslint-config-strict eslint-plugin-filenames htmlhint stylelint npm install stylelint-config-standard - pip install pre-commit + pip install html5lib html5validator pre-commit pre-commit install } @@ -33,7 +33,7 @@ test_ludochaordic () { # Too many missing img alt attributes in thoses: rm output/street-art-and-hedonogeolostism-in-london.html output/variante-2-joueurs-pour-bang-le-jeu-de-des.html - html5validator --root output/ --ignore-re='.*(Element "style" not allowed as child of element.*|Text not allowed in element "iframe" in this context.|No "p" element in scope but a "p" end tag seen.|End tag "p" implied, but there were open elements.|Unclosed element "a".|End tag "div" seen, but there were open elements.)' # issue with pelican renderer:

contains legally only inline-/inline-block-elements + html5validator --root output/ --ignore-re='.*(Element "style" not allowed as child of element.*|Text not allowed in element "iframe" in this context.|Attribute "allow" not allowed on element "iframe" at this point.|No "p" element in scope but a "p" end tag seen.|End tag "p" implied, but there were open elements.|Unclosed element "a".|End tag "div" seen, but there were open elements.)' # issue with pelican renderer:

contains legally only inline-/inline-block-elements cp ../pelican-mg/.htmlhintrc output/ htmlhint output/ diff --git a/templates/article.html b/templates/article.html index dd7d976..0f6e0d1 100644 --- a/templates/article.html +++ b/templates/article.html @@ -10,8 +10,8 @@ {% if article.summary %} - - + + {% endif %} {% if article.date %} diff --git a/templates/page.html b/templates/page.html index b02772a..3f6a225 100644 --- a/templates/page.html +++ b/templates/page.html @@ -19,9 +19,9 @@ {% endif %} {% if page.summary %} - - - + + + {% endif %} {% endblock %} diff --git a/templates/partials/article-short.html b/templates/partials/article-short.html index e66dabc..66a1c19 100644 --- a/templates/partials/article-short.html +++ b/templates/partials/article-short.html @@ -10,7 +10,6 @@ {% if CATEGORY_SAVE_AS %} • {{ article.category }}{% endif %} {% if DISQUS_SITENAME %} •
{% endif %}

-

{{ article.summary|striptags|striptags }}

{% if not MG_DISABLE_SUMMARY %}

{{ ' '.join(article.content.split(' ')[:75])|striptags|striptags }}...

{% endif %} Read More