Fixing 2 more linters in run.sh test_ludochaordic

This commit is contained in:
Lucas Cimon 2017-12-03 17:26:55 +01:00
parent a918f952c7
commit b4c9f9c9ca
No known key found for this signature in database
GPG Key ID: 6AF36E0DE97FE852
5 changed files with 16 additions and 9 deletions

3
.htmlhintrc Executable file
View File

@ -0,0 +1,3 @@
{
"attr-value-double-quotes": false
}

View File

@ -24,16 +24,17 @@ for md_file_path in sys.argv[1:]:
img_url = img.attrib['src']
if img_url.startswith('http'):
continue
gen_img('content/' + img_url)
# Adding also images from "Image:" metadata entries
gen_img(os.path.join('content', img_url))
# Adding also images from "Image:" pelican metadata entries
for line in md_content.splitlines()[:6]:
if not line.startswith('Image: '):
continue
gen_img('content/' + line.replace('Image: ', '').strip())
gen_img(os.path.join('content', line.replace('Image: ', '').strip()))
if not sys.argv[1:]:
print('Checking that pelican plugin image_process.scale works OK on those imgs')
from PIL import Image
sys.path.append('../pelican-plugins/image_process/')
from image_process import scale
for ext, content in sorted(SMALLEST.items()):
print('- Testing {} img'.format(ext))

11
run.sh
View File

@ -20,20 +20,21 @@ test_ludochaordic () {
git clone https://github.com/Lucas-C/ludochaordic.git
cd ludochaordic
npm install -g csslint htmlhint htmllint-cli lighthouse
npm install -g csslint htmlhint lighthouse
pip install pelican markdown beautifulsoup4 pillow html5lib html5validator
../pelican-mg/gen_imgs_from_mds.py content/*.md
make DEBUG=1 OUTPUTDIR=output html
csslint --ignore=order-alphabetical output/theme/css/main.css
csslint --ignore=bulletproof-font-face,fallback-colors,order-alphabetical output/theme/css/main.css
html5validator --root output/
html5validator --root output/ \
--ignore='Element "style" not allowed as child of element "div" in this context.'
cp .htmlhintrc output/
htmlhint output/
htmllint output/
make devserver
lighthouse http://localhost:
lighthouse http://localhost:8000
make stopserver
}

View File

@ -69,6 +69,7 @@ a {
.uk-nav-offcanvas > li > a:last-child {
border-bottom: 1px solid rgba(0, 0, 0, 0.3); }
.uk-nav-offcanvas .uk-nav-divider {
box-sizing: border-box;
border-top: 1px solid rgba(255, 255, 255, 0.01);
margin: 0;
height: 4px;
@ -166,7 +167,7 @@ a {
min-width: 0; /* required for flexbox shrink to work properly - Chrome 60 */
max-height: 50%;
max-width: 50%;
padding: 1rem;
padding: 1rem; /* csslint allow: box-model */
margin: 0 auto;
width: 100%;
height: 100%;

View File

@ -19,6 +19,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="{{ SITEURL }}/"><!-- So that "images/" prefixed URLs are resolved in the same way in pages/ -->
<title>{% block title %}{{ SITENAME }}{% endblock %}</title>
<meta name="description" content="{% block description %}{{ DESCRIPTION }}{% endblock %}">