Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/thegeeklab/hugo-geekblog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Kaussow <mail@geeklabor.de>2021-12-30 00:50:13 +0300
committerGitHub <noreply@github.com>2021-12-30 00:50:13 +0300
commitd5f6cfb13e7ea971670675eee0a9e493b185558f (patch)
treeb169496a9cd92a3c15a19adcab7060a116ec2bf9 /exampleSite
parentea4fab356a7e986e64730e7a0b0f00c87b2fe4d8 (diff)
refator: replace gulp by webpack and npm scripts (#129)
BREAKING CHANGE: We have replaced `gulp` with `webpack` and `npm scripts` to build this theme. If you build it on your own or use build commands during the deployment, you may have to adjust your setup. BREAKING CHANGE: The `GeekblogIcons` font is using the icon name as Unicode now. As a consequence, you have to replace all references to Icons from this font if you have customized the theme.
Diffstat (limited to 'exampleSite')
-rw-r--r--exampleSite/content/posts/advanced/includes.md6
-rw-r--r--exampleSite/content/posts/usage/configuration.md6
-rw-r--r--exampleSite/content/posts/usage/getting-started.md13
-rw-r--r--exampleSite/layouts/shortcodes/sprites.html6
4 files changed, 14 insertions, 17 deletions
diff --git a/exampleSite/content/posts/advanced/includes.md b/exampleSite/content/posts/advanced/includes.md
index d2c05fd..f5642f0 100644
--- a/exampleSite/content/posts/advanced/includes.md
+++ b/exampleSite/content/posts/advanced/includes.md
@@ -8,10 +8,12 @@ tags:
- Shortcodes
---
-{{< toc >}}
-
Include shortcode can include files of different types. By specifying a language, the included file will have syntax highlighting.
+<!--more-->
+
+{{< toc >}}
+
```tpl
{{</* include file="relative/path/from/hugo/root" language="go" markdown=[false|true] */>}}
```
diff --git a/exampleSite/content/posts/usage/configuration.md b/exampleSite/content/posts/usage/configuration.md
index c2b3216..48e1d0c 100644
--- a/exampleSite/content/posts/usage/configuration.md
+++ b/exampleSite/content/posts/usage/configuration.md
@@ -99,9 +99,6 @@ enableRobotsTXT = true
# (Optional, default true) Add an anchor link to headlines.
geekblogAnchor = true
- # (Optional, default true) Copy anchor url to clipboard on click.
- geekblogAnchorCopy = true
-
# (Optional, default none) Sites main author.
geekblogAuthor = "john-doe"
@@ -231,9 +228,6 @@ params:
# (Optional, default true) Add an anchor link to headlines.
geekblogAnchor: true
- # (Optional, default true) Copy anchor url to clipboard on click.
- geekblogAnchorCopy: true
-
# (Optional, default none) Sites main author.
geekblogAuthor: john-doe
diff --git a/exampleSite/content/posts/usage/getting-started.md b/exampleSite/content/posts/usage/getting-started.md
index a2733df..ab1a751 100644
--- a/exampleSite/content/posts/usage/getting-started.md
+++ b/exampleSite/content/posts/usage/getting-started.md
@@ -36,16 +36,16 @@ Geekblog is a simple Hugo theme for personal blogs. It is intentionally designed
## Setup requirements
-You need a recent version of Hugo for local builds and previews of sites that use Geekblog. As we are using [gulp](https://gulpjs.com/) as pre-processor the normal version of Hugo is sufficient. If you prefer the extended version of Hugo anyway this will work as well. For comprehensive Hugo documentation, see [gohugo.io](https://gohugo.io/documentation/).
+You need a recent version of Hugo for local builds and previews of sites that use Geekblog. As we are using [webpack](https://webpack.js.org/) as pre-processor, the normal version of Hugo is sufficient. If you prefer the extended version of Hugo anyway this will work as well. For comprehensive Hugo documentation, see [gohugo.io](https://gohugo.io/documentation/).
-If you want to use the theme from a cloned branch instead of a release tarball you'll need to install `gulp` locally and run the default pipeline once to create all required assets.
+If you want to use the theme from a cloned branch instead of a release tarball you'll need to install `webpack` locally and run the default pipeline once to create all required assets.
```Shell
# install required packages from package.json
npm install
-# run gulp pipeline to build required assets
-npx gulp default
+# run the build script to build required assets
+npm run build
```
## Using the theme
@@ -151,10 +151,11 @@ Clone the Geekblog git repository.
git clone https://github.com/thegeeklab/hugo-geekblog.git themes/hugo-geekblog
```
-Build required theme assets e.g. CSS files and SVG sprites with `gulp`.
+Build required theme assets e.g. CSS files and SVG sprites.
```Shell
-npx gulp default
+npm install
+npm run build
```
## Deployments
diff --git a/exampleSite/layouts/shortcodes/sprites.html b/exampleSite/layouts/shortcodes/sprites.html
index 7851da3..832477e 100644
--- a/exampleSite/layouts/shortcodes/sprites.html
+++ b/exampleSite/layouts/shortcodes/sprites.html
@@ -1,11 +1,11 @@
<div class="flex flex-wrap justify-center">
- {{ range .Site.Data.sprites.geekblog }}
+ {{ range $key, $value := .Site.Data.sprites.geekblog }}
<div class="flex flex-grid icon-grid">
<div class="flex align-center justify-center icon-grid__line">
- <svg class="icon gblog_{{ . }}"><use xlink:href="#gblog_{{ . }}"></use></svg>
+ <svg class="icon {{ $key }}"><use xlink:href="#{{ $key }}"></use></svg>
</div>
<div class="flex align-center justify-center icon-grid__line icon-grid__line--text">
- <span>#gblog_{{ (replace . "_" "_<wbr>") | safeHTML }}</span>
+ <span>#{{ (replace $key "_" "_<wbr>") | safeHTML }}</span>
</div>
</div>
{{ end }}