File tree Expand file tree Collapse file tree 6 files changed +28
-4
lines changed
Expand file tree Collapse file tree 6 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ Then, add the theme to your site config:
1818echo theme = \" bookstack\" >> config.toml
1919```
2020
21+ ## Configuration
22+ - favicon: file in static/favicon.png
23+ - list avatar: images file in assets/ and doc must have config ` image `
24+ - example at ` gh-pages ` branch
25+
2126## Features
2227
2328* ** Search** supported by [ Fuse.js] ( https://github.com/krisk/Fuse )
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " {{ .Site.Title }}" ,
3+ "short_name" : " {{ .Site.Title }}" ,
4+ "start_url" : " {{ " /" | relURL }}",
5+ "scope" : " {{ " /" | relURL }}",
6+ "display" : " standalone" ,
7+ "background_color" : " #000000" ,
8+ "theme_color" : " #000000" ,
9+ "icons" : [
10+ {
11+ "src" : " {{ " /favicon.svg" | relURL }}",
12+ "sizes" : " 512x512"
13+ }
14+ ]
15+ }
Original file line number Diff line number Diff line change 11{{- $.Scratch.Add "index" slice - }}
22{{- range site.RegularPages - }}
33 {{- if and (not .Params.searchHidden) (ne .Layout `archives`) (ne .Layout `search`) }}
4- {{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary "date" (.Date.Format "2006/01/02") "image" ((print .Permalink .Params.image) | absURL)) - }}
4+ {{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary "date" (.Date.Format "2006/01/02") "image" ((print .Site.BaseURL .Params.image) | absURL)) - }}
55 {{- end }}
66{{- end - }}
77{{- $.Scratch.Get "index" | jsonify - }}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ <h2 class="tags__title">{{ .Title }}</h2>
2424 {{- $pages := union .RegularPages .Sections }}
2525 {{ range $pages }}
2626 < div class ="resultItem ">
27- < div class ="resultItem__media " style ="background-image: url({{ (print .Permalink .Params.image) | absURL }}); "> </ div >
27+ < div class ="resultItem__media " style ="background-image: url({{ (print .Site.BaseURL .Params.image) | absURL }}); "> </ div >
2828 < div class ="resultItem__body ">
2929 < h3 class ="resultItem__title "> < a href ="{{ .Permalink }} "> {{ .Title }}</ a > </ h3 >
3030 < div class ="resultItem__footer "> {{ .Date.Format "2006/01/02" }}</ div >
Original file line number Diff line number Diff line change 55
66< title > {{ if not .IsHome }}{{ if .Title }}{{ .Title }} - {{ end }}{{ end }}{{ .Site.Title }}</ title >
77
8+ {{- $manifest := resources.Get "json/manifest.json" | resources.ExecuteAsTemplate "manifest.json" . }}
9+ < link rel ="manifest " href ="{{ $manifest.RelPermalink }} ">
10+ < link rel ="icon " href ="{{ "favicon.png " | relURL }}" type="image/x-icon ">
11+
812{{ $sass := resources.Get "scss/style.scss" }}
913{{ $style := $sass | resources.ToCSS | minify | resources.Fingerprint "sha256" }}
1014< link rel ="stylesheet " href ="{{ $style.RelPermalink }} ">
Original file line number Diff line number Diff line change 11name = " bookstack"
22license = " MIT"
33licenselink = " https://github.com/xnzone/hugo-theme-bookstack/blob/main/LICENSE"
4- description = " Card-based blog theme for Hugo"
4+ description = " Card-based bookstack theme for Hugo"
55
66# The home page of the theme, where the source can be found.
77homepage = " https://github.com/xnzone/hugo-theme-bookstack"
@@ -12,7 +12,7 @@ demosite = "https://xnzone.github.io/hugo-theme-bookstack/"
1212tags = [" blog" ]
1313features = [" awesome" , " card" ]
1414
15- min_version = " 0.101.0 "
15+ min_version = " 0.83.1 "
1616
1717# If the theme has a single author
1818[author ]
You can’t perform that action at this time.
0 commit comments