From 4f6e6186e0138cef706c0ddcc831364d415e4637 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 6 Dec 2020 22:26:32 +0530 Subject: [PATCH] papermod: add search docs --- .../posts/papermod/papermod-features/index.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/content/posts/papermod/papermod-features/index.md b/content/posts/papermod/papermod-features/index.md index c00701ef..6adc0d43 100644 --- a/content/posts/papermod/papermod-features/index.md +++ b/content/posts/papermod/papermod-features/index.md @@ -139,6 +139,38 @@ params: --- +### Search + +Add the following to site config, `config.yml` + +```yml +outputs: + home: + - HTML + - RSS + - JSON # is necessary +``` + +Create a page with `search.md` in `content` directory with following content + +```yml +--- +title: "Search" # in any language you want +layout: "search" # is necessary +# url: "/archive" +summary: "search" +--- + +``` + +For Multilingual use `search..md` ex. `search.es.md`. + +**Note:** Search will work only on current language, user is currently on ! + +ex: [search.md](https://raw.githubusercontent.com/adityatelange/hugo-PaperMod/exampleSite/content/search.md) + +--- + ### Draft Page indication adds `[draft]` mark to indicate draft pages.