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

github.com/hossainemruz/toha.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmruz Hossain <hossainemruz@gmail.com>2021-03-27 22:52:18 +0300
committerGitHub <noreply@github.com>2021-03-27 22:52:18 +0300
commit25e4e9e3d08fd7b398222fc9a1e171032598ac97 (patch)
tree978eba3b26237391c1dbe0f12e40e09580fa546d /content
parent5c95132b1eca566b335da083d0277f1521691f7b (diff)
Add notes layout (#263)
* Add note layout Signed-off-by: hossainemruz <hossainemruz@gmail.com> * Fix note organization Signed-off-by: hossainemruz <hossainemruz@gmail.com> * WIP: need help adding above 6 sections doesnt fit navbar * Add note layout Signed-off-by: hossainemruz <hossainemruz@gmail.com> * Add Translation Signed-off-by: hossainemruz <hossainemruz@gmail.com> Co-authored-by: HenzelMoras <henzelmoras@gmail.com>
Diffstat (limited to 'content')
-rw-r--r--content/notes/search.md52
-rw-r--r--content/posts/search.md2
2 files changed, 54 insertions, 0 deletions
diff --git a/content/notes/search.md b/content/notes/search.md
new file mode 100644
index 0000000..0f038c1
--- /dev/null
+++ b/content/notes/search.md
@@ -0,0 +1,52 @@
+---
+title: "Search Results"
+sitemap:
+ priority : 0.1
+layout: "search"
+url: search
+---
+
+
+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 fileds
+
+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"
+]
+\```
diff --git a/content/posts/search.md b/content/posts/search.md
index 0f038c1..4586d1f 100644
--- a/content/posts/search.md
+++ b/content/posts/search.md
@@ -1,5 +1,7 @@
---
title: "Search Results"
+date: 2010-06-08T08:06:25+06:00
+weight: 999999
sitemap:
priority : 0.1
layout: "search"