From 15d5ef2ddc4abe477e1d426689cb263f61efa298 Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Thu, 8 Mar 2018 12:25:48 -0500 Subject: [PATCH] Add Search to doc site --- doc/config.toml | 3 +++ doc/layouts/_default/search.html | 27 +++++++++++++++++++++++++++ doc/ox-hugo-manual.org | 10 ++++++++++ doc/themes/hugo-onyx-theme | 2 +- 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 doc/layouts/_default/search.html diff --git a/doc/config.toml b/doc/config.toml index 6459527..5b41a7a 100644 --- a/doc/config.toml +++ b/doc/config.toml @@ -52,6 +52,9 @@ disableFastRender = true # Hugo 0.30 doc = "/doc/:filename/" test = "/test/:slug/" +[Outputs] # https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae + home = ["HTML", "JSON"] + [Params] name = "ox-hugo" description = "Org mode to Hugo exporter
Write your Hugo posts in native Org mode." diff --git a/doc/layouts/_default/search.html b/doc/layouts/_default/search.html new file mode 100644 index 0000000..3985154 --- /dev/null +++ b/doc/layouts/_default/search.html @@ -0,0 +1,27 @@ +{{ define "main" }} + +

{{ .Title }}

+ +
+
+ +
+
+

Matching pages

+
+
+ + +{{ end }} + +{{ define "footer" }} + + + + +{{ end }} diff --git a/doc/ox-hugo-manual.org b/doc/ox-hugo-manual.org index 26c3ba3..058d0c0 100644 --- a/doc/ox-hugo-manual.org +++ b/doc/ox-hugo-manual.org @@ -1908,6 +1908,16 @@ front-matter keys"/ in {{{ox-hugo-test-file}}}. :PROPERTIES: :EXPORT_HUGO_MENU: :menu "7.meta" :END: +*** Search +:PROPERTIES: +:EXPORT_HUGO_SECTION: / +:EXPORT_FILE_NAME: search +:EXPORT_HUGO_LAYOUT: search +:EXPORT_HUGO_MENU: :menu "0.search" :title "Click to Search" +:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :sitemap '((priority . 0.1)) +:END: +Results from static site search implemented using /Fusejs/, /jquery/ +and /mark.js/. -- [[https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae][Source]] *** Meta Features :PROPERTIES: :EXPORT_FILE_NAME: meta-features diff --git a/doc/themes/hugo-onyx-theme b/doc/themes/hugo-onyx-theme index 4f099ea..96d80a1 160000 --- a/doc/themes/hugo-onyx-theme +++ b/doc/themes/hugo-onyx-theme @@ -1 +1 @@ -Subproject commit 4f099ea33a4873a9e5aa0871a17e1ff80c719484 +Subproject commit 96d80a102c056336358c99f9659f549c3e22db95