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" -}}
|
||||
|
|
|
@ -6,15 +6,13 @@
|
|||
<h1 class="gdoc-post__title">
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</h1>
|
||||
<div class="gdoc-post__date">{{ .Date.Format $dateFormat }}</div>
|
||||
</header>
|
||||
<h5>
|
||||
<strong>{{ .Date.Format $dateFormat }}</strong>
|
||||
</h5>
|
||||
<div>
|
||||
{{ .Summary }}
|
||||
{{ if .Truncated }}
|
||||
<a class="gdoc-post__readmore" title="Read full post" href="{{ .RelPermalink }}">
|
||||
Read more
|
||||
Read full post
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{{ define "main" }}
|
||||
{{ $dateFormat := default "January 2, 2006" .Site.Params.GeekdocDateFormat }}
|
||||
<article class="gdoc-markdown">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<h5>
|
||||
<strong>{{ .Date.Format $dateFormat }}</strong>
|
||||
</h5>
|
||||
<article class="gdoc-markdown gdoc-post">
|
||||
<header>
|
||||
<h1 class="gdoc-post__title">{{ .Title }}</h1>
|
||||
<div class="gdoc-post__date">{{ .Date.Format $dateFormat }}</div>
|
||||
</header>
|
||||
<div>
|
||||
{{ partial "content" . }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{{ if not (.Page.Scratch.Get "mermaid") }}
|
||||
<!-- Include mermaid only first time -->
|
||||
<script src="{{ "js/mermaid.min.js" | relURL }}"></script>
|
||||
<script>
|
||||
<script defer src="{{ "js/mermaid.min.js" | relURL }}"></script>
|
||||
<script defer>
|
||||
mermaid.initialize({
|
||||
flowchart: { useMaxWidth: true }
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue