monitoring-jekyll-theme 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +127 -21
  3. data/_includes/accessibility.html +8 -2
  4. data/_includes/actions/energy.html +24 -13
  5. data/_includes/actions/quality.html +7 -1
  6. data/_includes/competitors.html +23 -16
  7. data/_includes/index/badge.html +9 -9
  8. data/_includes/index/energy.html +2 -2
  9. data/_includes/index/loading.html +1 -1
  10. data/_includes/index/position.html +8 -1
  11. data/_includes/index/score.html +9 -3
  12. data/_includes/index/security.html +12 -7
  13. data/_includes/index/styles.html +4 -4
  14. data/_includes/keywords.html +23 -7
  15. data/_includes/seo.html +18 -8
  16. data/_includes/statistiques.html +1 -1
  17. data/_includes/styles.html +25 -15
  18. data/_includes/value/lastfiledate.html +15 -2
  19. data/_includes/value/loadingdata.html +15 -11
  20. data/_layouts/default.html +12 -41
  21. data/_layouts/monitoring.html +4 -2
  22. data/_layouts/rank.html +2 -2
  23. data/assets/css/styles.css +183 -106
  24. data/assets/favicons/android-icon-144x144.png +0 -0
  25. data/assets/favicons/android-icon-192x192.png +0 -0
  26. data/assets/favicons/android-icon-36x36.png +0 -0
  27. data/assets/favicons/android-icon-48x48.png +0 -0
  28. data/assets/favicons/android-icon-72x72.png +0 -0
  29. data/assets/favicons/android-icon-96x96.png +0 -0
  30. data/assets/favicons/apple-icon-114x114.png +0 -0
  31. data/assets/favicons/apple-icon-120x120.png +0 -0
  32. data/assets/favicons/apple-icon-144x144.png +0 -0
  33. data/assets/favicons/apple-icon-152x152.png +0 -0
  34. data/assets/favicons/apple-icon-180x180.png +0 -0
  35. data/assets/favicons/apple-icon-57x57.png +0 -0
  36. data/assets/favicons/apple-icon-60x60.png +0 -0
  37. data/assets/favicons/apple-icon-72x72.png +0 -0
  38. data/assets/favicons/apple-icon-76x76.png +0 -0
  39. data/assets/favicons/apple-icon-precomposed.png +0 -0
  40. data/assets/favicons/apple-icon.png +0 -0
  41. data/assets/favicons/browserconfig.xml +2 -0
  42. data/assets/favicons/favicon-16x16.png +0 -0
  43. data/assets/favicons/favicon-32x32.png +0 -0
  44. data/assets/favicons/favicon-96x96.png +0 -0
  45. data/assets/favicons/favicon-original.png +0 -0
  46. data/assets/favicons/favicon.ico +0 -0
  47. data/assets/favicons/manifest.json +41 -0
  48. data/assets/favicons/ms-icon-144x144.png +0 -0
  49. data/assets/favicons/ms-icon-150x150.png +0 -0
  50. data/assets/favicons/ms-icon-310x310.png +0 -0
  51. data/assets/favicons/ms-icon-70x70.png +0 -0
  52. data/assets/images/loowtus-card.svg +114 -0
  53. data/assets/images/lotus.svg +1 -18
  54. data/assets/images/lowtus.png +0 -0
  55. data/assets/images/lowtus.svg +1 -0
  56. data/scripts/package.sh +13 -0
  57. data/scripts/perftest.sh +306 -0
  58. metadata +34 -4
  59. data/_plugins/humanize.rb +0 -258
  60. data/assets/favicons/favicon.png +0 -0
