add lighthouse-ci to drone
This commit is contained in:
parent
e361563626
commit
178b92b0a0
11 changed files with 69 additions and 22 deletions
|
@ -3,9 +3,9 @@
|
|||
|
||||
{{ $.Scratch.Set "content" (.Content | replaceRE `<nav id="TableOfContents">\s*<ul>\s*<li>\s*<ul>` `<nav id="TableOfContents"><ul>` | replaceRE `</ul>\s*</li>\s*</ul>\s*</nav>` `</ul></nav>` | safeHTML) }}
|
||||
{{ if and $showAnchor $anchorLeft }}
|
||||
{{ $.Scratch.Set "content" ($.Scratch.Get "content" | replaceRE "(<h[2-9] id=\"([^\"]+)\"[^>]*>)(.*?)(</h[2-9]+>)" (printf `<div class="gdoc-page__anchorwrap">%s<a data-clipboard-text="%s" class="gdoc-page__anchor gdoc-page__anchor--left clip" href="#%s"><svg class="icon link"><use xlink:href="#link"></use></svg></a>%s%s</div>` `${1}` (absURL (printf "%s#%s" .Permalink `${2}`)) `${2}` `${3}` `${4}`) | safeHTML) }}
|
||||
{{ $.Scratch.Set "content" ($.Scratch.Get "content" | replaceRE "(<h[2-9] id=\"([^\"]+)\"[^>]*>)(.*?)(</h[2-9]+>)" (printf `<div class="gdoc-page__anchorwrap">%s<a data-clipboard-text="%s" class="gdoc-page__anchor gdoc-page__anchor--left clip" aria-label="Anchor %s" href="#%s"><svg class="icon link"><use xlink:href="#link"></use></svg></a>%s%s</div>` `${1}` (absURL (printf "%s#%s" .Permalink `${2}`)) `${3}` `${2}` `${3}` `${4}`) | safeHTML) }}
|
||||
{{ else if and $showAnchor (not $anchorLeft) }}
|
||||
{{ $.Scratch.Set "content" ($.Scratch.Get "content" | replaceRE "(<h[2-9] id=\"([^\"]+)\"[^>]*>)(.*?)(</h[2-9]+>)" (printf `<div class="gdoc-page__anchorwrap">%s%s<a data-clipboard-text="%s" class="gdoc-page__anchor gdoc-page__anchor--right clip" href="#%s"><svg class="icon link"><use xlink:href="#link"></use></svg></a>%s</div>` `${1}` `${3}` (absURL (printf "%s#%s" .Permalink `${2}`)) `${2}` `${4}`) | safeHTML) }}
|
||||
{{ $.Scratch.Set "content" ($.Scratch.Get "content" | replaceRE "(<h[2-9] id=\"([^\"]+)\"[^>]*>)(.*?)(</h[2-9]+>)" (printf `<div class="gdoc-page__anchorwrap">%s%s<a data-clipboard-text="%s" class="gdoc-page__anchor gdoc-page__anchor--right clip" aria-label="Anchor %s" href="#%s"><svg class="icon link"><use xlink:href="#link"></use></svg></a>%s</div>` `${1}` `${3}` (absURL (printf "%s#%s" .Permalink `${2}`)) `${3}` `${2}` `${4}`) | safeHTML) }}
|
||||
{{ end }}
|
||||
|
||||
{{ $.Scratch.Get "content" }}
|
||||
|
|
|
@ -7,8 +7,10 @@
|
|||
{{ end }}
|
||||
|
||||
{{ if default true .Site.Params.GeekdocAnchorCopy }}
|
||||
<script src="{{ "js/clipboard.min.js" | relURL }}"></script>
|
||||
<script defer src="{{ "js/clipboard.min.js" | relURL }}"></script>
|
||||
<script>
|
||||
var clipboard = new ClipboardJS('.clip');
|
||||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
var clipboard = new ClipboardJS('.clip');
|
||||
});
|
||||
</script>
|
||||
{{ end }}
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<title>{{ partial "title" . }} | {{ .Site.Title -}}</title>
|
||||
<link rel="icon" href="{{ "favicon/favicon-32x32.png" | relURL }}" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="{{ "main.min.css" | relURL }}">
|
||||
<link rel="stylesheet" href="{{ "main.min.css" | relURL }}" media="screen">
|
||||
<!-- Theme stylesheet, you can customize css by creating static/custom.css` in your website -->
|
||||
<link rel="stylesheet" href="{{ "custom.css" | relURL }}">
|
||||
<link rel="stylesheet" href="{{ "custom.css" | relURL }}" media="screen">
|
||||
|
||||
<!-- RSS -->
|
||||
{{ with .OutputFormats.Get "rss" -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue