{% for website in pagestested limit: 1 %}
{% if site.data %} {% assign gpagespeed = sites.data..gpagespeed %} {% assign seocli = site.data..seocli %} {% assign screamingfrog = site.data..screamingfrog %} {% else %} {% assign gpagespeed = [website].gpagespeed %} {% assign seocli = [website].seocli %} {% assign screamingfrog = [website].screamingfrog %} {% endif %}
{% assign urlBlocks = gpagespeed.formattedResults.ruleResults.MinimizeRenderBlockingResources.urlBlocks %}
{% if screamingfrog %} {% assign liststatus = screamingfrog | sort: 'Status Code' | reverse %} {% assign listtitle = screamingfrog | sort: 'Title 1 Length' | reverse %} {% assign listmeta = screamingfrog | sort: 'Meta Description 1 Length' | reverse %} {% assign listh1 = screamingfrog | sort: 'H1-1 length' | reverse %} {% assign listsizepage = screamingfrog | sort: 'Size (bytes)' | reverse %} {% assign listsizepage = listsizepage | where_exp: “item”, “item.Content != 'image/jpeg' and item.Content != 'image/png'” %} {% assign listsizepage = listsizepage | where_exp: “item”, “item.Content != 'image/gif' and item.Indexability == 'Indexable'” %} {% assign listsizeimage = screamingfrog | sort: 'Size (bytes)' | reverse %} {% assign listsizeimage = listsizeimage | where_exp: “item”, “item.Content contains 'image'” %} {% assign listresponse = screamingfrog | sort: 'Response Time' | reverse %} {% endif %}
{% assign status = “” | split: ',' %} {% assign title = “” | split: ',' %} {% assign meta = “” | split: ',' %} {% assign h1 = “” | split: ',' %} {% assign sizepage = “” | split: ',' %} {% assign sizeimage = “” | split: ',' %} {% assign response = “” | split: ',' %}
{% for topList in liststatus %} {% assign value = topList.[Status Code] %} {% if value != “OK” %}{% assign status = status | push: value %}{% endif %}{% endfor %} {% for topList in listtitle %} {% assign value = topList.[“Title 1 Length”] | times: 1 %} {% if value > 65 %}{% assign title = title | push: value %}{% endif %}{% endfor %} {% for topList in listmeta %} {% assign value = topList.[“Meta Description 1 Length”] | times: 1 %} {% if value > 155 %}{% assign meta = meta | push: value %}{% endif %}{% endfor %} {% for topList in listh1 %} {% assign value = topList.[“H1-1 length”] | times: 1 %} {% if value > 70 %}{% assign h1 = h1 | push: value %}{% endif %}{% endfor %} {% for topList in listsizepage %} {% assign value = topList.[“Size (bytes)”] | times: 1 %} {% if value > 160000 %}{% assign sizepage = sizepage | push: value %}{% endif %}{% endfor %} {% for topList in listsizeimage %} {% assign value = topList.[“Size (bytes)”] | times: 1 %} {% if value > 120000 %}{% assign sizeimage = sizeimage | push: value %}{% endif %}{% endfor %} {% for topList in listresponse %}{% assign value = topList.[“Response Time”] %} {% if value > “1” %}{% assign response = response | push: value %}{% endif %}{% endfor %}
{% endfor %}
<div class=“js-tabs” data-existing-hx=“h2” data-tabs-prefix-class=“tabs”>
<ul class="js-tablist"> {% if urlBlocks %} <li class="js-tablist__item"> <a href="#seo-blocking" class="js-tablist__link">Blocking URLs</a> </li> {% endif %} {% if status %} <li class="js-tablist__item"> <a href="#seo-status" class="js-tablist__link">URL status</a> </li> {% endif %} {% if title %} <li class="js-tablist__item"> <a href="#seo-title" class="js-tablist__link">Title 1 Length</a> </li> {% endif %} {% if meta %} <li class="js-tablist__item"> <a href="#seo-meta-description" class="js-tablist__link">Meta Description Length</a> </li> {% endif %} {% if h1 %} <li class="js-tablist__item"> <a href="#seo-h1" class="js-tablist__link">H1 length</a> </li> {% endif %} {% if sizepage %} <li class="js-tablist__item"> <a href="#seo-page-size" class="js-tablist__link">Page Size</a> </li> {% endif %} {% if sizeimage %} <li class="js-tablist__item"> <a href="#seo-image-size" class="js-tablist__link">Image Size</a> </li> {% endif %} {% if response %} <li class="js-tablist__item"> <a href="#seo-response-time" class="js-tablist__link">Response Time</a> </li> {% endif %} </ul> {% if urlBlocks %} <div id="seo-blocking" class="js-tabcontent"> <h3>Blocking URLs</h3> <p>Les urls longues qui bloquent le chargement d’une page.</p> <ol class="flex-list"> {% for urlBlock in urlBlocks %} {% if forloop.length != 0 %} {% for url in urlBlock.urls %} {% for arg in url.result.args %} <li><a href="{{ arg.value }}">{{ arg.value }}</a></li> {% endfor %} {% endfor %} {% endif %} {% endfor %} </ol> </div> {% endif %} {% if status %} <div id="seo-status" class="js-tabcontent screamingfrog"> <h3>URL status (different of OK)</h3> <p>Les urls présentant un status différent de valide.</p> <ol class="flex-list"> {% for topList in liststatus %} {% assign value = topList.[Status Code] %} {% if value != "OK" %}<li><a href='{{ topList.Address }}' title='{{ topList.Address | replace: "https://www.leforestier-immobilier.com",""}}'>{{ topList.Address | replace: "https://www.leforestier-immobilier.com",""}}</a> <span>{{ value }}</span></li>{% endif %} {% endfor %} </ol> </div> {% endif %} {% if title %} <div id="seo-title" class="js-tabcontent screamingfrog"> <h3>Title 1 Length</h3> <p>Si plus de 65 caractères</p> <ol class="flex-list"> {% for topList in listtitle %} {% assign value = topList.["Title 1 Length"] | times: 1 %} {% if value > 65 %}<li><a href='{{ topList.Address }}' title='{{ topList.Address | replace: "https://www.leforestier-immobilier.com",""}}'>{{ topList.Address | replace: "https://www.leforestier-immobilier.com",""}}</a> <span>{{ value }} Characters</span></li>{% endif %} {% endfor %} </ol> </div> {% endif %} {% if meta %} <div id="seo-meta-description" class="js-tabcontent screamingfrog"> <h3>Meta Description 1 Length</h3> <p>Si plus de 155 caractères.</p> <ol class="flex-list"> {% for topList in listmeta %} {% assign value = topList.["Meta Description 1 Length"] | times: 1 %} {% if value > 155 %}<li><a href='{{ topList.Address }}' title='{{ topList.Address | replace: "https://www.leforestier-immobilier.com",""}}'>{{ topList.Address | replace: "https://www.leforestier-immobilier.com",""}}</a> <span>{{ value }} Characters</span></li>{% endif %} {% endfor %} </ol> </div> {% endif %} {% if h1 %} <div id="seo-h1" class="js-tabcontent screamingfrog"> <h3>H1-1 length</h3> <p>Si plus de 70 caractères.</p> <ol class="flex-list"> {% for topList in listh1 %} {% assign value = topList.["H1-1 length"] | times: 1 %} {% if value > 70 %}<li><a href='{{ topList.Address }}' title='{{ topList.Address | replace: "https://www.leforestier-immobilier.com",""}}'>{{ topList.Address | replace: "https://www.leforestier-immobilier.com",""}}</a> <span>{{ value }} Characters</span></li>{% endif %} {% endfor %} </ol> </div> {% endif %} {% if sizepage %} <div id="seo-page-size" class="js-tabcontent screamingfrog"> <h3>Page Size</h3> <p>Les pages les plus lourdes.</p> <ol class="flex-list"> {% for topList in listsizepage %} {% assign content = topList.["Content"] %} {% assign value = topList.["Size (bytes)"] | times: 1 %} {% if content != "image/jpeg" and content != "image/png" and content != "image/gif" and topList.Indexability == "Indexable" %}{% if value > 220000 %} <li><a href='{{ topList.Address }}' title='{{ topList.Address | replace: "https://www.leforestier-immobilier.com",""}}'>{{ topList.Address | replace: "https://www.leforestier-immobilier.com",""}}</a> <span>{{ value}}</span></li>{% endif %}{% endif %} {% endfor %} </ol> </div> {% endif %} {% if sizeimage %} <div id="seo-image-size" class="js-tabcontent screamingfrog"> <h3>Image Size</h3> <p>Les images les plus lourdes.</p> <ol class="flex-list"> {% for topList in listsizeimage %} {% assign content = topList.["Content"] %} {% assign value = topList.["Size (bytes)"] | times: 1 %} {% if content == "image/jpeg" or content == "image/png" or content == "image/gif" %}{% if value > 180000 %} <li> <a href='{{ topList.Address }}' title='{{ topList.Address | replace: "https://www.leforestier-immobilier.com",""}}'>{{ topList.Address | replace: "https://www.leforestier-immobilier.com",""}}</a> <span>{{ value}}</span></li>{% endif %}{% endif %} {% endfor %} </ol> </div> {% endif %} {% if response %} <div id="seo-response-time" class="js-tabcontent screamingfrog"> <h3>Response Time</h3> <p>Temps de réponse.</p> <ol class="flex-list"> {% for topList in listresponse %} {% assign content = topList.["Content"] %} {% assign value = topList.["Response Time"] %} {% if content != "image/jpeg" and value > "1" %}<li><a href='{{ topList.Address }}' title='{{ topList.Address | replace: "https://www.leforestier-immobilier.com",""}}'>{{ topList.Address | replace: "https://www.leforestier-immobilier.com",""}}</a> <span>{{ value }} s</span></li>{% endif %} {% endfor %} </ol> </div> {% endif %} {% comment %} {% assign seocli = site.data.[website].seocli[datelastcrawl] %} <div class="seocli"> {% for topList in seocli.topLists %} <h3>{{topList.[0]}}</h3> <ul> {% for lists in topList %} {% for list in lists %} <li><a href="{{ list.uri }}">{{ list.uri | replace: "https://www.leforestier-immobilier.com","" }}</a></li> {% endfor %} {% endfor %} </ul> {% endfor %} </div> {% endcomment %} </div>