mirror of
https://github.com/c0de-archive/pelican-mg.git
synced 2024-12-22 08:22:40 +00:00
Fixing 2 more linters in run.sh test_ludochaordic
This commit is contained in:
parent
a918f952c7
commit
b4c9f9c9ca
3
.htmlhintrc
Executable file
3
.htmlhintrc
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"attr-value-double-quotes": false
|
||||||
|
}
|
@ -24,16 +24,17 @@ for md_file_path in sys.argv[1:]:
|
|||||||
img_url = img.attrib['src']
|
img_url = img.attrib['src']
|
||||||
if img_url.startswith('http'):
|
if img_url.startswith('http'):
|
||||||
continue
|
continue
|
||||||
gen_img('content/' + img_url)
|
gen_img(os.path.join('content', img_url))
|
||||||
# Adding also images from "Image:" metadata entries
|
# Adding also images from "Image:" pelican metadata entries
|
||||||
for line in md_content.splitlines()[:6]:
|
for line in md_content.splitlines()[:6]:
|
||||||
if not line.startswith('Image: '):
|
if not line.startswith('Image: '):
|
||||||
continue
|
continue
|
||||||
gen_img('content/' + line.replace('Image: ', '').strip())
|
gen_img(os.path.join('content', line.replace('Image: ', '').strip()))
|
||||||
|
|
||||||
if not sys.argv[1:]:
|
if not sys.argv[1:]:
|
||||||
print('Checking that pelican plugin image_process.scale works OK on those imgs')
|
print('Checking that pelican plugin image_process.scale works OK on those imgs')
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
sys.path.append('../pelican-plugins/image_process/')
|
||||||
from image_process import scale
|
from image_process import scale
|
||||||
for ext, content in sorted(SMALLEST.items()):
|
for ext, content in sorted(SMALLEST.items()):
|
||||||
print('- Testing {} img'.format(ext))
|
print('- Testing {} img'.format(ext))
|
||||||
|
11
run.sh
11
run.sh
@ -20,20 +20,21 @@ test_ludochaordic () {
|
|||||||
git clone https://github.com/Lucas-C/ludochaordic.git
|
git clone https://github.com/Lucas-C/ludochaordic.git
|
||||||
cd ludochaordic
|
cd ludochaordic
|
||||||
|
|
||||||
npm install -g csslint htmlhint htmllint-cli lighthouse
|
npm install -g csslint htmlhint lighthouse
|
||||||
pip install pelican markdown beautifulsoup4 pillow html5lib html5validator
|
pip install pelican markdown beautifulsoup4 pillow html5lib html5validator
|
||||||
|
|
||||||
../pelican-mg/gen_imgs_from_mds.py content/*.md
|
../pelican-mg/gen_imgs_from_mds.py content/*.md
|
||||||
make DEBUG=1 OUTPUTDIR=output html
|
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/
|
htmlhint output/
|
||||||
htmllint output/
|
|
||||||
|
|
||||||
make devserver
|
make devserver
|
||||||
lighthouse http://localhost:
|
lighthouse http://localhost:8000
|
||||||
make stopserver
|
make stopserver
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ a {
|
|||||||
.uk-nav-offcanvas > li > a:last-child {
|
.uk-nav-offcanvas > li > a:last-child {
|
||||||
border-bottom: 1px solid rgba(0, 0, 0, 0.3); }
|
border-bottom: 1px solid rgba(0, 0, 0, 0.3); }
|
||||||
.uk-nav-offcanvas .uk-nav-divider {
|
.uk-nav-offcanvas .uk-nav-divider {
|
||||||
|
box-sizing: border-box;
|
||||||
border-top: 1px solid rgba(255, 255, 255, 0.01);
|
border-top: 1px solid rgba(255, 255, 255, 0.01);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
height: 4px;
|
height: 4px;
|
||||||
@ -166,7 +167,7 @@ a {
|
|||||||
min-width: 0; /* required for flexbox shrink to work properly - Chrome 60 */
|
min-width: 0; /* required for flexbox shrink to work properly - Chrome 60 */
|
||||||
max-height: 50%;
|
max-height: 50%;
|
||||||
max-width: 50%;
|
max-width: 50%;
|
||||||
padding: 1rem;
|
padding: 1rem; /* csslint allow: box-model */
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<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>
|
<title>{% block title %}{{ SITENAME }}{% endblock %}</title>
|
||||||
<meta name="description" content="{% block description %}{{ DESCRIPTION }}{% endblock %}">
|
<meta name="description" content="{% block description %}{{ DESCRIPTION }}{% endblock %}">
|
||||||
|
Loading…
Reference in New Issue
Block a user