mirror of
https://github.com/c0de-archive/pelican-mg.git
synced 2024-12-21 16:02:40 +00:00
Minor HTML syntax fixes
This commit is contained in:
parent
8e23860b4f
commit
2332fbdf26
6
run.sh
6
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: <p> 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: <p> contains legally only inline-/inline-block-elements
|
||||
|
||||
cp ../pelican-mg/.htmlhintrc output/
|
||||
htmlhint output/
|
||||
|
@ -10,8 +10,8 @@
|
||||
<meta name="twitter:url" content="{{ SITEURL }}/{{ article.url }}" >
|
||||
<meta itemprop="url" content="{{ SITEURL }}/{{ article.url }}" >
|
||||
{% if article.summary %}
|
||||
<meta property="og:description" content="{{ article.summary|striptags|e }}" >
|
||||
<meta name="twitter:description" content="{{ article.summary|striptags|e }}" >
|
||||
<meta property="og:description" content="{{ article.summary|striptags|escape }}" >
|
||||
<meta name="twitter:description" content="{{ article.summary|striptags|escape }}" >
|
||||
{% endif %}
|
||||
{% if article.date %}
|
||||
<meta property="og:article:published_time" content="{{ article.date.strftime('%Y-%m-%d') }}" >
|
||||
|
@ -19,9 +19,9 @@
|
||||
<meta itemprop="image" content="{{ SITEURL }}/{{ META_IMAGE }}">
|
||||
{% endif %}
|
||||
{% if page.summary %}
|
||||
<meta property="og:description" content="{{ page.summary|striptags }}" >
|
||||
<meta name="twitter:description" content="{{ page.summary|striptags }}" >
|
||||
<meta itemprop="description" content="{{ page.summary|striptags }}">
|
||||
<meta property="og:description" content="{{ page.summary|striptags|escape }}" >
|
||||
<meta name="twitter:description" content="{{ page.summary|striptags|escape }}" >
|
||||
<meta itemprop="description" content="{{ page.summary|striptags|escape }}">
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
{% if CATEGORY_SAVE_AS %} • <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>{% endif %}
|
||||
{% if DISQUS_SITENAME %} • <br class="uk-visible-small"><i class="uk-icon-comment"></i> <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread" itemprop="discussionUrl"></a>{% endif %}
|
||||
</p>
|
||||
<!--{{ article.summary }}-->
|
||||
<p class="uk-article-lead" itemprop="description">{{ article.summary|striptags|striptags }}</p>
|
||||
{% if not MG_DISABLE_SUMMARY %}<p>{{ ' '.join(article.content.split(' ')[:75])|striptags|striptags }}...</p>{% endif %}
|
||||
<a href="{{ SITEURL }}/{{ article.url }}">Read More</a>
|
||||
|
Loading…
Reference in New Issue
Block a user