mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-27 04:03:48 +01:00
feat(exampleSite): add search page and widget
This commit is contained in:
parent
6fa69d7a2b
commit
08102e2f69
2 changed files with 15 additions and 1 deletions
|
@ -31,7 +31,7 @@ DefaultContentLanguage = "en" # Theme i18n support
|
||||||
# Only Disqus is available so far
|
# Only Disqus is available so far
|
||||||
provider = "disqus"
|
provider = "disqus"
|
||||||
[params.widgets]
|
[params.widgets]
|
||||||
enabled = ['archives', 'tag-cloud']
|
enabled = ['search', 'archives', 'tag-cloud']
|
||||||
[params.widgets.archives]
|
[params.widgets.archives]
|
||||||
limit = 5
|
limit = 5
|
||||||
### Archives page relative URL
|
### Archives page relative URL
|
||||||
|
@ -75,6 +75,12 @@ DefaultContentLanguage = "en" # Theme i18n support
|
||||||
url = "archives"
|
url = "archives"
|
||||||
weight = -70
|
weight = -70
|
||||||
pre = "archives"
|
pre = "archives"
|
||||||
|
[[menu.main]]
|
||||||
|
identifier = "search"
|
||||||
|
name = "Search"
|
||||||
|
url = "search"
|
||||||
|
weight = -60
|
||||||
|
pre = "search"
|
||||||
|
|
||||||
[related]
|
[related]
|
||||||
includeNewer = true
|
includeNewer = true
|
||||||
|
|
8
exampleSite/content/page/search.md
Normal file
8
exampleSite/content/page/search.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
title: "Search"
|
||||||
|
slug: "search"
|
||||||
|
layout: "search"
|
||||||
|
outputs:
|
||||||
|
- html
|
||||||
|
- json
|
||||||
|
---
|
Loading…
Reference in a new issue