add markdownlint to ci

This commit is contained in:
Robert Kaussow 2020-06-02 00:01:49 +02:00
parent 6d4ec21b43
commit 03ee06ffac
4 changed files with 41 additions and 15 deletions

View File

@ -7,15 +7,6 @@ platform:
arch: amd64
steps:
- 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
NPM_CONFIG_LOGLEVEL: error
- name: assets
image: node:lts
commands:
@ -118,6 +109,24 @@ concurrency:
limit: 1
steps:
- name: markdownlint
image: node:lts-alpine
commands:
- npm install -g markdownlint-cli
- markdownlint 'exampleSite/content/**/*.md' 'README.md'
environment:
FORCE_COLOR: true
NPM_CONFIG_LOGLEVEL: error
- 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
NPM_CONFIG_LOGLEVEL: error
- name: assets
image: byrnedo/alpine-curl
commands:
@ -142,11 +151,16 @@ steps:
from_secret: s3_secret_access_key
source: exampleSite/public/
strip_prefix: exampleSite/public/
when:
ref:
- refs/heads/master
- refs/tags/**
trigger:
ref:
- refs/heads/master
- refs/tags/**
- refs/pull/**
depends_on:
- build
@ -192,6 +206,6 @@ depends_on:
---
kind: signature
hmac: 1145f38b73b28a6a9e659bd19008fcdf24c808e22db91fc2768740bbf9e138e9
hmac: 49898e6b496014772113f110dae80acca1f525f1ae0545669eba5ba468f7a4da
...

View File

@ -3,6 +3,7 @@
* resfactor expand shortcode to use valid html
* fix formatting of nested shortcodes markdown
* INTERNAL
* add markdown linting to CI (markdownlint-cli)
* add spellchecking to CI (spellcheck-cli)
* add html/css validation to CI (nu.validator)
* add page validation to CI (lighthouse-ci)

View File

@ -1,17 +1,20 @@
There are multiple ways to add code blocks. Most of them works out of the box only the Hugo shortcode `<highlight>` need some configuration to work properly.
## Inline code
To display an inline shortcode use single quotes:
```
```plain
`some code`
```
**Example:** `some code`
## Code blocks
Code blocks can be uses without language specification:
````
````markdown
```
some code
```
@ -19,13 +22,13 @@ some code
**Example:**
```
```plain
some code
```
... or if you need language specific syntax highlighting:
````
````markdown
```Shell
# some code
echo "Hello world"
@ -45,22 +48,26 @@ Hugo has a build-in shortcode for syntax highlighting. To work properly with thi
{{< tabs "uniqueid" >}}
{{< tab "TOML" >}}
```TOML
pygmentsUseClasses=true
pygmentsCodeFences=true
```
{{< /tab >}}
{{< tab "YAML" >}}
```YAML
pygmentsUseClasses: true
pygmentsCodeFences: true
```
{{< /tab >}}
{{< /tabs >}}
You can use it like every other shortcode:
```Markdown
```markdown
{{</* highlight Shell "linenos=table" */>}}
# some code
echo "Hello World"
@ -69,7 +76,9 @@ echo "Hello World"
**Example:**
<!-- markdownlint-disable -->
{{< highlight Shell "linenos=table" >}}
# some code
echo "Hello World"
{{< /highlight >}}
<!-- markdownlint-enable -->

View File

@ -2,6 +2,7 @@ If you want to customize the color scheme of the theme to give it your individua
All necessary class names are listed below. If you miss some classes required for a color scheme you are very welcome to create an [Issue](https://github.com/xoxys/hugo-geekdoc/issues) or Pull Request. For some inspiration you can have a look at [https://www.color-hex.com/color-palettes/](https://www.color-hex.com/). The following listing use the _HC-primary_ color palette as an example:
<!-- markdownlint-disable -->
{{< highlight CSS "linenos=table" >}}
/* default link color */
a { color: #1c388e; }
@ -30,6 +31,7 @@ a:visited { color: #73bfb8 }
.gdoc-hint.warning { background: #fef5dc; border-color: #e4ba48; color: black; }
.gdoc-hint.danger { background: #fae1db; border-color: #cf5f46; color: black; }
{{< /highlight >}}
<!-- markdownlint-enable -->
And that is how the result will looks like. Happy customizing!