Skip to content

Commit eaa87ac

Browse files
committed
[docs] refactor measure docs syntax highlighting
1 parent 59f7eca commit eaa87ac

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

site/src/measure.njk

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@ In this section, we explore different ways of measuring the impact of Quicklink
1616
- An [optimized version of the site](https://mini-ecomm-quicklink.glitch.me/), which is a copy of the original version, but this time, using Quicklink in the listing page, to prefetch links that come to the view. You can view and edit the code, in the [Glitch project](https://glitch.com/edit/#!/mini-ecomm-quicklink?path=server.js:1:0).
1717

1818
If you take a look at the code of the listing page, in the optimized version of the site, you'll find the code to initialize Quicklink:
19-
20-
```js
21-
<script src="https://unpkg.com/[email protected]/dist/quicklink.umd.js"></script>
22-
<script>
23-
window.addEventListener('load', () =>{
24-
quicklink.listen();
25-
});
26-
</script>
27-
```
19+
{% endmarkdownConvert %}
20+
{% highlight "js" %}
21+
<script src="https://unpkg.com/quicklink@{{ site.quicklinkVersion }}/dist/quicklink.umd.js"></script>
22+
<script>
23+
window.addEventListener('load', () =>{
24+
quicklink.listen();
25+
});
26+
</script>
27+
{% endhighlight %}
28+
{% markdownConvert %}
2829
## Using Chrome DevTools
2930

3031
The first tool you’ll use is [Chrome DevTools](https://developers.google.com/web/tools/chrome-devtools), which is useful both for local development, and also for production URLs.
@@ -69,7 +70,7 @@ To measure the impact of Quicklink on navigations:
6970

7071
{% endmarkdownConvert %}
7172

72-
<img class="article-image" src="/assets/images/screenshots/devtools-optimized-2.png" height="400px" width="800px">
73+
<img loading="lazy" class="article-image" src="/assets/images/screenshots/devtools-optimized-2.png" height="400px" width="800px">
7374

7475
{% markdownConvert %}
7576

@@ -108,7 +109,7 @@ The following table compares the main metrics obtained for each of the sites:
108109

109110
{% endmarkdownConvert %}
110111

111-
<img class="article-image" src="/assets/images/screenshots/wpt-metrics-comparison.png" height="105px" width="700px">
112+
<img loading="lazy" class="article-image" src="/assets/images/screenshots/wpt-metrics-comparison.png" height="105px" width="700px">
112113

113114
{% markdownConvert %}
114115

@@ -132,7 +133,7 @@ The unoptimized site starts rendering approximately at **2.5s**, the demo that u
132133

133134
{% endmarkdownConvert %}
134135

135-
<img class="article-image" src="/assets/images/screenshots/wpt-visual-comparison.png" height="430px" width="820px">
136+
<img loading="lazy" class="article-image" src="/assets/images/screenshots/wpt-visual-comparison.png" height="430px" width="820px">
136137

137138
{% markdownConvert %}
138139

@@ -142,7 +143,7 @@ A video can be generated from the [comparison page](https://www.webpagetest.org/
142143

143144
{% endmarkdownConvert %}
144145

145-
<img class="article-image" src="/assets/images/screenshots/wpt-video-comparison.gif" height="435px" width="600px">
146+
<img loading="lazy" class="article-image" src="/assets/images/screenshots/wpt-video-comparison.gif" height="435px" width="600px">
146147

147148
{% markdownConvert %}
148149

0 commit comments

Comments
 (0)