configure npm

uci-hugo-doc
Robert Kaussow 2020-05-31 18:20:39 +02:00
parent 701bab896d
commit a428f9d84d
10 changed files with 38 additions and 42 deletions

View File

@ -10,9 +10,11 @@ steps:
- name: assets - name: assets
image: node image: node
commands: commands:
- npm install -g gulp -s - npm install -g gulp
- npm install -s - npm install
- gulp default - gulp default
environment:
FORCE_COLOR: true
- name: test - name: test
image: klakegg/hugo:0.69.0-ext-alpine image: klakegg/hugo:0.69.0-ext-alpine
@ -20,6 +22,19 @@ steps:
- cd exampleSite/ - cd exampleSite/
- mkdir themes/ && ln -s ../../. themes/hugo-geekdoc && hugo-official - mkdir themes/ && ln -s ../../. themes/hugo-geekdoc && hugo-official
- name: spellcheck
image: node:lts-alpine
commands:
- npm install -g spellchecker-cli
- spellchecker --files 'exampleSite/content/**/*.md' 'README.md' -d .dictionary -p spell indefinite-article syntax-urls --no-suggestions
environment:
FORCE_COLOR: true
- name: html-validation
image: validator/validator
commands:
- vnu --skip-non-html --also-check-css --errors-only exampleSite/public
- name: build - name: build
image: alpine image: alpine
commands: commands:
@ -71,7 +86,7 @@ steps:
- mkdir -p exampleSite/themes/hugo-geekdoc/ - mkdir -p exampleSite/themes/hugo-geekdoc/
- curl -L https://github.com/xoxys/hugo-geekdoc/releases/latest/download/hugo-geekdoc.tar.gz | tar -xz -C exampleSite/themes/hugo-geekdoc/ --strip-components=1 - curl -L https://github.com/xoxys/hugo-geekdoc/releases/latest/download/hugo-geekdoc.tar.gz | tar -xz -C exampleSite/themes/hugo-geekdoc/ --strip-components=1
- name: test - name: build
image: klakegg/hugo:0.69.0-ext-alpine image: klakegg/hugo:0.69.0-ext-alpine
commands: commands:
- cd exampleSite/ && hugo-official - cd exampleSite/ && hugo-official
@ -138,6 +153,6 @@ depends_on:
--- ---
kind: signature kind: signature
hmac: c78faf65f2d038c8daa5b56c592a1fa6264b40633cd2375d61257a3027897c3c hmac: 708f32a4284b33fb9606b8304637d426cdb38260a6123ca23b4a387ad2bf6654
... ...

1
.npmrc Normal file
View File

@ -0,0 +1 @@
loglevel = error

View File

@ -1,13 +0,0 @@
<!DOCTYPE html>
<html>
<body>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
</body>
</html>

View File

@ -1,5 +0,0 @@
#### Test Table
| Head 1 | Head 2 | Head 3 |
|---|---|---|
| 1 | 2 | 3 |

View File

@ -25,7 +25,7 @@
{{ partial "site-footer" . }} {{ partial "site-footer" . }}
</div> </div>
</body>
{{ partial "foot" . }} {{ partial "foot" . }}
</body>
</html> </html>

View File

@ -1,7 +1,5 @@
{{ define "main" }} {{ define "main" }}
{{ $dateFormat := default "January 2, 2006" .Site.Params.GeekdocDateFormat }} {{ $dateFormat := default "January 2, 2006" .Site.Params.GeekdocDateFormat }}
{{ $paginator := .Paginate (where .Pages "Params.hidden" "ne" true) }}
{{ range sort .Paginator.Pages }} {{ range sort .Paginator.Pages }}
<article class="gdoc-markdown gdoc-post"> <article class="gdoc-markdown gdoc-post">
<header> <header>
@ -12,17 +10,14 @@
<h5> <h5>
<strong>{{ .Date.Format $dateFormat }}</strong> <strong>{{ .Date.Format $dateFormat }}</strong>
</h5> </h5>
<section> <div>
{{ .Summary }} {{ .Summary }}
{{ if .Truncated }} {{ if .Truncated }}
<a class="gdoc-post__readmore" title="Read full post" href="{{ .RelPermalink }}"> <a class="gdoc-post__readmore" title="Read full post" href="{{ .RelPermalink }}">
Read more Read more
</a> </a>
{{ end }} {{ end }}
</section> </div>
</article> </article>
{{ end }} {{ end }}
<!-- TODO: FIXME -->
{{ template "_internal/pagination.html" . }}
{{ end }} {{ end }}

View File

@ -1,12 +1,11 @@
{{ $id := substr (sha1 .Inner) 0 8 }}
<div class="gdoc-expand"> <div class="gdoc-expand">
<label> <label class="gdoc-expand__head flex justify-between" for="{{ $id }}-{{ .Ordinal }}">
<div class="gdoc-expand__head flex justify-between"> <span>{{ default "Expand" (.Get 0) }}</span>
<span>{{ default "Expand" (.Get 0) }}</span> <span>{{ default "↕" (.Get 1) }}</span>
<span>{{ default "↕" (.Get 1) }}</span>
</div>
<input type="checkbox" class="gdoc-expand__control hidden" />
<div class="gdoc-markdown--nested gdoc-expand__content">
{{ .Inner | markdownify }}
</div>
</label> </label>
<input id="{{ $id }}-{{ .Ordinal }}" type="checkbox" class="gdoc-expand__control hidden" />
<div class="gdoc-markdown--nested gdoc-expand__content">
{{ .Inner | markdownify }}
</div>
</div> </div>

View File

@ -461,7 +461,7 @@ img {
.markdown { .markdown {
transition: 0.2s ease-in-out; transition: 0.2s ease-in-out;
transition-property: transform, margin-left, opacity; transition-property: transform, margin-left, opacity;
will-change: transform!important, margin-left !important; will-change: transform, margin-left;
} }
@media screen and (max-width: $sm-breakpoint) { @media screen and (max-width: $sm-breakpoint) {

View File

@ -6,7 +6,7 @@
} }
&--nested { &--nested {
> :first-child { :first-child {
margin-top: 0; margin-top: 0;
} }
> :last-child { > :last-child {

View File

@ -22,6 +22,10 @@
&__control:checked + &__content { &__control:checked + &__content {
display: block; display: block;
} }
.gdoc-page__anchor {
display: none;
}
} }
// {{< tabs >}} // {{< tabs >}}