From 3959b13cd80a9658556ded466a603d9d6b19d49e Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 31 May 2020 18:17:32 +0200 Subject: [PATCH 01/15] fix spelling and pass spellchecking --- exampleSite/content/_index.md | 4 +-- exampleSite/content/posts/hello_geekdoc.md | 4 ++- exampleSite/content/posts/initial_release.md | 2 +- exampleSite/content/shortcodes/columns.md | 33 ++++++++++--------- exampleSite/content/shortcodes/expand.md | 21 +++++++----- exampleSite/content/shortcodes/hints.md | 16 ++++----- exampleSite/content/shortcodes/includes.md | 16 ++++----- exampleSite/content/shortcodes/mermaid.md | 3 +- exampleSite/content/shortcodes/tabs.md | 32 +++++++++--------- exampleSite/content/shortcodes/toc-tree.md | 2 +- exampleSite/content/shortcodes/toc.md | 16 ++++----- exampleSite/content/usage/code_blocks.md | 6 ++-- exampleSite/content/usage/color_schemes.md | 6 ++-- exampleSite/static/includes/example.html.part | 6 ++++ exampleSite/static/includes/table.md.part | 5 +++ 15 files changed, 97 insertions(+), 75 deletions(-) create mode 100644 exampleSite/static/includes/example.html.part create mode 100644 exampleSite/static/includes/table.md.part diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index 6c7862b..0948285 100644 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -11,8 +11,8 @@ Geekdoc is a simple Hugo theme for documentations. This work is inspired and par ## Features -- Clean simple design +- Clean and simple design - Light and mobile-friendly -- Customisable +- Easy customization - Zero initial configuration - Handy shortcodes diff --git a/exampleSite/content/posts/hello_geekdoc.md b/exampleSite/content/posts/hello_geekdoc.md index 6c66239..8e389f3 100644 --- a/exampleSite/content/posts/hello_geekdoc.md +++ b/exampleSite/content/posts/hello_geekdoc.md @@ -6,4 +6,6 @@ date: 2020-01-06 This is the first release of the Geekdoc theme. -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. +Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts feud gait, quid exercise emeritus bis e. In pro quints consequent, denim fastidious copious quo ad. Stet probates in duo. + +Amalia id per in minimum facility, quid facet modifier ea ma. Ill um select ma ad, en ferric patine sentient vim. Per expendable foreordained interpretations cu, maxim sole pertinacity in ram. Que no rota alters, ad sea sues exercise main rum, cu diam mas facility sea. diff --git a/exampleSite/content/posts/initial_release.md b/exampleSite/content/posts/initial_release.md index b502808..99357fc 100644 --- a/exampleSite/content/posts/initial_release.md +++ b/exampleSite/content/posts/initial_release.md @@ -6,4 +6,4 @@ date: 2020-01-08 This is the first release of the Geekdoc theme. -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. +Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts feud gait, quid exercise emeritus bis e. In pro quints consequent, denim fastidious copious quo ad. Stet probates in duo. diff --git a/exampleSite/content/shortcodes/columns.md b/exampleSite/content/shortcodes/columns.md index 3935030..98852f9 100644 --- a/exampleSite/content/shortcodes/columns.md +++ b/exampleSite/content/shortcodes/columns.md @@ -1,43 +1,46 @@ Columns help organize shorter pieces of content horizontally for readability. - ```html {{}} # Left Content -Lorem markdownum insigne... +Dolor sit, sumo unique argument um no ... <---> # Mid Content -Lorem markdownum insigne... +Dolor sit, sumo unique argument um no ... <---> # Right Content -Lorem markdownum insigne... +Dolor sit, sumo unique argument um no ... {{}} ``` ## Example {{< columns >}} -## Left Content -Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat -stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa -protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes. -Miseratus fonte Ditis conubia. + +## Left + +Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates +investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts +feud gait, quid exercise emeritus bis e. In pro quints consequent, denim fastidious +copious quo ad. Stet probates in duo. <---> ## Mid Content -Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat -stringit, frustra Saturnius uteroque inter! + +Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates +investiture. Ornateness bland it ex enc, est yeti am bongo detract re. <---> ## Right Content -Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat -stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa -protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes. -Miseratus fonte Ditis conubia. + +Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates +investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts +feud gait, quid exercise emeritus bis e. In pro quints consequent, denim fastidious +copious quo ad. Stet probates in duo. {{< /columns >}} diff --git a/exampleSite/content/shortcodes/expand.md b/exampleSite/content/shortcodes/expand.md index 699d582..8945037 100644 --- a/exampleSite/content/shortcodes/expand.md +++ b/exampleSite/content/shortcodes/expand.md @@ -1,18 +1,21 @@ Expand shortcode can help to decrease clutter on screen by hiding part of text. Expand content by clicking on it. ## Example + ### Default ```tpl {{}} ## Markdown content -Lorem markdownum insigne... +Dolor sit, sumo unique ... {{}} ``` {{< expand >}} + ## Markdown content -Lorem markdownum insigne... + +Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re. {{< /expand >}} ### With Custom Label @@ -20,14 +23,16 @@ Lorem markdownum insigne... ```tpl {{}} ## Markdown content -Lorem markdownum insigne... +Dolor sit, sumo unique ... {{}} ``` {{< expand "Custom Label" "..." >}} -## Markdown content -Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat -stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa -protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes. -Miseratus fonte Ditis conubia. + +## More markdown + +Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates +investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts +feud gait, quid exercise emeritus bis e. In pro quints consequent, denim fastidious +copious quo ad. Stet probates in duo. {{< /expand >}} diff --git a/exampleSite/content/shortcodes/hints.md b/exampleSite/content/shortcodes/hints.md index 25e9f39..8ba24df 100644 --- a/exampleSite/content/shortcodes/hints.md +++ b/exampleSite/content/shortcodes/hints.md @@ -4,8 +4,8 @@ There are 3 colors to choose: `info`, `warning` and `danger`. ```tpl {{}} **Markdown content**\ -Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat -stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa +Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. + Ornateness bland it ex enc, est yeti am bongo detract re. {{}} ``` @@ -13,18 +13,18 @@ stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa {{< hint info >}} **Markdown content**\ -Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat -stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa +Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. + Ornateness bland it ex enc, est yeti am bongo detract re. {{< /hint >}} {{< hint warning >}} **Markdown content**\ -Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat -stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa +Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. + Ornateness bland it ex enc, est yeti am bongo detract re. {{< /hint >}} {{< hint danger >}} **Markdown content**\ -Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat -stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa +Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. + Ornateness bland it ex enc, est yeti am bongo detract re. {{< /hint >}} diff --git a/exampleSite/content/shortcodes/includes.md b/exampleSite/content/shortcodes/includes.md index 3940503..8066eaa 100644 --- a/exampleSite/content/shortcodes/includes.md +++ b/exampleSite/content/shortcodes/includes.md @@ -1,4 +1,4 @@ -Include Shortcode can include files of different types. By specifying a language, the included file will have syntax highlighting. +Include shortcode can include files of different types. By specifying a language, the included file will have syntax highlighting. ## Shortcode @@ -15,7 +15,7 @@ Attributes: | markdown | included file is markdown | false | | options | highlighting [options](https://gohugo.io/content-management/syntax-highlighting/#highlight-shortcode) | linenos=table | -\* if not set, the content will be rendered as plain html +\* if not set, the content will be rendered as plain HTML ### Include *.yml file with options @@ -31,21 +31,21 @@ Included markdown files will be rendered using the `markdownify` filter. {{< hint warning >}} **Location of markdown files**\ -If you include markdown files that should not get a menu entry, place them outside the content folder or exlude them otherwise. +If you include markdown files that should not get a menu entry, place them outside the content folder or exclude them otherwise. {{< /hint >}} ```tpl -{{}} +{{}} ``` -{{< include file="static/table.md" markdown="true" >}} +{{< include file="static/includes/table.md.part" markdown="true" >}} ### Include *.html file -Html content will be filtered by the `safeHTML` filter and added to the rendered page output. +HTML content will be filtered by the `safeHTML` filter and added to the rendered page output. ```tpl -{{}} +{{}} ``` -{{< include file="static/example.html" >}} +{{< include file="static/includes/example.html.part" >}} diff --git a/exampleSite/content/shortcodes/mermaid.md b/exampleSite/content/shortcodes/mermaid.md index 214d1a0..cf8a45c 100644 --- a/exampleSite/content/shortcodes/mermaid.md +++ b/exampleSite/content/shortcodes/mermaid.md @@ -1,8 +1,9 @@ -[Mermaid](https://mermaidjs.github.io/) is library for generating svg charts and diagrams from text. +[Mermaid](https://mermaidjs.github.io/) is library for generating SVG charts and diagrams from text. ## Example {{< columns >}} + ```tpl {{}} sequenceDiagram diff --git a/exampleSite/content/shortcodes/tabs.md b/exampleSite/content/shortcodes/tabs.md index 4b945df..1a5040f 100644 --- a/exampleSite/content/shortcodes/tabs.md +++ b/exampleSite/content/shortcodes/tabs.md @@ -2,7 +2,7 @@ Tabs let you organize content by context, for example installation instructions ```tpl {{}} -{{}} # MacOS Content {{}} +{{}} # macOS Content {{}} {{}} # Linux Content {{}} {{}} # Windows Content {{}} {{}} @@ -11,15 +11,16 @@ Tabs let you organize content by context, for example installation instructions ## Example {{< tabs "uniqueid" >}} -{{< tab "MacOS" >}} -# MacOS +{{< tab "macOS" >}} -This is tab **MacOS** content. +# macOS -Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat -stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa -protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes. -Miseratus fonte Ditis conubia. +This is tab **macOS** content. + +Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates +investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad +prompts feud gait, quid exercise emeritus bis e. In pro quints consequent, denim +fastidious copious quo ad. Stet probates in duo. {{< /tab >}} {{< tab "Linux" >}} @@ -28,10 +29,10 @@ Miseratus fonte Ditis conubia. This is tab **Linux** content. -Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat -stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa -protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes. -Miseratus fonte Ditis conubia. +Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates +investiture. __Ornateness__ bland it ex enc, est yeti am bongo detract re. Pro ad +prompts feud gait, quid exercise emeritus bis e. In pro quints consequent, denim +fastidious copious quo ad. Stet probates in duo. {{< /tab >}} {{< tab "Windows" >}} @@ -40,9 +41,8 @@ Miseratus fonte Ditis conubia. This is tab **Windows** content. -Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat -stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa -protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes. -Miseratus fonte Ditis conubia. +Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates +investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad +prompts feud gait, quid exercise emeritus bis e. In pro quints consequent. {{< /tab >}} {{< /tabs >}} diff --git a/exampleSite/content/shortcodes/toc-tree.md b/exampleSite/content/shortcodes/toc-tree.md index 873dae1..9d01f68 100644 --- a/exampleSite/content/shortcodes/toc-tree.md +++ b/exampleSite/content/shortcodes/toc-tree.md @@ -1,4 +1,4 @@ -The toc-tree shortcode will generate a Table of Content from a section filetree of your content directory. The root of the resulting ToC will be the page on which you define the shortcode. +The toc-tree shortcode will generate a Table of Content from a section file tree of your content directory. The root of the resulting ToC will be the page on which you define the shortcode. ```tpl {{}} diff --git a/exampleSite/content/shortcodes/toc.md b/exampleSite/content/shortcodes/toc.md index c7d06d0..4911001 100644 --- a/exampleSite/content/shortcodes/toc.md +++ b/exampleSite/content/shortcodes/toc.md @@ -8,30 +8,30 @@ Simple wrapper to generate a page Table of Content from a shortcode. ## Level 1 -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. +Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts feud gait, quid exercise emeritus bis e. In pro quints consequent, denim fastidious copious quo ad. Stet probates in duo. ## Level 2 -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat. +Amalia id per in minimum facility, quid facet modifier ea ma. Ill um select ma ad, en ferric patine sentient vim. Per expendable foreordained interpretations cu, maxim sole pertinacity in ram. ### Level 2.1 -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren. +Amalia id per in minimum facility, quid facet modifier ea ma. Ill um select ma ad, en ferric patine sentient vim. Per expendable foreordained interpretations cu, maxim sole pertinacity in ram. #### Level 2.1.1 -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat. +Amalia id per in minimum facility, quid facet modifier ea ma. Ill um select ma ad, en ferric patine sentient vim. ##### Level 2.1.1.1 -Lorem ipsum dolor sit amet, consetetur sadipscing elitr. +In pro quints consequent, denim fastidious copious quo ad. ###### Level 2.1.1.1.1 -Lorem ipsum dolor sit amet, consetetur sadipscing elitr. +In pro quints consequent, denim fastidious copious quo ad. ### Level 2.2 -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren. +Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts feud gait, quid exercise emeritus bis e. -no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. +Amalia id per in minimum facility, quid facet modifier ea ma. Ill um select ma ad, en ferric patine sentient vim. Per expendable foreordained interpretations cu, maxim sole pertinacity in ram. diff --git a/exampleSite/content/usage/code_blocks.md b/exampleSite/content/usage/code_blocks.md index 1eeb6a1..eb5bc3d 100644 --- a/exampleSite/content/usage/code_blocks.md +++ b/exampleSite/content/usage/code_blocks.md @@ -1,4 +1,4 @@ -There are multiple ways to add code blocks. Most of them works out of the box only the hugo shortcode `` need some configuration to work properly. +There are multiple ways to add code blocks. Most of them works out of the box only the Hugo shortcode `` need some configuration to work properly. ## Inline code To display an inline shortcode use single quotes: @@ -9,7 +9,7 @@ To display an inline shortcode use single quotes: **Example:** `some code` ## Code blocks -Codeblocks can be uses without language specification: +Code blocks can be uses without language specification: ```` ``` @@ -41,7 +41,7 @@ echo "Hello World" ## Highlight shortcode -Hugo has a build-in shortcode for syntax highlighting. To work properly with this theme, you have to set following options in your sites config: +Hugo has a build-in shortcode for syntax highlighting. To work properly with this theme, you have to set following options in your site configuration: {{< tabs "uniqueid" >}} {{< tab "TOML" >}} diff --git a/exampleSite/content/usage/color_schemes.md b/exampleSite/content/usage/color_schemes.md index 7a06637..c8e4317 100644 --- a/exampleSite/content/usage/color_schemes.md +++ b/exampleSite/content/usage/color_schemes.md @@ -1,9 +1,9 @@ If you want to customize the color scheme of the theme to give it your individual touch you are just a few lines CSS away. In general, you have to override the defaults, the easiest way to do so is to create a `static/custom.css` file right in your site root. -All necessary class names are listed below. If you miss some classes for theming you are very welcome to fill an [Issue](https://github.com/xoxys/hugo-geekdoc/issues). 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: +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: {{< highlight CSS "linenos=table" >}} -/* defaut link color */ +/* default link color */ a { color: #1c388e; } a:visited { color: #73bfb8 } @@ -31,6 +31,6 @@ a:visited { color: #73bfb8 } .gdoc-hint.danger { background: #fae1db; border-color: #cf5f46; color: black; } {{< /highlight >}} -And that is how the result will looks like. Happy theming! +And that is how the result will looks like. Happy customizing! [![HC-primary Color Scheme](/media/color_scheme_example.png)](/media/color_scheme_example.png) diff --git a/exampleSite/static/includes/example.html.part b/exampleSite/static/includes/example.html.part new file mode 100644 index 0000000..9d26592 --- /dev/null +++ b/exampleSite/static/includes/example.html.part @@ -0,0 +1,6 @@ +