Binary file
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <browserconfig><msapplication><tile><square70x70logo src="/ms-icon-70x70.png"/><square150x150logo src="/ms-icon-150x150.png"/><square310x310logo src="/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "App",
3
+ "icons": [
4
+ {
5
+ "src": "\/android-icon-36x36.png",
6
+ "sizes": "36x36",
7
+ "type": "image\/png",
8
+ "density": "0.75"
9
+ },
10
+ {
11
+ "src": "\/android-icon-48x48.png",
12
+ "sizes": "48x48",
13
+ "type": "image\/png",
14
+ "density": "1.0"
15
+ },
16
+ {
17
+ "src": "\/android-icon-72x72.png",
18
+ "sizes": "72x72",
19
+ "type": "image\/png",
20
+ "density": "1.5"
21
+ },
22
+ {
23
+ "src": "\/android-icon-96x96.png",
24
+ "sizes": "96x96",
25
+ "type": "image\/png",
26
+ "density": "2.0"
27
+ },
28
+ {
29
+ "src": "\/android-icon-144x144.png",
30
+ "sizes": "144x144",
31
+ "type": "image\/png",
32
+ "density": "3.0"
33
+ },
34
+ {
35
+ "src": "\/android-icon-192x192.png",
36
+ "sizes": "192x192",
37
+ "type": "image\/png",
38
+ "density": "4.0"
39
+ }
40
+ ]
41
+ }
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,114 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+ xmlns:cc="http://creativecommons.org/ns#"
5
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
+ xmlns:svg="http://www.w3.org/2000/svg"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10
+ inkscape:export-ydpi="96"
11
+ inkscape:export-xdpi="96"
12
+ inkscape:export-filename="/Users/bk/sites/monitoring/laforet-monitoring/assets/images/lo.png"
13
+ inkscape:version="1.0beta1 (fe3e306, 2019-09-17)"
14
+ height="870.52429"
15
+ width="1215.2227"
16
+ sodipodi:docname="loowtus-card.svg"
17
+ id="svg879"
18
+ version="1.1"
19
+ viewBox="0 0 1215.2227 870.52428">
20
+ <metadata
21
+ id="metadata885">
22
+ <rdf:RDF>
23
+ <cc:Work
24
+ rdf:about="">
25
+ <dc:format>image/svg+xml</dc:format>
26
+ <dc:type
27
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
28
+ <dc:title></dc:title>
29
+ </cc:Work>
30
+ </rdf:RDF>
31
+ </metadata>
32
+ <defs
33
+ id="defs883" />
34
+ <sodipodi:namedview
35
+ inkscape:current-layer="svg879"
36
+ inkscape:window-maximized="0"
37
+ inkscape:window-y="23"
38
+ inkscape:window-x="0"
39
+ inkscape:cy="554.92309"
40
+ inkscape:cx="696.13539"
41
+ inkscape:zoom="0.38004235"
42
+ fit-margin-bottom="0"
43
+ fit-margin-right="0"
44
+ fit-margin-left="0"
45
+ fit-margin-top="0"
46
+ showgrid="false"
47
+ id="namedview881"
48
+ inkscape:window-height="755"
49
+ inkscape:window-width="1280"
50
+ inkscape:pageshadow="2"
51
+ inkscape:pageopacity="0"
52
+ guidetolerance="10"
53
+ gridtolerance="10"
54
+ objecttolerance="10"
55
+ borderopacity="1"
56
+ inkscape:document-rotation="0"
57
+ bordercolor="#666666"
58
+ pagecolor="#ffffff" />
59
+ <rect
60
+ y="1.1"
61
+ x="1.1"
62
+ height="868.32428"
63
+ width="1213.0227"
64
+ id="rect970"
65
+ style="fill:#fffdf4;fill-opacity:1;stroke:#555555;stroke-width:2.2" />
66
+ <g
67
+ transform="translate(360.61135,190.55258)"
68
+ id="g914">
69
+ <path
70
+ style="opacity:1;stop-opacity:1"
71
+ fill="#d6b900"
72
+ d="m 336.21202,135.42203 c -7.942,6.151 -29.80962,14.24008 -36.91162,21.34508 -22.866,22.842 -40.37301,49.47592 -52.30601,78.98892 -11.921,-29.513 -32.51937,-56.652 -55.37337,-79.494 -7.103,-7.112 -25.884,-21.252 -33.833,-27.404 5.114,-40.462995 54.519,-96.266995 86.404,-128.15099527 31.896,31.88400027 86.906,90.50700027 92.02,134.71499527 z"
73
+ fill-opacity=".963"
74
+ stroke="#555"
75
+ id="path869"
76
+ inkscape:connector-curvature="0"
77
+ sodipodi:nodetypes="ccccccc" />
78
+ <g
79
+ style="opacity:1;stop-opacity:1"
80
+ fill="#d44f4f"
81
+ stroke="#555"
82
+ id="g875"
83
+ transform="translate(-8.9976013,-66.204965)">
84
+ <path
85
+ d="m 255.992,301.961 c -11.403,28.212 -17.447,58.604 -17.447,89.525 0,2.637 0.036,5.286 0.144,7.923 -24.335,-60 -72.27,-107.587 -131.934,-131.705 v -0.012 c -1.144,-32.439 4.347,-65.636 17.303,-97.677 20.831,8.417 39.832,19.434 56.761,32.535 a 236.697,236.697 0 0 1 22.601,19.916 c 22.854,22.842 40.651,49.983 52.572,79.495 z"
86
+ id="path871"
87
+ inkscape:connector-curvature="0" />
88
+ <path
89
+ d="m 405.24,267.705 c -84.745,34.257 -145.841,115.895 -149.236,213.15 -1.011,-28.79 -7.068,-56.22 -17.315,-81.445 a 193.863,193.863 0 0 1 -0.144,-7.923 c 0,-30.921 6.045,-61.313 17.447,-89.525 11.933,-29.513 29.717,-56.653 52.583,-79.495 a 237.905,237.905 0 0 1 22.589,-19.904 c 16.942,-13.113 35.942,-24.13 56.785,-32.547 12.956,32.041 18.435,65.238 17.291,97.677 z"
90
+ id="path873"
91
+ inkscape:connector-curvature="0" />
92
+ </g>
93
+ <path
94
+ style="opacity:1;stop-opacity:1"
95
+ d="m 485.5,184.19503 c 2.8,0 5.6,0 8.5,0.1 -4.6,131.8 -115.2,234.9 -247,230.3 3.4,-97.3 64.5,-178.9 149.2,-213.2 27.6,-11.2 57.8,-17.3 89.2,-17.3 z m -255.8,149 c 10.2,25.2 16.3,52.7 17.3,81.4 -131.8,4.6 -242.4,-98.5 -247,-230.3 2.8,-0.1 5.7,-0.1 8.5,-0.1 31.5,0 61.6,6.1 89.2,17.3 59.7,24.1 107.6,71.7 131.9,131.7 z"
96
+ fill="#2296aa"
97
+ stroke="#555"
98
+ stroke-width="2.2"
99
+ id="path877"
100
+ inkscape:connector-curvature="0" />
101
+ </g>
102
+ <text
103
+ id="text889"
104
+ y="684.10657"
105
+ x="388.21408"
106
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:94.2923px;line-height:1.25;font-family:'Optician Sans';-inkscape-font-specification:'Optician Sans Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2.35731;stop-opacity:1"
107
+ xml:space="preserve"><tspan
108
+ style="letter-spacing:20px"
109
+ dx="0.079999998"
110
+ y="684.10657"
111
+ x="388.21408"
112
+ id="tspan891"
113
+ sodipodi:role="line">Lowtus</tspan></text>
114
+ </svg>
@@ -1,18 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
2
- <path fill="#f7b239" d="M331.164 202.563a237.905 237.905 0 00-22.589 19.904c-22.866 22.842-40.65 49.982-52.583 79.495-11.921-29.513-29.717-56.653-52.571-79.495a236.697 236.697 0 00-22.601-19.916c18.218-38.591 43.287-74.739 75.172-106.623 31.896 31.884 56.954 68.043 75.172 106.635z"/>
3
- <g fill="#f95428">
4
- <path d="M255.992 301.961c-11.403 28.212-17.447 58.604-17.447 89.525 0 2.637.036 5.286.144 7.923-24.335-60-72.27-107.587-131.934-131.705v-.012c-1.144-32.439 4.347-65.636 17.303-97.677 20.831 8.417 39.832 19.434 56.761 32.535a236.697 236.697 0 0122.601 19.916c22.854 22.842 40.651 49.983 52.572 79.495z"/>
5
- <path d="M405.24 267.705c-84.745 34.257-145.841 115.895-149.236 213.15-1.011-28.79-7.068-56.22-17.315-81.445a193.863 193.863 0 01-.144-7.923c0-30.921 6.045-61.313 17.447-89.525 11.933-29.513 29.717-56.653 52.583-79.495a237.905 237.905 0 0122.589-19.904c16.942-13.113 35.942-24.13 56.785-32.547 12.956 32.041 18.435 65.238 17.291 97.677v.012z"/>
6
- </g>
7
- <g fill="#31af0e">
8
- <path d="M494.488 250.402c2.818 0 5.635.048 8.477.144-4.6 131.801-115.172 234.908-246.961 230.309 3.396-97.255 64.492-178.893 149.236-213.15 27.634-11.174 57.773-17.303 89.248-17.303zM238.689 399.409c10.247 25.226 16.304 52.655 17.315 81.445-131.801 4.6-242.374-98.507-246.974-230.308 2.842-.096 5.659-.144 8.477-.144 31.475 0 61.626 6.129 89.248 17.303 59.664 24.118 107.599 71.704 131.934 131.704z"/>
9
- </g>
10
- <g fill="#333">
11
- <path d="M503.284 241.523c-30.681-1.073-60.701 3.437-88.907 13.074-.561-30.125-6.613-59.657-18.053-87.969a9.031 9.031 0 00-11.757-4.99c-17.868 7.219-34.602 16.337-50.073 27.239-18.572-36.63-42.787-70.01-72.118-99.331a9.03 9.03 0 00-12.77.001c-29.345 29.345-53.558 62.72-72.116 99.316-15.462-10.895-32.189-20.009-50.052-27.225a9.03 9.03 0 00-11.756 4.99c-11.459 28.358-17.514 57.939-18.059 88.115-27.821-9.561-57.802-14.304-88.907-13.22a9.03 9.03 0 00-8.71 9.34c4.667 133.635 114.858 239.166 247.549 239.166 2.801 0 5.626-.051 8.446-.144 2.827.095 5.639.144 8.447.144 132.679 0 242.882-105.538 247.548-239.166a9.033 9.033 0 00-8.712-9.34zm-106.935 20.035c-25.721 11.127-49.616 26.708-70.719 46.388-33.781 31.501-57.575 70.871-69.666 114.263a245.653 245.653 0 00-8.296-24.517 202.148 202.148 0 01-.089-6.204c0-29.597 5.65-58.577 16.791-86.138 11.67-28.877 28.691-54.616 50.594-76.505 19.65-19.662 42.457-35.391 67.901-46.844 9.235 25.698 13.759 52.392 13.484 79.557zm-140.356-152.7c25.894 27.165 47.344 57.764 63.898 91.151a247.135 247.135 0 00-17.699 16.065 246.083 246.083 0 00-46.193 63.998c-11.872-23.693-27.349-45.161-46.193-63.993a246.736 246.736 0 00-17.714-16.083c16.541-33.357 37.993-63.954 63.901-91.138zm-126.85 73.143c25.446 11.455 48.25 27.185 67.891 46.848 21.086 21.074 37.623 45.703 49.224 73.233-7.739 19.991-12.816 40.654-15.183 61.733-26.621-45.203-67.137-81.123-115.419-102.079-.296-27.226 4.23-53.981 13.487-79.735zM18.56 259.432c57.953.248 112.867 21.972 155.494 61.724 42.63 39.753 68.133 93.01 72.42 150.81-119.468-.562-219.021-93.396-227.914-212.534zm246.967 212.533c4.288-57.799 29.788-111.056 72.42-150.81s97.536-61.479 155.495-61.724c-8.896 119.146-108.437 211.984-227.915 212.534z"/>
12
- <circle cx="14.088" cy="206.106" r="9.031"/>
13
- <circle cx="124.058" cy="105.841" r="9.031"/>
14
- <circle cx="255.992" cy="31.002" r="9.031"/>
15
- <circle cx="387.949" cy="105.841" r="9.031"/>
16
- <circle cx="497.896" cy="206.106" r="9.031"/>
17
- </g>
18
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#d6b900" d="M348.012 201.627c-7.942 6.151-32.335 13.735-39.437 20.84-22.866 22.842-40.65 49.982-52.583 79.495-11.921-29.513-29.717-56.653-52.571-79.495-7.103-7.112-25.884-21.252-33.833-27.404 5.114-40.463 54.519-96.267 86.404-128.151 31.896 31.884 86.906 90.507 92.02 134.715z" fill-opacity=".963" stroke="#555"/><g fill="#d44f4f" stroke="#555"><path d="M255.992 301.961c-11.403 28.212-17.447 58.604-17.447 89.525 0 2.637.036 5.286.144 7.923-24.335-60-72.27-107.587-131.934-131.705v-.012c-1.144-32.439 4.347-65.636 17.303-97.677 20.831 8.417 39.832 19.434 56.761 32.535a236.697 236.697 0 0122.601 19.916c22.854 22.842 40.651 49.983 52.572 79.495z"/><path d="M405.24 267.705c-84.745 34.257-145.841 115.895-149.236 213.15-1.011-28.79-7.068-56.22-17.315-81.445a193.863 193.863 0 01-.144-7.923c0-30.921 6.045-61.313 17.447-89.525 11.933-29.513 29.717-56.653 52.583-79.495a237.905 237.905 0 0122.589-19.904c16.942-13.113 35.942-24.13 56.785-32.547 12.956 32.041 18.435 65.238 17.291 97.677v.012z"/></g><path d="M494.5 250.4c2.8 0 5.6 0 8.5.1-4.6 131.8-115.2 234.9-247 230.3 3.4-97.3 64.5-178.9 149.2-213.2 27.6-11.2 57.8-17.3 89.2-17.3zm-255.8 149c10.2 25.2 16.3 52.7 17.3 81.4-131.8 4.6-242.4-98.5-247-230.3 2.8-.1 5.7-.1 8.5-.1 31.5 0 61.6 6.1 89.2 17.3 59.7 24.1 107.6 71.7 131.9 131.7z" fill="#2296aa" stroke="#555" stroke-width="2.2"/></svg>
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="494.497" width="496.275"><g stroke="#555"><path fill="#d6b900" d="M337.35 135.422c-7.942 6.151-29.81 14.24-36.912 21.345-22.866 22.842-40.373 49.476-52.306 78.989-11.92-29.513-32.52-56.652-55.373-79.494-7.103-7.112-25.884-21.252-33.833-27.404C164.04 88.395 213.445 32.591 245.33.707c31.896 31.884 86.906 90.507 92.02 134.715z" fill-opacity=".963"/><g fill="#d44f4f"><path d="M248.132 235.756c-11.403 28.212-17.447 58.604-17.447 89.525 0 2.637.036 5.286.144 7.923-24.335-60-72.27-107.587-131.934-131.705v-.012c-1.144-32.439 4.347-65.636 17.303-97.677 20.831 8.417 39.832 19.434 56.761 32.535a236.697 236.697 0 0122.601 19.916c22.854 22.842 40.651 49.983 52.572 79.495z"/><path d="M397.38 201.5c-84.745 34.257-145.84 115.895-149.236 213.15-1.01-28.79-7.068-56.22-17.315-81.445a193.863 193.863 0 01-.144-7.923c0-30.921 6.045-61.313 17.447-89.525 11.933-29.513 29.717-56.653 52.583-79.495a237.905 237.905 0 0122.59-19.904c16.941-13.113 35.941-24.13 56.784-32.547 12.956 32.041 18.435 65.238 17.291 97.677z"/></g><path d="M486.638 184.195c2.8 0 5.6 0 8.5.1-4.6 131.8-115.2 234.9-247 230.3 3.4-97.3 64.5-178.9 149.2-213.2 27.6-11.2 57.8-17.3 89.2-17.3zm-255.8 149c10.2 25.2 16.3 52.7 17.3 81.4-131.8 4.6-242.4-98.5-247-230.3 2.8-.1 5.7-.1 8.5-.1 31.5 0 61.6 6.1 89.2 17.3 59.7 24.1 107.6 71.7 131.9 131.7z" fill="#2296aa" stroke-width="2.2"/></g><text y="493.554" x="28.74" style="line-height:1.25;-inkscape-font-specification:'Optician Sans Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal" font-weight="400" font-size="94.292" font-family="Optician Sans" stroke-width="2.357"><tspan dx=".08" y="493.554" x="28.74" letter-spacing="20">Lowtus</tspan></text></svg>
@@ -0,0 +1,13 @@
1
+
2
+ #Install node dependances.
3
+ npm install -g bbc-a11y
4
+ npm install -g constyble
5
+ npm install -g lighthouse
6
+ npm install -g seolint
7
+ npm install -g wallace-cli
8
+ npm install -g stylestats
9
+ npm install -g yellowlabtools
10
+ npm install -g gpagespeed
11
+ npm install -g axe
12
+ npm install -g wallace
13
+ npm install -g gpagespeed-cli
@@ -0,0 +1,306 @@
1
+
2
+ # Function for parsing _config.yml
3
+ function yaml() {
4
+ hashdot=$(gem list hash_dot);
5
+ if ! [ "$hashdot" != "" ]; then sudo gem install "hash_dot" ; fi
6
+ if [ -f $1 ];then
7
+ cmd=" Hash.use_dot_syntax = true; hash = YAML.load(File.read('$1'));";
8
+ if [ "$2" != "" ] ;then
9
+ cmd="$cmd puts hash.$2;"
10
+ else
11
+ cmd="$cmd puts hash;"
12
+ fi
13
+ ruby -r yaml -r hash_dot <<< $cmd;
14
+ fi
15
+ }
16
+
17
+ # Function for slugify string
18
+ slugify () {
19
+ echo "$1" | sed -e 's/’/ /g' | sed -e 's/./ /g' | sed -e 's/[[:punct:]]//g' | sed -e 's/[^[:alnum:]]/-/g' | tr -s '-' | tr A-Z a-z | sed -e 'y/āáǎàēéěèêīíǐìōóǒòôūúǔùûǖǘǚǜĀÁǍÀĒÉĚÈÊĪÍǏÌŌÓǑÒÔŪÚǓÙǕǗǙǛ/aaaaeeeeeiiiiooooouuuuuuuuuuaaaaeeeeiiiiooooouuuuuuuu/'
20
+ }
21
+
22
+ # Declare array separator
23
+ IFS='£'
24
+ COLUMNS=1
25
+
26
+ # Variables for colorize console log
27
+ red=`tput setaf 1`
28
+ green=`tput setaf 2`
29
+ reset=`tput sgr0`
30
+ bold=$(tput bold)
31
+
32
+ # Define website array length with jq
33
+ length=$(jq '. | length' _data/websites.json )
34
+
35
+ # Create audit array
36
+ audite=()
37
+ for ((idx=0; idx<$length; idx++)); do
38
+ audit+=$(cat _data/websites.json | jq --arg idx "$idx" '.[$idx|tonumber].name' | tr -d '"' )
39
+ audit+=£
40
+ done
41
+
42
+ echo "${green}Select the audit to launch :${reset}"
43
+ # Menu for command line selection
44
+ select choice in $audit Exit; do echo $i
45
+ for ((idx=0; idx<$length; idx++)); do
46
+ value=$(cat _data/websites.json | jq --arg idx "$idx" '.[$idx|tonumber].name' | tr -d '"' | sed -e 's/^[ \t]*//')
47
+ if [[ $choice == $value ]]; then
48
+ websitetested=$choice
49
+ continue
50
+ fi
51
+ done
52
+ ### Last done is on the end of this file ###
53
+
54
+ # Defining config
55
+ datapath="_data"
56
+
57
+ # Test if there is a parameter
58
+ if [ -z "$websitetested" ];
59
+ then
60
+ echo "${green}No Website for test is declared - Add a parameter in the commend line${reset}"
61
+ exit
62
+ fi
63
+
64
+ echo "${green}Main variables${reset}"
65
+ echo "Audit name: $websitetested"
66
+ echo "Data path : $datapath"
67
+ echo
68
+ websitetestedslug=$(slugify "$websitetested")
69
+
70
+ # Defining config (need jq installed)
71
+ #urlstested=($(cat _data/websites.json | jq -r --arg websitetested "$websitetested" '.[] | select(.name==$websitetested) | .pages | .[].url'))
72
+ #pagestested=($(cat _data/websites.json | jq -r --arg websitetested "$websitetested" '.[] | select(.name==$websitetested) | .pages | .[].name'))
73
+
74
+ length2=$(jq --arg websitetested "$websitetested" '.[] | select(.name==$websitetested) | .pages | length' _data/websites.json )
75
+
76
+ urlstested=()
77
+ for ((idx=0; idx<$length2; idx++)); do
78
+ urlstested+=($(cat _data/websites.json | jq -r --arg websitetested "$websitetested" --arg idx "$idx" '.[] | select(.name==$websitetested) | .pages | .[$idx|tonumber].url' | tr -d '"' | sed -e 's/^[ \t]*//'))
79
+ urlstested+=£
80
+ done
81
+
82
+ pagestested=()
83
+ for ((idx=0; idx<$length2; idx++)); do
84
+ pagestested+=($(slugify "$(cat _data/websites.json | jq -r --arg websitetested "$websitetested" --arg idx "$idx" '.[] | select(.name==$websitetested) | .pages | .[$idx|tonumber].name' | tr -d '"' | sed -e 's/^[ \t]*//')"))
85
+ pagestested+=£
86
+ done
87
+
88
+ # Test if there is a parameter
89
+ if [ -z "$urlstested" ];
90
+ then
91
+ echo "${green}No audit test find with this name - try another name${reset}"
92
+ exit
93
+ fi
94
+
95
+ # Create variables
96
+ echo "${green}All site pages${reset}"
97
+ for ((idx=0; idx<${#pagestested[@]}; idx++)); do
98
+ echo "$idx" - "${pagestested[idx]//£/}"
99
+ eval namepage$idx=${pagestested[idx]//£/}
100
+ done
101
+
102
+ echo "${green}All site URL${reset}"
103
+ for ((idx=0; idx<${#urlstested[@]}; idx++)); do
104
+ echo "$idx" - "${urlstested[idx]//£/}"
105
+ eval urlpage$idx=${urlstested[idx]//£/}
106
+ done
107
+
108
+ # Create folder namespace in _data
109
+ if [ ! -d $datapath/$websitetestedslug ]; then
110
+ mkdir -p $datapath/$websitetestedslug;
111
+ fi
112
+
113
+ if [ ! -d $datapath/$websitetestedslug/$namepage0 ]; then
114
+ mkdir -p $datapath/$websitetestedslug/$namepage0;
115
+ fi
116
+
117
+ # Specifics pages tests
118
+ for ((idx=0; idx<${#urlstested[@]}; idx++)); do
119
+ echo "${red}-----------------------------------${reset}"
120
+ urlpage="urlpage${idx}"
121
+ namepage="namepage${idx}"
122
+ domain="${!urlpage#http://}"
123
+ domain="${domain#https://}"
124
+ domain=${domain%%/*}
125
+ hostname="${domain#www.}"
126
+ date=$(date '+%Y-%m-%d')
127
+ date="2020-01-23"
128
+ echo "TEST FOR:"
129
+ echo "${green}URL:${reset} ${!urlpage}"
130
+ printf "${green}%-15s | %-15s | %-20s | %-20s \n${reset}" "DATE" "PAGE" "DOMAIN" "HOSTNAME"
131
+ printf "${red}%-15s | %-15s | %-20s | %-20s \n\n${reset}" "${date}" "${!namepage}" "${domain}" "${hostname}"
132
+ #echo "${green}url:${reset} ${!urlpage}" "- ${green}namepage:${reset} ${!namepage}" "- ${green}domain:${reset} ${domain}" "- ${green}hostname:${reset} ${hostname}"
133
+ if [ ! -d $datapath/$websitetestedslug/${!namepage} ]; then
134
+ mkdir -p $datapath/$websitetestedslug/${!namepage};
135
+ fi
136
+ for VARIABLE in axe gpagespeed lighthouse stylestats wallace pa11y observatory htmlvalidator greenweb cssstats
137
+ do
138
+ if [ ! -d $datapath/$websitetestedslug/${!namepage}/$VARIABLE ]; then
139
+ mkdir -p $datapath/$websitetestedslug/${!namepage}/$VARIABLE;
140
+ fi
141
+ done
142
+ echo "${bold}TESTS LAUNCHED:${reset}"
143
+
144
+ ## AXE
145
+ if [ ! -f $datapath/$websitetestedslug/${!namepage}/axe/${date}.json ]; then
146
+ echo "${red}axe${reset} '${!urlpage}' --save $datapath/$websitetestedslug/${!namepage}/axe/${date}.json"
147
+ axe ${!urlpage} --no-sandbox --save $datapath/$websitetestedslug/${!namepage}/axe/${date}.json
148
+ else
149
+ echo "${green}Test already launched, try this command for a new manual test:${reset}"
150
+ echo "${red}=> axe${reset} '${!urlpage}' --save $datapath/$websitetestedslug/${!namepage}/axe/${date}.json"
151
+ fi
152
+
153
+ ## PA11Y
154
+ if [ ! -f $datapath/$websitetestedslug/${!namepage}/pa11y/${date}.json ]; then
155
+ echo "${red}pa11y-ci${reset} '${!urlpage}' -j > $datapath/$websitetestedslug/${!namepage}/pa11yci/${date}.json"
156
+ pa11y-ci ${!urlpage} -j > $datapath/$websitetestedslug/${!namepage}/pa11y/${date}.json
157
+ else
158
+ echo "${green}Test already launched, try this command for a new manual test:${reset}"
159
+ echo "${red}=> pa11y-ci${reset} '${!urlpage}' -j > $datapath/$websitetestedslug/${!namepage}/pa11yci/${date}.json"
160
+ fi
161
+
162
+ ## GPAGESPEED
163
+ if [ ! -f $datapath/$websitetestedslug/${!namepage}/gpagespeed/${date}.json ]; then
164
+ echo "${red}gpagespeed${reset} '${!urlpage}' > $datapath/$websitetestedslug/${!namepage}/gpagespeed/${date}.json"
165
+ gpagespeed ${!urlpage} > $datapath/$websitetestedslug/${!namepage}/gpagespeed/${date}.json
166
+ else
167
+ echo "${green}Test already launched, try this command for a new manual test:${reset}"
168
+ echo "${red}=> gpagespeed${reset} '${!urlpage}' > $datapath/$websitetestedslug/${!namepage}/gpagespeed/${date}.json"
169
+ fi
170
+
171
+ ## LIGHTHOUSE
172
+ if [ ! -f $datapath/$websitetestedslug/${!namepage}/lighthouse/${date}.json ]; then
173
+ echo "${red}lighthouse${reset} '${!urlpage}' --chrome-flags="--headless" --output json --output-path $datapath/$websitetestedslug/${!namepage}/lighthouse/${date}.json"
174
+ lighthouse ${!urlpage} --chrome-flags="--headless" --quiet --output json --output-path $datapath/$websitetestedslug/${!namepage}/lighthouse/${date}.json
175
+ else
176
+ echo "${green}Test already launched, try this command for a new manual test:${reset}"
177
+ echo "${red}=> lighthouse${reset} '${!urlpage}' --chrome-flags="--headless" --output json --output-path $datapath/$websitetestedslug/${!namepage}/lighthouse/${date}.json"
178
+ fi
179
+
180
+ ## ExtractCSS
181
+ if [ ! -f download/${!namepage}-${date}.css ]; then
182
+ echo "${red}curl${reset} -o download/${!namepage}-${date}.css https://extract-css.now.sh/${domain}"
183
+ curl -m 8 -o download/${!namepage}-${date}.css https://extract-css.now.sh/${domain}
184
+ find download -size 0 -delete
185
+ sed -i '' '/@import/d' $datapath/$websitetestedslug/${!namepage}/stylestats/${date}.json
186
+ echo "${red}cleancss${reset} --inline remote,${domain} --format beautify -o download/${!namepage}-${date}.css download/${!namepage}-${date}.css"
187
+ cleancss --inline remote,${domain} --format beautify -o download/${!namepage}-${date}.css download/${!namepage}-${date}.css
188
+ else
189
+ echo "${green}Test already launched, try this command for a new manual test:${reset}"
190
+ echo "${red}=> curl${reset} -o download/${!namepage}-${date}.css https://extract-css.now.sh/${domain}"
191
+ fi
192
+
193
+ ## GETCSS
194
+ if [ ! -f download/${!namepage}-${date}.css ]; then
195
+ echo "${red}getcss${reset} ${!urlpage} > download/${!namepage}-${date}.css"
196
+ getcss ${!urlpage} > download/${!namepage}-${date}.css
197
+ sed -i '' '/@import/d' $datapath/$websitetestedslug/${!namepage}/stylestats/${date}.json
198
+ echo "${red}cleancss${reset} --inline remote,${domain} --format beautify -o download/${!namepage}-${date}.css download/${!namepage}-${date}.css"
199
+ cleancss --inline remote,${domain} --format beautify -o download/${!namepage}-${date}.css download/${!namepage}-${date}.css
200
+ else
201
+ echo "${green}Test already launched, try this command for a new manual test:${reset}"
202
+ echo "${red}=> getcss${reset} ${!urlpage} > download/${!namepage}-${date}.css"
203
+ fi
204
+
205
+ ## STYLESTATS
206
+ if [ ! -f $datapath/$websitetestedslug/${!namepage}/stylestats/${date}.json ]; then
207
+ echo "${red}stylestats${reset} download/${!namepage}-${date}.css -f json > $datapath/$websitetestedslug/${!namepage}/stylestats/${date}.json"
208
+ stylestats download/${!namepage}-${date}.css -f json > $datapath/$websitetestedslug/${!namepage}/stylestats/${date}.json
209
+ sed -i '' '/[ERROR]/d' $datapath/$websitetestedslug/${!namepage}/stylestats/${date}.json
210
+ sed -i '' -e ':a' -e 'N' -e '$!ba' -e 's/,\n ]/\'$'\n]/g' $datapath/$websitetestedslug/${!namepage}/stylestats/${date}.json
211
+ else
212
+ echo "${green}Test already launched, try this command for a new manual test:${reset}"
213
+ echo "${red}=> stylestats${reset} download/${!namepage}-${date}.css -f json > $datapath/$websitetestedslug/${!namepage}/stylestats/${date}.json"
214
+ fi
215
+
216
+ ## WALLACE
217
+ if [ ! -f $datapath/$websitetestedslug/${!namepage}/wallace/${date}.json ]; then
218
+ echo "${red}wallace${reset} ${!urlpage} -f json > $datapath/$websitetestedslug/${!namepage}/wallace/${date}.json"
219
+ wallace ${!urlpage} -f json > $datapath/$websitetestedslug/${!namepage}/wallace/${date}.json
220
+ find download -size 0 -delete
221
+ else
222
+ echo "${green}Test already launched, try this command for a new manual test:${reset}"
223
+ echo "${red}=> wallace${reset} '${!urlpage}' -f json > $datapath/$websitetestedslug/${!namepage}/wallace/${date}.json"
224
+ fi
225
+
226
+ ## CSSSTATS
227
+ if [ ! -f $datapath/$websitetestedslug/${!namepage}/cssstats/${date}.json ]; then
228
+ echo "${red}curl${reset} -m 5 -o $datapath/$websitetestedslug/${!namepage}/cssstats/${date}.json https://${red}cssstats.com${reset}/api/stats\?url\=${hostname}"
229
+ curl -m 30 -o $datapath/$websitetestedslug/${!namepage}/cssstats/${date}.json https://cssstats.com/api/stats\?url\=${hostname}
230
+ else
231
+ echo "${green}Test already launched, try this command for a new manual test:${reset}"
232
+ echo "${red}=> curl${reset} -m 5 -o $datapath/$websitetestedslug/${!namepage}/cssstats/${date}.json https://cssstats.com/api/stats\?url\=${hostname}"
233
+ curl -m 30 -o $datapath/$websitetestedslug/${!namepage}/cssstats/${date}.json https://cssstats.com/api/stats\?url\=${hostname}
234
+ fi
235
+
236
+ ## OBSERVATORY
237
+ if [ ! -f $datapath/$websitetestedslug/${!namepage}/observatory/${date}.json ]; then
238
+ echo "${red}observatory${reset} ${hostname} > $datapath/$websitetestedslug/${!namepage}/observatory/${date}.json"
239
+ observatory ${hostname} > $datapath/$websitetestedslug/${!namepage}/observatory/${date}.json
240
+ sed -i '' '/^observatory/d' $datapath/$websitetestedslug/${!namepage}/observatory/${date}.json
241
+ find download -size 0 -delete
242
+ else
243
+ echo "${green}Test already launched, try this command for a new manual test:${reset}"
244
+ echo "${red}=> observatory${reset} ${hostname} > $datapath/$websitetestedslug/${!namepage}/observatory/${date}.json"
245
+ sed -i '' '/^observatory/d' $datapath/$websitetestedslug/${!namepage}/observatory/${date}.json
246
+ fi
247
+
248
+ ## HTML-VALIDATOR
249
+ if [ ! -f $datapath/$websitetestedslug/${!namepage}/htmlvalidator/${date}.json ]; then
250
+ echo "${red}html-validator${reset} ${!urlpage} --format=json a --verbose > $datapath/$websitetestedslug/${!namepage}/sitevalidator/${date}.json"
251
+ #html-validator ${!urlpage} --format=json a --verbose > $datapath/$websitetestedslug/${!namepage}/htmlvalidator/${date}.json
252
+ else
253
+ echo "${green}Test already launched, try this command for a new manual test:${reset}"
254
+ echo "${red}=> html-validator${reset} ${!urlpage} --format=json a --verbose > $datapath/$websitetestedslug/${!namepage}/sitevalidator/${date}.json"
255
+ fi
256
+
257
+ ## GREENWEB
258
+ if [ ! -f $datapath/$websitetestedslug/${!namepage}/greenweb/${date}.json ]; then
259
+ echo "${red}curl${reset} http://api.thegreenwebfoundation.org/greencheck/${hostname} > $datapath/$websitetestedslug/${!namepage}/greenweb/${date}.json"
260
+ curl -m 5 http://api.thegreenwebfoundation.org/greencheck/${hostname} > $datapath/$websitetestedslug/${!namepage}/greenweb/${date}.json
261
+ else
262
+ echo "${green}Test already launched, try this command for a new manual test:${reset}"
263
+ echo "${red}=> curl${reset} http://api.thegreenwebfoundation.org/greencheck/${hostname} > $datapath/$websitetestedslug/${!namepage}/greenweb/${date}.json"
264
+ fi
265
+
266
+ ## SITE-VALIDATOR
267
+ ## if [ ! -f $$datapath/$websitetestedslug/${!namepage}/sitevalidator/${date} ]; then
268
+ ## echo "${red}site-validator${reset} '${!urlpage}' --output json > $datapath/$websitetestedslug/${!namepage}/sitevalidator/${date}.json"
269
+ ## site-validator ${!urlpage} --output $datapath/$websitetestedslug/${!namepage}/sitevalidator/${date}
270
+ ## else
271
+ ## echo "${green}Test already launched, try this command for a new manual test:${reset}"
272
+ ## echo "${red}=> site-validator${reset} '${!urlpage}' --output json > $datapath/$websitetestedslug/${!namepage}/sitevalidator/${date}.json"
273
+ ## fi
274
+
275
+ ## SEOCLI
276
+ ## if [ ! -f $datapath/$websitetestedslug/${!namepage}/seocli/${date}.json ]; then
277
+ ## echo "${red}./${reset}vendor/bin/seocli -u '${!urlpage}' -d 3 -f json > $datapath/$websitetestedslug/${!namepage}/seocli/${date}.json"
278
+ ## ./vendor/bin/seocli -u ${!urlpage} -d 3 -f json > $datapath/$websitetestedslug/${!namepage}/seocli/${date}.json
279
+ ## else
280
+ ## echo "${green}Test already launched, try this command for a new manual test:${reset}"
281
+ ## echo "${red}=> ./${reset}vendor/bin/seocli -u '${!urlpage}' -d 3 -f json > $datapath/$websitetestedslug/${!namepage}/seocli/${date}.json"
282
+ ## fi
283
+
284
+ ## YELLOWLABTOOLS
285
+ ## if [ ! -f $datapath/$websitetestedslug/${!namepage}/yellowlabtools/${date}.json ]; then
286
+ ## echo "${red}yellowlabtools${reset} '${!urlpage}' > $datapath/$websitetestedslug/${!namepage}/yellowlabtools/${date}.json"
287
+ ## # yellowlabtools ${!urlpage} > $datapath/$websitetestedslug/${!namepage}/yellowlabtools/${date}.json
288
+ ## else
289
+ ## echo "${green}Test already launched, try this command for a new manual test:${reset}"
290
+ ## echo "${red}=> yellowlabtools${reset} '${!urlpage}' > $datapath/$websitetestedslug/${!namepage}/yellowlabtools/${date}.json"
291
+ ## fi
292
+ done
293
+
294
+ echo "${red}Deleting Empty files${reset}"
295
+ find . -empty -type d -delete
296
+ #find . -size 0 -delete
297
+ ##sed -i '' -e ':a' -e 'N' -e '$!ba' -e 's/,\n ]/\'$'\n]/g'
298
+
299
+
300
+ # General site tests
301
+ # https://seobutler.com/badass-seo-automate-screaming-frog/
302
+ # open "/Applications/Screaming Frog SEO Spider.app" --args --crawl $urlpage0
303
+ # curl https://www.googleapis.com/pagespeedonline/v5/runPagespeed\?url\=https://www.leforestier-immobilier.com/fr&key=AIzaSyATvQKCg0r2tKjt9OhEHXuqlpVMjHby730 > aa.json
304
+ exit
305
+ done
306
+ done