refactor: replace gulp by webpack and npm scripts (#258)

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.

BREAKING CHANGE: We have refactored the search integration to split Hugo templates from JavaScript code. To get it working again, you need to adjust the `outputFormats` and `outputs` in your Hugo configuration file, as [documented](https://geekdocs.de/usage/configuration/#site-configuration).
This commit is contained in:
Robert Kaussow 2022-01-06 13:58:10 +01:00 committed by GitHub
parent 2ac2a9faab
commit 5c5e2d59cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
122 changed files with 18705 additions and 5208 deletions

View file

@ -32,6 +32,19 @@ enableRobotsTXT = true
startLevel = 1
endLevel = 9
[outputFormats.Search]
name = "Search"
mediaType = "application/json"
baseName = "searchconfig"
isPlainText = false
rel = "alternate"
isHTML = false
noUgly = true
permalinkable = false
[outputs]
home = [ "HTML", "SEARCH" ]
[taxonomies]
tag = "tags"
@ -70,7 +83,8 @@ enableRobotsTXT = true
# You can also specify this parameter per page in front matter.
geekdocEditPath = "edit/main/exampleSite/content"
# (Optional, default true) Enables search function with flexsearch.
# (Optional, default true) Enables search function with flexsearch. To use the search you
# have to ensure `outputFormats` and `outputs` are properly configured as well (see below).
# Index is built on the fly and might slow down your website.
geekdocSearch = false
@ -148,6 +162,23 @@ markup:
taxonomies:
tag: tags
outputFormats:
Search:
name: "Search"
mediaType: "application/json"
# generated file: <baseName>.<mediaType."application/feed+json".suffixes[0]> = feed.json
baseName: "searchconfig"
isPlainText: false
rel: "alternate"
isHTML: false
noUgly: true
permalinkable: false
outputs:
home:
- HTML
- SEARCH
params:
# (Optional, default 6) Set how many table of contents levels to be showed on page.
# Use false to hide ToC, note that 0 will default to 6 (https://gohugo.io/functions/default/)
@ -183,8 +214,9 @@ params:
# You can also specify this parameter per page in front matter.
geekdocEditPath: edit/main/exampleSite/content
# (Optional, default true) Enables search function with flexsearch.
# Index is built on the fly and might slowdown your website.
# (Optional, default true) Enables search function with flexsearch. To use the search you
# have to ensure `outputFormats` and `outputs` are properly configured as well (see below).
# Index is built on the fly and might slow down your website.
geekdocSearch: false
# (Optional, default false) Display search results with the parent folder as prefix. This

View file

@ -69,6 +69,19 @@ To prepare your new site environment just a few steps are required:
[taxonomies]
tag = "tags"
[outputFormats.Search]
name = "Search"
mediaType = "application/json"
baseName = "searchconfig"
isPlainText = false
rel = "alternate"
isHTML = false
noUgly = true
permalinkable = false
[outputs]
home = [ "HTML", "SEARCH" ]
```
5. Test your site.