a stream
All posts and notes on this site, sorted by when published.
Books
[Originally Posted: 0001.01.01]
[Last Updated: 2024.05.12]
Standalone post link: Books
[]
Favorite Albums of 2023
[Originally Posted: 0001.01.01]
[Last Updated: 2023.02.27]
Standalone post link: Favorite Albums of 2023
[]
Search Results
[Originally Posted: 0001.01.01]
[Last Updated: 2021.11.07]
This file exists solely to respond to /search URL with the related search layout template. No content shown here is rendered, all content is based in the template layouts/page/search.html Setting a very low sitemap priority will tell search engines this is not important content. This implementation uses Fusejs, jquery and mark.js Initial setup Search depends on additional output content type of JSON in config.toml ``` [outputs] home = [“HTML”, “JSON”] ```
This file exists solely to respond to /search URL with the related search
layout template.
No content shown here is rendered, all content is based in the template layouts/page/search.html
Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js
Initial setup
Search depends on additional output content type of JSON in config.toml ``` [outputs] home = [“HTML”, “JSON”] ```
Searching additional fields
To search additional fields defined in front matter, you must add it in 2 places.
Edit layouts/_default/index.JSON
This exposes the values in /index.json
i.e. add category
```
…
“contents”:{{ .Content | plainify | jsonify }}
{{ if .Params.tags }},
“tags”:{{ .Params.tags | jsonify }}{{end}},
“categories” : {{ .Params.categories | jsonify }},
…
```
Edit fuse.js options to Search
static/js/search.js
```
keys: [
“title”,
“contents”,
“tags”,
“categories”
]
```