File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed
Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -506,10 +506,20 @@ han: false
506506# For more information: https://github.com/vinta/pangu.js
507507pangu : false
508508
509- # quicklink Support
509+ # Quicklink Support
510510# Dependencies: https://cdn.jsdelivr.net/npm/quicklink/dist/
511511# Visit https://github.com/GoogleChromeLabs/quicklink for details
512- quicklink : false
512+ quicklink :
513+ enable : false
514+ timeout : 3000 # Custom a timeout (milliseconds) for prefetching resources
515+ priority : true # Set true to enable fetch() or falls back to XHR
516+ # For more flexibility you can add some patterns (RegExp, Function, or Array) to ignores
517+ # See: https://github.com/GoogleChromeLabs/quicklink#custom-ignore-patterns
518+ # Leave ignores as empty if you don't understand what it means
519+ # Example:
520+ # ignores: uri => uri.includes('.xml'), (uri, elem) => elem.hasAttribute('noprefetch')
521+ # ignores: [/\/api\/?/, uri => uri.includes('123.html')]
522+ ignores :
513523
514524# Swiftype Search API Key
515525# swiftype_key:
Original file line number Diff line number Diff line change 1- {% if theme.quicklink %}
1+ {% if theme.quicklink and theme. quicklink . enable %}
22 {% set quicklink_uri = url_for (theme.vendors ._internal + ' /quicklink/dist/quicklink.umd.js' ) %}
33 {% if theme.vendors .quicklink %}
44 {% set quicklink_uri = theme.vendors .quicklink %}
77 <script>
88 window.addEventListener(' load' , () => {
99 quicklink ({
10- priority: true ,
11- ignores: [
12- uri => uri.includes (' #' )
13- ]
10+ timeout: {{ theme.quicklink .timeout }},
11+ priority: {{ theme.quicklink .priority }},
12+ ignores: [uri => uri.includes (' #' ), {{ theme.quicklink .ignores }}]
1413 });
1514 });
1615 </script>
You can’t perform that action at this time.
0 commit comments