This is heading 1

+

This is heading 2

+

This is heading 3

+

This is heading 4

+
This is heading 5
+
This is heading 6
diff --git a/exampleSite/static/includes/table.md.part b/exampleSite/static/includes/table.md.part new file mode 100644 index 0000000..4bf79a3 --- /dev/null +++ b/exampleSite/static/includes/table.md.part @@ -0,0 +1,5 @@ +#### Test Table + +| Head 1 | Head 2 | Head 3 | +|---|---|---| +| 1 | 2 | 3 | \ No newline at end of file From a773b27574ea385b0783bc4b4618c0a6ac3dcb9b Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 31 May 2020 18:17:56 +0200 Subject: [PATCH 02/15] exclude words from spellcheck --- .dictionary | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .dictionary diff --git a/.dictionary b/.dictionary new file mode 100644 index 0000000..0145b1c --- /dev/null +++ b/.dictionary @@ -0,0 +1,29 @@ +([a-zA-Z0-9]+[_=])+\S+ +.gdoc.* + +Geekdoc +Kaussow +(S|s)hortcode[s]? +hugo-book +relref +href +(t|T)o(c|C) +toc-.* +macOS +SVG +[a-z0-9]+Diagram +HC-primary + +# used color codes +1c388e +324b99 +73bfb8 +cf5f46 +d1d7e8 +e4ba48 +e66a4e +eb8771 +fae1db +fecf50 +fef5dc +ffffff From 701bab896deca98f2bf97101ae4dcf8f0e692231 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 31 May 2020 18:18:37 +0200 Subject: [PATCH 03/15] add markdownlint config --- .markdownlint.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .markdownlint.yml diff --git a/.markdownlint.yml b/.markdownlint.yml new file mode 100644 index 0000000..9927db2 --- /dev/null +++ b/.markdownlint.yml @@ -0,0 +1,4 @@ +--- +default: True +MD013: False +MD041: False From a428f9d84d7aa4042d3764c70907050e0ed82617 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 31 May 2020 18:20:39 +0200 Subject: [PATCH 04/15] configure npm --- .drone.yml | 23 +++++++++++++++++++---- .npmrc | 1 + exampleSite/static/example.html | 13 ------------- exampleSite/static/table.md | 5 ----- layouts/_default/baseof.html | 4 ++-- layouts/posts/list.html | 9 ++------- layouts/shortcodes/expand.html | 17 ++++++++--------- src/sass/_base.scss | 2 +- src/sass/_markdown.scss | 2 +- src/sass/_shortcodes.scss | 4 ++++ 10 files changed, 38 insertions(+), 42 deletions(-) create mode 100644 .npmrc delete mode 100644 exampleSite/static/example.html delete mode 100644 exampleSite/static/table.md diff --git a/.drone.yml b/.drone.yml index a9d9cf6..64cfaeb 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,9 +10,11 @@ steps: - name: assets image: node commands: - - npm install -g gulp -s - - npm install -s + - npm install -g gulp + - npm install - gulp default + environment: + FORCE_COLOR: true - name: test image: klakegg/hugo:0.69.0-ext-alpine @@ -20,6 +22,19 @@ steps: - cd exampleSite/ - 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 image: alpine commands: @@ -71,7 +86,7 @@ steps: - 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 -- name: test +- name: build image: klakegg/hugo:0.69.0-ext-alpine commands: - cd exampleSite/ && hugo-official @@ -138,6 +153,6 @@ depends_on: --- kind: signature -hmac: c78faf65f2d038c8daa5b56c592a1fa6264b40633cd2375d61257a3027897c3c +hmac: 708f32a4284b33fb9606b8304637d426cdb38260a6123ca23b4a387ad2bf6654 ... diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..a64a8e6 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +loglevel = error diff --git a/exampleSite/static/example.html b/exampleSite/static/example.html deleted file mode 100644 index a59b90a..0000000 --- a/exampleSite/static/example.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - -

This is heading 1

-

This is heading 2

-

This is heading 3

-

This is heading 4

-
This is heading 5
-
This is heading 6
- - - diff --git a/exampleSite/static/table.md b/exampleSite/static/table.md deleted file mode 100644 index 4bf79a3..0000000 --- a/exampleSite/static/table.md +++ /dev/null @@ -1,5 +0,0 @@ -#### Test Table - -| Head 1 | Head 2 | Head 3 | -|---|---|---| -| 1 | 2 | 3 | \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index cecbbdb..5aa6934 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -25,7 +25,7 @@ {{ partial "site-footer" . }} - -{{ partial "foot" . }} + {{ partial "foot" . }} + diff --git a/layouts/posts/list.html b/layouts/posts/list.html index 8465862..f197591 100644 --- a/layouts/posts/list.html +++ b/layouts/posts/list.html @@ -1,7 +1,5 @@ {{ define "main" }} {{ $dateFormat := default "January 2, 2006" .Site.Params.GeekdocDateFormat }} - {{ $paginator := .Paginate (where .Pages "Params.hidden" "ne" true) }} - {{ range sort .Paginator.Pages }}
@@ -12,17 +10,14 @@
{{ .Date.Format $dateFormat }}
-
+
{{ .Summary }} {{ if .Truncated }} Read more {{ end }} -
+
{{ end }} - - - {{ template "_internal/pagination.html" . }} {{ end }} diff --git a/layouts/shortcodes/expand.html b/layouts/shortcodes/expand.html index f3b67c9..c2540bc 100644 --- a/layouts/shortcodes/expand.html +++ b/layouts/shortcodes/expand.html @@ -1,12 +1,11 @@ +{{ $id := substr (sha1 .Inner) 0 8 }}
-
diff --git a/src/sass/_base.scss b/src/sass/_base.scss index f2d327a..8144489 100644 --- a/src/sass/_base.scss +++ b/src/sass/_base.scss @@ -461,7 +461,7 @@ img { .markdown { transition: 0.2s ease-in-out; 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) { diff --git a/src/sass/_markdown.scss b/src/sass/_markdown.scss index 640bbd5..8b56468 100644 --- a/src/sass/_markdown.scss +++ b/src/sass/_markdown.scss @@ -6,7 +6,7 @@ } &--nested { - > :first-child { + :first-child { margin-top: 0; } > :last-child { diff --git a/src/sass/_shortcodes.scss b/src/sass/_shortcodes.scss index 1d7b821..908e003 100644 --- a/src/sass/_shortcodes.scss +++ b/src/sass/_shortcodes.scss @@ -22,6 +22,10 @@ &__control:checked + &__content { display: block; } + + .gdoc-page__anchor { + display: none; + } } // {{< tabs >}} From 0c50460bf0e520cc03b5cad82784faa2b8896199 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 31 May 2020 19:15:15 +0200 Subject: [PATCH 05/15] update nodejs dependencies --- package-lock.json | 204 ++++++++++++++++++++++++++++++++++++---------- package.json | 4 +- 2 files changed, 164 insertions(+), 44 deletions(-) diff --git a/package-lock.json b/package-lock.json index b751d64..c1d69bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -775,9 +775,9 @@ } }, "clean-css": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", - "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", + "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", "dev": true, "requires": { "source-map": "~0.6.0" @@ -1381,6 +1381,12 @@ "integrity": "sha512-Tc8JQEfGQ1MzfSzI/bTlSr7btJv/FFO7Yh6tanqVmIWOuNCu6/D1MilIEgLtmWqIrsv+o4IjpLAhgMBr/ncNAA==", "dev": true }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, "enabled": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/enabled/-/enabled-1.0.2.tgz", @@ -2684,13 +2690,13 @@ } }, "globule": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz", - "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.1.tgz", + "integrity": "sha512-OVyWOHgw29yosRHCHo7NncwR1hW5ew0W/UrvtwvjefVJeQ26q4/8r8FmPsSF1hJ93IgWkyv16pCTz6WblMzm/g==", "dev": true, "requires": { "glob": "~7.1.1", - "lodash": "~4.17.10", + "lodash": "~4.17.12", "minimatch": "~3.0.2" } }, @@ -2781,12 +2787,12 @@ } }, "gulp-clean-css": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/gulp-clean-css/-/gulp-clean-css-4.2.0.tgz", - "integrity": "sha512-r4zQsSOAK2UYUL/ipkAVCTRg/2CLZ2A+oPVORopBximRksJ6qy3EX1KGrIWT4ZrHxz3Hlobb1yyJtqiut7DNjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/gulp-clean-css/-/gulp-clean-css-4.3.0.tgz", + "integrity": "sha512-mGyeT3qqFXTy61j0zOIciS4MkYziF2U594t2Vs9rUnpkEHqfu6aDITMp8xOvZcvdX61Uz3y1mVERRYmjzQF5fg==", "dev": true, "requires": { - "clean-css": "4.2.1", + "clean-css": "4.2.3", "plugin-error": "1.0.1", "through2": "3.0.1", "vinyl-sourcemaps-apply": "0.2.1" @@ -2861,13 +2867,13 @@ "dev": true }, "gulp-sass": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/gulp-sass/-/gulp-sass-4.0.2.tgz", - "integrity": "sha512-q8psj4+aDrblJMMtRxihNBdovfzGrXJp1l4JU0Sz4b/Mhsi2DPrKFYCGDwjIWRENs04ELVHxdOJQ7Vs98OFohg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/gulp-sass/-/gulp-sass-4.1.0.tgz", + "integrity": "sha512-xIiwp9nkBLcJDpmYHbEHdoWZv+j+WtYaKD6Zil/67F3nrAaZtWYN5mDwerdo7EvcdBenSAj7Xb2hx2DqURLGdA==", "dev": true, "requires": { "chalk": "^2.3.0", - "lodash.clonedeep": "^4.3.2", + "lodash": "^4.17.11", "node-sass": "^4.8.3", "plugin-error": "^1.0.1", "replace-ext": "^1.0.0", @@ -3253,9 +3259,9 @@ } }, "in-publish": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", - "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.1.tgz", + "integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==", "dev": true }, "indent-string": { @@ -3416,13 +3422,10 @@ "dev": true }, "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", + "dev": true }, "is-fullwidth-code-point": { "version": "1.0.0", @@ -3589,9 +3592,9 @@ } }, "js-base64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz", - "integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.2.tgz", + "integrity": "sha512-Vg8czh0Q7sFBSUMWWArX/miJeBWYBPpdU/3M/DKSaekLMqrqVPaedp+5mZhie/r0lgrcaYBfwXatEew6gwgiQQ==", "dev": true }, "js-tokens": { @@ -3912,12 +3915,6 @@ "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=", "dev": true }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, "lodash.defaults": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", @@ -4601,9 +4598,9 @@ } }, "node-sass": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.13.0.tgz", - "integrity": "sha512-W1XBrvoJ1dy7VsvTAS5q1V45lREbTlZQqFbiHb3R3OTTCma0XBtuG6xZ6Z4506nR4lmHPTqVRwxT6KgtWC97CA==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz", + "integrity": "sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==", "dev": true, "requires": { "async-foreach": "^0.1.3", @@ -4620,7 +4617,7 @@ "node-gyp": "^3.8.0", "npmlog": "^4.0.0", "request": "^2.88.0", - "sass-graph": "^2.2.4", + "sass-graph": "2.2.5", "stdout-stream": "^1.4.0", "true-case-path": "^1.0.2" }, @@ -5746,15 +5743,138 @@ "dev": true }, "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz", + "integrity": "sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==", "dev": true, "requires": { "glob": "^7.0.0", "lodash": "^4.0.0", "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" + "yargs": "^13.3.2" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } } }, "sax": { diff --git a/package.json b/package.json index 6795956..4899b1a 100644 --- a/package.json +++ b/package.json @@ -16,13 +16,13 @@ "devDependencies": { "gulp": "^4.0.2", "gulp-autoprefixer": "^7.0.1", - "gulp-clean-css": "^4.2.0", + "gulp-clean-css": "^4.3.0", "gulp-concat": "^2.6.1", "gulp-csso": "^4.0.1", "gulp-iconfont": "^10.0.3", "gulp-real-favicon": "^0.3.2", "gulp-rename": "^2.0.0", - "gulp-sass": "^4.0.2", + "gulp-sass": "^4.1.0", "gulp-svg-sprite": "^1.5.0", "run-sequence": "^2.2.1" }, From 5e322b94e0c39d0b53d161129d2b27409935416d Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 31 May 2020 19:29:32 +0200 Subject: [PATCH 06/15] add dead link validation --- .drone.yml | 11 +++++++++-- .npmrc | 1 - exampleSite/content/_index.md | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) delete mode 100644 .npmrc diff --git a/.drone.yml b/.drone.yml index 64cfaeb..f377b7d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,13 +8,14 @@ platform: steps: - name: assets - image: node + image: node:lts commands: - npm install -g gulp - npm install - gulp default environment: FORCE_COLOR: true + NPM_CONFIG_LOGLEVEL: error - name: test image: klakegg/hugo:0.69.0-ext-alpine @@ -29,12 +30,18 @@ steps: - 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: html-validation image: validator/validator commands: - vnu --skip-non-html --also-check-css --errors-only exampleSite/public +- name: dead-links-validation + image: xoxys/link-validator + commands: + - link-validator -ro + - name: build image: alpine commands: @@ -153,6 +160,6 @@ depends_on: --- kind: signature -hmac: 708f32a4284b33fb9606b8304637d426cdb38260a6123ca23b4a387ad2bf6654 +hmac: a6c3c2933f950352b2379b402340ed9723d3a4d736e1e79fc3964aca078a4e08 ... diff --git a/.npmrc b/.npmrc deleted file mode 100644 index a64a8e6..0000000 --- a/.npmrc +++ /dev/null @@ -1 +0,0 @@ -loglevel = error diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index 0948285..d41f732 100644 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -5,7 +5,7 @@ title: Documentation [![Build Status](https://img.shields.io/drone/build/xoxys/hugo-geekdoc?logo=drone)](https://cloud.drone.io/xoxys/hugo-geekdoc) [![Hugo Version](https://img.shields.io/badge/hugo-0.65-blue.svg)](https://gohugo.io) [![GitHub release](https://img.shields.io/github/v/release/xoxys/hugo-geekdoc)](https://github.com/xoxys/hugo-geekdoc/releases/latest) -[![License: MIT](https://img.shields.io/github/license/xoxys/hugo-geekdoc)](LICENSE) +[![License: MIT](https://img.shields.io/github/license/xoxys/hugo-geekdoc)](https://github.com/xoxys/hugo-geekdoc/blob/master/LICENSE) Geekdoc is a simple Hugo theme for documentations. This work is inspired and partially based on the [hugo-book](https://github.com/alex-shpak/hugo-book) theme. From 1b6cc1d6bf1d9715952f8ef056bbe2bc5c05bddc Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 31 May 2020 22:07:55 +0200 Subject: [PATCH 07/15] set the right base dir --- .drone.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index f377b7d..f1cba01 100644 --- a/.drone.yml +++ b/.drone.yml @@ -41,6 +41,8 @@ steps: image: xoxys/link-validator commands: - link-validator -ro + environment: + LINK_VALIDATOR_BASE_DIR: /drone/src/exampleSite/public - name: build image: alpine @@ -160,6 +162,6 @@ depends_on: --- kind: signature -hmac: a6c3c2933f950352b2379b402340ed9723d3a4d736e1e79fc3964aca078a4e08 +hmac: ca1ffdbbe56ee6624fad160c24071dcd3da2de55d580c3614dd0e6a23cdb338a ... From e361563626a702f00fb419602b54ff273864faa7 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 1 Jun 2020 15:53:31 +0200 Subject: [PATCH 08/15] cleanup gulp --- gulpfile.js | 1 - package-lock.json | 11 ----------- package.json | 1 - src/favicon/faviconData.json | 2 +- static/fonts/GeekdocIcons.woff | Bin 3008 -> 3008 bytes static/fonts/GeekdocIcons.woff2 | Bin 2408 -> 2400 bytes 6 files changed, 1 insertion(+), 14 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index dab3fc5..124c2ef 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,7 +1,6 @@ const gulp = require('gulp'); const rename = require('gulp-rename'); const sass = require('gulp-sass'); -const minifyCSS = require('gulp-csso'); const cleanCSS = require('gulp-clean-css'); const autoprefixer = require('gulp-autoprefixer'); const iconfont = require('gulp-iconfont'); diff --git a/package-lock.json b/package-lock.json index c1d69bc..4061ef1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2820,17 +2820,6 @@ "vinyl": "^2.0.0" } }, - "gulp-csso": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/gulp-csso/-/gulp-csso-4.0.1.tgz", - "integrity": "sha512-Kg8gqmd6XcUlMTdBbqdCEcpHumc8ytc4khgm9AXeCjl8eHx7b6tC11y8haizFI+Zw/cSHL6HCj7GwGLwxxBUFQ==", - "dev": true, - "requires": { - "csso": "^4.0.0", - "plugin-error": "^1.0.0", - "vinyl-sourcemaps-apply": "^0.2.1" - } - }, "gulp-iconfont": { "version": "10.0.3", "resolved": "https://registry.npmjs.org/gulp-iconfont/-/gulp-iconfont-10.0.3.tgz", diff --git a/package.json b/package.json index 4899b1a..03a2cea 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,6 @@ "gulp-autoprefixer": "^7.0.1", "gulp-clean-css": "^4.3.0", "gulp-concat": "^2.6.1", - "gulp-csso": "^4.0.1", "gulp-iconfont": "^10.0.3", "gulp-real-favicon": "^0.3.2", "gulp-rename": "^2.0.0", diff --git a/src/favicon/faviconData.json b/src/favicon/faviconData.json index 73cb647..8e0c9e4 100644 --- a/src/favicon/faviconData.json +++ b/src/favicon/faviconData.json @@ -1 +1 @@ -{"result":{"status":"success"},"favicon":{"package_url":"https://realfavicongenerator.net/files/6df47a40ae616743cd933f790d5fd877fe56536b/favicon_package_v0.16.zip","files_urls":["https://realfavicongenerator.net/files/6df47a40ae616743cd933f790d5fd877fe56536b/package_files/android-chrome-192x192.png","https://realfavicongenerator.net/files/6df47a40ae616743cd933f790d5fd877fe56536b/package_files/android-chrome-512x512.png","https://realfavicongenerator.net/files/6df47a40ae616743cd933f790d5fd877fe56536b/package_files/apple-touch-icon.png","https://realfavicongenerator.net/files/6df47a40ae616743cd933f790d5fd877fe56536b/package_files/browserconfig.xml","https://realfavicongenerator.net/files/6df47a40ae616743cd933f790d5fd877fe56536b/package_files/favicon-16x16.png","https://realfavicongenerator.net/files/6df47a40ae616743cd933f790d5fd877fe56536b/package_files/favicon-32x32.png","https://realfavicongenerator.net/files/6df47a40ae616743cd933f790d5fd877fe56536b/package_files/favicon.ico","https://realfavicongenerator.net/files/6df47a40ae616743cd933f790d5fd877fe56536b/package_files/mstile-144x144.png","https://realfavicongenerator.net/files/6df47a40ae616743cd933f790d5fd877fe56536b/package_files/mstile-150x150.png","https://realfavicongenerator.net/files/6df47a40ae616743cd933f790d5fd877fe56536b/package_files/mstile-310x150.png","https://realfavicongenerator.net/files/6df47a40ae616743cd933f790d5fd877fe56536b/package_files/mstile-310x310.png","https://realfavicongenerator.net/files/6df47a40ae616743cd933f790d5fd877fe56536b/package_files/mstile-70x70.png","https://realfavicongenerator.net/files/6df47a40ae616743cd933f790d5fd877fe56536b/package_files/safari-pinned-tab.svg","https://realfavicongenerator.net/files/6df47a40ae616743cd933f790d5fd877fe56536b/package_files/site.webmanifest"],"html_code":"\n\n\n\n\n\n\n","compression":"false","overlapping_markups":["link[rel=\"apple-touch-icon\"]","link[rel=\"shortcut\"]","link[rel=\"shortcut icon\"]","link[rel=\"icon\",sizes=\"16x16\"]","link[rel=\"icon\",sizes=\"32x32\"]","meta[name=\"msapplication-TileColor\"]","meta[name=\"msapplication-TileImage\"]","link[rel=\"manifest\"]","meta[name=\"theme-color\"]","link[rel=\"mask-icon\"]"]},"files_location":{"type":"path","path":"/"},"preview_picture_url":"https://realfavicongenerator.net/files/6df47a40ae616743cd933f790d5fd877fe56536b/favicon_preview.png","version":"0.16"} \ No newline at end of file +{"result":{"status":"success"},"favicon":{"package_url":"https://realfavicongenerator.net/files/80e254dbfa2672ac1e4b404bddc9607fdb8612e8/favicon_package_v0.16.zip","files_urls":["https://realfavicongenerator.net/files/80e254dbfa2672ac1e4b404bddc9607fdb8612e8/package_files/android-chrome-192x192.png","https://realfavicongenerator.net/files/80e254dbfa2672ac1e4b404bddc9607fdb8612e8/package_files/android-chrome-512x512.png","https://realfavicongenerator.net/files/80e254dbfa2672ac1e4b404bddc9607fdb8612e8/package_files/apple-touch-icon.png","https://realfavicongenerator.net/files/80e254dbfa2672ac1e4b404bddc9607fdb8612e8/package_files/browserconfig.xml","https://realfavicongenerator.net/files/80e254dbfa2672ac1e4b404bddc9607fdb8612e8/package_files/favicon-16x16.png","https://realfavicongenerator.net/files/80e254dbfa2672ac1e4b404bddc9607fdb8612e8/package_files/favicon-32x32.png","https://realfavicongenerator.net/files/80e254dbfa2672ac1e4b404bddc9607fdb8612e8/package_files/favicon.ico","https://realfavicongenerator.net/files/80e254dbfa2672ac1e4b404bddc9607fdb8612e8/package_files/mstile-144x144.png","https://realfavicongenerator.net/files/80e254dbfa2672ac1e4b404bddc9607fdb8612e8/package_files/mstile-150x150.png","https://realfavicongenerator.net/files/80e254dbfa2672ac1e4b404bddc9607fdb8612e8/package_files/mstile-310x150.png","https://realfavicongenerator.net/files/80e254dbfa2672ac1e4b404bddc9607fdb8612e8/package_files/mstile-310x310.png","https://realfavicongenerator.net/files/80e254dbfa2672ac1e4b404bddc9607fdb8612e8/package_files/mstile-70x70.png","https://realfavicongenerator.net/files/80e254dbfa2672ac1e4b404bddc9607fdb8612e8/package_files/safari-pinned-tab.svg","https://realfavicongenerator.net/files/80e254dbfa2672ac1e4b404bddc9607fdb8612e8/package_files/site.webmanifest"],"html_code":"\n\n\n\n\n\n\n","compression":"false","overlapping_markups":["link[rel=\"apple-touch-icon\"]","link[rel=\"shortcut\"]","link[rel=\"shortcut icon\"]","link[rel=\"icon\",sizes=\"16x16\"]","link[rel=\"icon\",sizes=\"32x32\"]","meta[name=\"msapplication-TileColor\"]","meta[name=\"msapplication-TileImage\"]","link[rel=\"manifest\"]","meta[name=\"theme-color\"]","link[rel=\"mask-icon\"]"]},"files_location":{"type":"path","path":"/"},"preview_picture_url":"https://realfavicongenerator.net/files/80e254dbfa2672ac1e4b404bddc9607fdb8612e8/favicon_preview.png","version":"0.16"} \ No newline at end of file diff --git a/static/fonts/GeekdocIcons.woff b/static/fonts/GeekdocIcons.woff index aefce9681e14a06c9307902f8e5326565713c9c4..59b421820221b67cea8dd59c194478df677faf30 100644 GIT binary patch delta 58 zcmV-A0LA~n7r+;gjRXCyQ?Zb+2qt3xXUALP`E9;3a5KLIiZI;zwZ##cW`4!|8c1<4 QFoAdgb9oGrvt|ie0#=Dh|M#}B-3}&t?v^O@TX37DxQTP zw^_0S*;A=aJF%h{mrBIG%s+10|Ik^2)Ivp5YNC`jKd?DP+o`ecC3jBl9I0hP*tk5>Y&@N6~lReTe_fF@N}H3DHO+ljuZq50ylv z^b7=yEj?HTSmhcD*>Vc6m6mWuNnjX zpaTp_01yE{3;<;Sr~p6}0BQhG2Y?0uGy$Lm0P_G~J^(BLfQ10C2mlrXz!GG-vlbliBXVG0Sm?1E~`~8DJ2ruayJY5~Derw?dsB^jI3mMTYxO z9I|q>puZwukk^a0xS^H}A5!=_eUR-Qj#!`RZr&0PuiEMp-HAuzcSj9|c>qJ-p|?jK zF1(t5Ih5#3RJiQ~u{Fg(z&-SlBAVHfI5wskgRItPwZ?m0PCManrTBFf&S1NPaD*J| zblMrmlhi43NDHKP!G*I=5+=u0l-QcfU{jc#sb@0}Le}TQ1^PzCxi+@T2?B$5mmBTD zD>#AiVi?3ZA3J8PhM*Ma83D%uW*cLD)->LKS#lr)P!8rg+!7kdptdIq;&a>?00aR{ z-fq+4jK?a0mvV*#_M%wmTIkRomh?Vs=-EoZDfwod&?P^+=N0V%otZqwTg-^E?iJ zhSS_GcBgGSvjev}oxwW0od`oNPdjifL>u-j$Cn5(xLk^r8ZBKC&O(h1;bFm4!<4Dp zj3cHvLb#B^OdU21K^xK1FdqkuAMJt=r_CHu1KG1Q2H9a8=LW$Xh-fH<`MJ^5lkZ*+ zsZ@H$kSPNrQTbd}&C1n#Y!l6P_4fSs_C9xh7;*0*)j|E2Qt;k?d*PH|%`d;AUp>^X)Gr>> z8i8LrC@O_dai{k57~awnQDN~#@nKPcIU@8tys;0K+Cj#GlJ00_Kk7jJN|i~nZ6jK% z>`Z^u?@a~%THp88v{uA_qt@rhK7bl}bg%XpY!e-Dtyj&RH$r*wR4sS!ethpPxvRC> zw3r|HlIOo1<`<_VTHZJXW_e5xtu=8atMQ$)zuePD>noZJmDO(>KGVNl9hf6mLF@bW z$m&0PUfuvEKIjO~4}Z9Ell;r5BgeGOn>GdH2YmV&>6(+|VJ3`x4yw=4Ga@shFA8+FVcjiFD{ zWabh87B>LH%T!M%s%MvUJMx^l?s(ajEv3Xxq2w)*-FJA|vjdYtQFXIzLcV0a)xn>$ z=9ap^TA*I)>%LQepZZlgo_oh|*Gr?I{ifZ=Cc!Ser!O3&-sZuHVFV}XwQ|IqHZ ze2Z}!F?Lm#{gyeU@2bv<9O+}9Y!&_47`PqJNw;m-bs2s>=Go@pc&wOZ`CVH(Ti)Zl zhCc|7@cid+Ut^h{wZ6Ybx)CF&WA#c$|L1vRbdow=(ksq?AnEqY*1LDy&PQQt4y2(= zfDussp0mOqtlH%yYRvvZa>z=MmXr=bd*1%KO*Lq8C+2@_h1^K^#9Y3y*9 zVs}?vwdV5q5#z*_X@-PM@k0^hQgT2^EHDeBG|tc{XGL6uUg!`{%p;s7B2co2K$u5L iQpxQb#HLMxkTMqw;wSnJZA=q~XKDV>UPisAOaK5e`+%kZ delta 2372 zcmV-K3A^^-66g{bcTYw#00961000SS01E&B000p*000RXkr+RJ!q~Aqyj9ilYARSF z-3~%OzI&|uiGz?2kDK;>LMI7QgNiabb7n@xDQgngoI+)DrfiL=Y=d&D z(-WQg&+q5%dFqq4B~eJ;z5hmS8Y(UE=h|lu09Dk@DPqV^-okA*Zzr206o%TWDht52 zst%|D0u*Qe|NFUrI+L`sL=;c!QS{w+AL4&=%pd+)LNwCIBs$UDLnTouJp%z_OAl57 z7P{H-Rc8SKfx)%msJy$}w?_9)) z%5G@5FK;ZK%0bZPUVr(L+=FMEtrebuLqLB2lc!-|;ouPvk&scuiI)JR6)7r5`Bzl} z+=Bx!$N+#G04M-}5&)I_a6p-4%|i@cD3A*?hc?2dP3A4`C33v zU9v<6M7y3MqGBnnq?}#X7ekEFb(4%)&Jq?1Cw>eV!qm5@pqy7-o6RpJRvW778ptWb z9YTkex`l}TiV*p5nBNd27Adt+6Rn66sj?|;b&p`th8%LymDeHI;b6}8jE0mDMB#?8 zIemYB|BF2uJNP<|tN5X21~T3XC4M6yJ!*6b9&&!hJGJNtDtzC@2# z?F~7}=kti(C#g^3mG+Z*1V1Z1NyHrgfW+4Pc9*8s*X3l7y+n#e*@$pu*r`&s>yAW3 ze*4gBPomQu5yK2aSa(!vu~y@W0yZ(ivS3_)EmG8)COlaMC5Q?$9B!TfC9(8mL43-6 z0*FK~X1h(xilL=)!cZ(xP{vJDAg2|Gh3niA)VFj5mhP;BLEYP&uCN$U2qrVpgqh4` zA%;7t=h2KTT5)T{x$)GtY{Oq4=<#We8n?x9XlYxL%DrW&>o`!e@j%Dgx|%IwCw{Yk zt4r-X4#o=ZZPHfPW^oI<)aOgIdOYeB-sJ@^>rS$yJj>Z7lI(uJW|7$<3`&)V*@o1x zV4QvIxNXL%$9j|8NrjnKW*EY6L`%bb7NQ^RCxjKu9MMdqlLAAeCYE(KU^?Liq9FP{ zncVYVer+_W^zueihUSdr8(BWM{9g`#9d*gtY;B)9^;MmM*ve8=%UN5{}&^#c2DV{>8 zP^Z)xp3-%$)iO~Ord||;govxiO_~hvm==(JB#!z{PFTZ7UPM!QM zS-?CWvU1nGHGi;Upuw7JpFgP^*TvN6w57+%87xTmO808p<`?yK7Ici`1wdJ@W z-3UDL4@r!FLq{)zqp+_~)ArSW>I^FW=$;`_`nHMn`vwdNl%i)@4A%h_j6BYk-stRN z>c&r;pKCW*9RueNeyjhKg!2Wq?2)75WLlwbtSr8|M%yZXv_Wh;606}IePgN}(@EYd zw#2+SbGp!Wv9gtQC1Z%q!OLt?F8(T1HB6}Zyr^X6%a+k27C47 z>x?GJrnUSET}ArS<=#|(_-pmlAI6vP0lwrpaw_=zD(l--cH6`X|7zomnawmHo~rof z%`b1=)NU&oSu;1#{CyzseN$j==MHu69mC{M&6B00+6`L5Zk_i1j;VreSfPFR$Pew` z*ghN?m?Kvq*rx7K=6&<3Dj#j`mZ$1dpR8S{`aa{pAxqJ^b#eNCxUav_y5=N#lFQBf zEMaTMZF=dgT1!N)uT}4_DOoZH3Gm_(OPIcsS$#r{W)jy?U{ z!^!26+FrM_ghw@f9Zyuhix~P;b~USiLne=mUz58qWK^XG)Gq z?XoGNmpfBy{5eN|U2DB4bvNPlsNmPU)UP_G#n2xYRPnoFO8u{*_cN~Gn!);yKi{Hms=(e|*fd z&B5_lG0P~a{=>(Mf7zNv}AA zP}ja}y?YZiJ_=LJfiSv+@Dj=&>!R=zgxci*1s$`$5ISTXsZ6u!oQV4B2b=;mzZlI3gv@%hl#}gna8Ga{Q#aoKFCppQ($jN zrjzZ&Pt1XT4qa5VvPZAt`&Xcu0YM{sG~BkUjIpSt(WiZ=3`mJI(6|ZQlsU!(P31jn zrKpUfPx=8`>_Gs*G3f9Jg%DF>>}+g7f(a83nSX3k z995mFH%g2Ghk%5FhJl5HM?geEMj>$|o+OY&q6Sl?HSVlO822*%wy#~=G3!j4#0aA2 zGwsE46c8(R)m0}7+))ylhy$OwGTwHLvlWSRfN2veUFF64pte#K8rO0;^TeoP17@7~ q;1CESqlynJxp{2b&~ZVESi|fvX@@q3kYfPpLwhAyPnm=O0000=Rh+5- From 178b92b0a05f26746497e296185e79c711a044d6 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 1 Jun 2020 15:59:02 +0200 Subject: [PATCH 09/15] add lighthouse-ci to drone --- .drone.yml | 12 +++++++++--- .gitignore | 4 ++++ .lighthouserc.yml | 17 +++++++++++++++++ .tarignore | 13 +++++++++++++ layouts/partials/content.html | 4 ++-- layouts/partials/foot.html | 6 ++++-- layouts/partials/head.html | 4 ++-- layouts/posts/list.html | 6 ++---- layouts/posts/single.html | 12 +++++++----- layouts/shortcodes/mermaid.html | 4 ++-- src/sass/_base.scss | 9 +++++++-- 11 files changed, 69 insertions(+), 22 deletions(-) create mode 100644 .lighthouserc.yml create mode 100644 .tarignore diff --git a/.drone.yml b/.drone.yml index f1cba01..237b144 100644 --- a/.drone.yml +++ b/.drone.yml @@ -21,7 +21,7 @@ steps: image: klakegg/hugo:0.69.0-ext-alpine commands: - cd exampleSite/ - - mkdir themes/ && ln -s ../../. themes/hugo-geekdoc && hugo-official + - mkdir themes/ && ln -s ../../. themes/hugo-geekdoc && hugo-official -b http://localhost/ - name: spellcheck image: node:lts-alpine @@ -44,12 +44,18 @@ steps: environment: LINK_VALIDATOR_BASE_DIR: /drone/src/exampleSite/public +- name: page-validator + image: patrickhulce/lhci-client + user: root + commands: + - lhci autorun + - name: build image: alpine commands: - mkdir dist/ - echo "${DRONE_TAG:-latest}" > VERSION - - tar -zcvf dist/hugo-geekdoc.tar.gz . --exclude='.git*' --exclude='.drone*' --exclude='dist' --exclude='.git*' --exclude='example*' --exclude='src' --exclude='gulp*' --exclude='package*' --exclude='node*' --exclude='local*' + - tar -zcvf dist/hugo-geekdoc.tar.gz -X .tarignore . - name: checksum image: alpine @@ -162,6 +168,6 @@ depends_on: --- kind: signature -hmac: ca1ffdbbe56ee6624fad160c24071dcd3da2de55d580c3614dd0e6a23cdb338a +hmac: 6c9fc660b81ed9086e1bcb0f8176ba6b084834bc7ecafbaa0573943760698330 ... diff --git a/.gitignore b/.gitignore index 2af3041..bbfc527 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # local environments .swp .env* +dist/ node_modules/ exampleSite/themes/ exampleSite/public/ @@ -10,3 +11,6 @@ layouts/partials/icons-svg-symbols.html static/main.* static/favicon/ resources/_gen/ + +# testing +.lighthouseci/ diff --git a/.lighthouserc.yml b/.lighthouserc.yml new file mode 100644 index 0000000..10525f6 --- /dev/null +++ b/.lighthouserc.yml @@ -0,0 +1,17 @@ +--- +ci: + collect: + numberOfRuns: 2 + staticDistDir: exampleSite/public + url: + - http://localhost/ + - http://localhost/404.html + - http://localhost/posts/ + settings: + chromeFlags: "--no-sandbox" + assert: + preset: "lighthouse:no-pwa" + assertions: + uses-long-cache-ttl: off + render-blocking-resources: off + tap-targets: off diff --git a/.tarignore b/.tarignore new file mode 100644 index 0000000..16cdb49 --- /dev/null +++ b/.tarignore @@ -0,0 +1,13 @@ +.tarignore +.dictionary* +.git* +.drone* +.lighthouse* +.markdownlint* +example* +gulp* +package* +node* +local* +dist +src diff --git a/layouts/partials/content.html b/layouts/partials/content.html index f9d10d7..f7904b6 100644 --- a/layouts/partials/content.html +++ b/layouts/partials/content.html @@ -3,9 +3,9 @@ {{ $.Scratch.Set "content" (.Content | replaceRE `` `` | safeHTML) }} {{ if and $showAnchor $anchorLeft }} - {{ $.Scratch.Set "content" ($.Scratch.Get "content" | replaceRE "(]*>)(.*?)()" (printf `
%s%s%s
` `${1}` (absURL (printf "%s#%s" .Permalink `${2}`)) `${2}` `${3}` `${4}`) | safeHTML) }} + {{ $.Scratch.Set "content" ($.Scratch.Get "content" | replaceRE "(]*>)(.*?)()" (printf `
%s%s%s
` `${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 "(]*>)(.*?)()" (printf `
%s%s%s
` `${1}` `${3}` (absURL (printf "%s#%s" .Permalink `${2}`)) `${2}` `${4}`) | safeHTML) }} + {{ $.Scratch.Set "content" ($.Scratch.Get "content" | replaceRE "(]*>)(.*?)()" (printf `
%s%s%s
` `${1}` `${3}` (absURL (printf "%s#%s" .Permalink `${2}`)) `${3}` `${2}` `${4}`) | safeHTML) }} {{ end }} {{ $.Scratch.Get "content" }} diff --git a/layouts/partials/foot.html b/layouts/partials/foot.html index cc5506b..5805bbb 100644 --- a/layouts/partials/foot.html +++ b/layouts/partials/foot.html @@ -7,8 +7,10 @@ {{ end }} {{ if default true .Site.Params.GeekdocAnchorCopy }} - + {{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 2d10cde..ac35c60 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -5,9 +5,9 @@ {{ partial "title" . }} | {{ .Site.Title -}} - + - + {{ with .OutputFormats.Get "rss" -}} diff --git a/layouts/posts/list.html b/layouts/posts/list.html index f197591..33ff7ab 100644 --- a/layouts/posts/list.html +++ b/layouts/posts/list.html @@ -6,15 +6,13 @@

{{ .Title }}

+ -
- {{ .Date.Format $dateFormat }} -
{{ .Summary }} {{ if .Truncated }} - Read more + Read full post {{ end }}
diff --git a/layouts/posts/single.html b/layouts/posts/single.html index e4e390e..2ecc822 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -1,10 +1,12 @@ {{ define "main" }} {{ $dateFormat := default "January 2, 2006" .Site.Params.GeekdocDateFormat }} -
-

{{ .Title }}

-
- {{ .Date.Format $dateFormat }} -
+
+
+

{{ .Title }}

+ +
+
{{ partial "content" . }} +
{{ end }} diff --git a/layouts/shortcodes/mermaid.html b/layouts/shortcodes/mermaid.html index d144c6a..de129ec 100644 --- a/layouts/shortcodes/mermaid.html +++ b/layouts/shortcodes/mermaid.html @@ -1,7 +1,7 @@ {{ if not (.Page.Scratch.Get "mermaid") }} - - + - {{ .Page.Scratch.Set "mermaid" true }} {{ end }} From b83905508202c144c949c83cf1d1a77725fc6165 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 1 Jun 2020 22:05:15 +0200 Subject: [PATCH 11/15] update hugo to v0.72 --- .drone.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 2c84e3d..6c3c2f0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -18,10 +18,11 @@ steps: NPM_CONFIG_LOGLEVEL: error - name: test - image: klakegg/hugo:0.69.0-ext-alpine + image: klakegg/hugo:0.72.0-ext-alpine commands: - cd exampleSite/ - - mkdir themes/ && ln -s ../../. themes/hugo-geekdoc && hugo-official -b http://localhost/ + - mkdir themes/ && ln -s /drone/src/. themes/hugo-geekdoc + - hugo-official -b http://localhost/ - name: spellcheck image: node:lts-alpine @@ -102,7 +103,7 @@ steps: - 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: build - image: klakegg/hugo:0.69.0-ext-alpine + image: klakegg/hugo:0.72.0-ext-alpine commands: - cd exampleSite/ && hugo-official @@ -168,6 +169,6 @@ depends_on: --- kind: signature -hmac: 6d920a9019c2478a391c98d207313ff77782c987f3869e9410d8174146fd07ef +hmac: e490a6b965b1b70d9807afd59d38aab1fc425dbb95e71e335bfd3bdf2ad54ef8 ... From 5f74e78ee03179113bd25ccb4bcb50936b30787d Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 1 Jun 2020 22:10:40 +0200 Subject: [PATCH 12/15] restructure drone config --- .drone.yml | 109 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 43 deletions(-) diff --git a/.drone.yml b/.drone.yml index 6c3c2f0..6c368a3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,3 +1,61 @@ +--- +kind: pipeline +name: test + +platform: + os: linux + 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: + - npm install -g gulp + - npm install + - gulp default + environment: + FORCE_COLOR: true + NPM_CONFIG_LOGLEVEL: error + +- name: testbuild + image: klakegg/hugo:0.72.0-ext-alpine + commands: + - mkdir exampleSite/themes/ && ln -s $(pwd)/ exampleSite/themes/hugo-geekdoc + - hugo-official -s exampleSite/ -b http://localhost/ + +- name: html-validation + image: validator/validator + commands: + - vnu --skip-non-html --also-check-css --errors-only exampleSite/public + +- name: link-validation + image: xoxys/link-validator + commands: + - link-validator -ro + environment: + LINK_VALIDATOR_BASE_DIR: exampleSite/public + +- name: page-validator + image: patrickhulce/lhci-client + user: root + commands: + - lhci autorun + +trigger: + ref: + - refs/heads/master + - refs/tags/** + - refs/pull/** + --- kind: pipeline name: build @@ -17,41 +75,7 @@ steps: FORCE_COLOR: true NPM_CONFIG_LOGLEVEL: error -- name: test - image: klakegg/hugo:0.72.0-ext-alpine - commands: - - cd exampleSite/ - - mkdir themes/ && ln -s /drone/src/. themes/hugo-geekdoc - - hugo-official -b http://localhost/ - -- 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: html-validation - image: validator/validator - commands: - - vnu --skip-non-html --also-check-css --errors-only exampleSite/public - -- name: link-validation - image: xoxys/link-validator - commands: - - link-validator -ro - environment: - LINK_VALIDATOR_BASE_DIR: /drone/src/exampleSite/public - -- name: page-validator - image: patrickhulce/lhci-client - user: root - commands: - - lhci autorun - -- name: build +- name: package image: alpine commands: - mkdir dist/ @@ -63,7 +87,7 @@ steps: commands: - cd dist/ && sha256sum * > ../sha256sum.txt -- name: publish +- name: release image: plugins/github-release settings: api_key: @@ -74,15 +98,13 @@ steps: note: CHANGELOG.md overwrite: true title: ${DRONE_TAG} - when: - ref: - - refs/tags/** trigger: ref: - - refs/heads/master - refs/tags/** - - refs/pull/** + +depends_on: +- test --- kind: pipeline @@ -105,7 +127,7 @@ steps: - name: build image: klakegg/hugo:0.72.0-ext-alpine commands: - - cd exampleSite/ && hugo-official + - hugo-official -s exampleSite/ - name: publish image: plugins/s3-sync @@ -164,11 +186,12 @@ trigger: - failure depends_on: +- test - build - docs --- kind: signature -hmac: e490a6b965b1b70d9807afd59d38aab1fc425dbb95e71e335bfd3bdf2ad54ef8 +hmac: 1145f38b73b28a6a9e659bd19008fcdf24c808e22db91fc2768740bbf9e138e9 ... From 6d4ec21b4328aafcfedaaad752d0302fa411e90a Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 1 Jun 2020 23:19:03 +0200 Subject: [PATCH 13/15] add changelog --- .lighthouserc.yml | 2 ++ CHANGELOG.md | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.lighthouserc.yml b/.lighthouserc.yml index 10525f6..ed7a475 100644 --- a/.lighthouserc.yml +++ b/.lighthouserc.yml @@ -15,3 +15,5 @@ ci: uses-long-cache-ttl: off render-blocking-resources: off tap-targets: off + first-contentful-paint: off + first-meaningful-paint: off diff --git a/CHANGELOG.md b/CHANGELOG.md index dd5879d..0aef670 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,9 @@ -* ENHANCEMENT - * [#6](https://github.com/xoxys/hugo-geekdoc/pull/6) improve code block formatting +* BUGFIX + * optimize resource loading + * resfactor expand shortcode to use valid html + * fix formatting of nested shortcodes markdown +* INTERNAL + * add spellchecking to CI (spellcheck-cli) + * add html/css validation to CI (nu.validator) + * add page validation to CI (lighthouse-ci) + * add broken link check to CI (broken-link-checker) From 03ee06ffacaf4d4c00f9a1ca86c3822513edd75a Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 2 Jun 2020 00:01:49 +0200 Subject: [PATCH 14/15] add markdownlint to ci --- .drone.yml | 34 +++++++++++++++------- CHANGELOG.md | 1 + exampleSite/content/usage/code_blocks.md | 19 ++++++++---- exampleSite/content/usage/color_schemes.md | 2 ++ 4 files changed, 41 insertions(+), 15 deletions(-) diff --git a/.drone.yml b/.drone.yml index 6c368a3..d84f4f0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 ... diff --git a/CHANGELOG.md b/CHANGELOG.md index 0aef670..011830c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/exampleSite/content/usage/code_blocks.md b/exampleSite/content/usage/code_blocks.md index eb5bc3d..aefb344 100644 --- a/exampleSite/content/usage/code_blocks.md +++ b/exampleSite/content/usage/code_blocks.md @@ -1,17 +1,20 @@ There are multiple ways to add code blocks. Most of them works out of the box only the Hugo shortcode `` 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 {{}} # some code echo "Hello World" @@ -69,7 +76,9 @@ echo "Hello World" **Example:** + {{< highlight Shell "linenos=table" >}} # some code echo "Hello World" {{< /highlight >}} + diff --git a/exampleSite/content/usage/color_schemes.md b/exampleSite/content/usage/color_schemes.md index c8e4317..ab53349 100644 --- a/exampleSite/content/usage/color_schemes.md +++ b/exampleSite/content/usage/color_schemes.md @@ -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: + {{< 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 >}} + And that is how the result will looks like. Happy customizing! From 616569ffb4ce3126340961b60f022745a5d81b28 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 2 Jun 2020 00:10:51 +0200 Subject: [PATCH 15/15] cleanup --- .drone.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index d84f4f0..afdfa9f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -35,7 +35,7 @@ steps: environment: LINK_VALIDATOR_BASE_DIR: exampleSite/public -- name: page-validator +- name: page-validation image: patrickhulce/lhci-client user: root commands: @@ -131,7 +131,7 @@ steps: image: byrnedo/alpine-curl commands: - 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 -sSL https://github.com/xoxys/hugo-geekdoc/releases/latest/download/hugo-geekdoc.tar.gz | tar -xz -C exampleSite/themes/hugo-geekdoc/ --strip-components=1 - name: build image: klakegg/hugo:0.72.0-ext-alpine @@ -206,6 +206,6 @@ depends_on: --- kind: signature -hmac: 49898e6b496014772113f110dae80acca1f525f1ae0545669eba5ba468f7a4da +hmac: c9158b4a7c4fb787644c711560925ffae038a982953f958d5f535158f640032f ...