From 39ca4052288ba137787182c1bb487f4a2c06d416 Mon Sep 17 00:00:00 2001 From: s-pace Date: Wed, 24 Apr 2019 13:31:00 +0200 Subject: [PATCH] Add search using docsearch closes #1039 --- _data/docsearch.yml | 3 +++ _includes/footer/_docsearch.html | 6 ++++++ _includes/footer/footer-de.html | 2 ++ _includes/footer/footer-en.html | 2 ++ _includes/footer/footer-es.html | 2 ++ _includes/footer/footer-fr.html | 2 ++ _includes/footer/footer-it.html | 2 ++ _includes/footer/footer-ja.html | 2 ++ _includes/footer/footer-ko.html | 2 ++ _includes/footer/footer-pt-br.html | 2 ++ _includes/footer/footer-ru.html | 2 ++ _includes/footer/footer-sk.html | 2 ++ _includes/footer/footer-th.html | 2 ++ _includes/footer/footer-tr.html | 2 ++ _includes/footer/footer-uk.html | 2 ++ _includes/footer/footer-uz.html | 2 ++ _includes/footer/footer-zh-cn.html | 2 ++ _includes/footer/footer-zh-tw.html | 2 ++ _includes/head.html | 3 +++ _includes/header/header-de.html | 1 + _includes/header/header-en.html | 1 + _includes/header/header-es.html | 1 + _includes/header/header-fr.html | 1 + _includes/header/header-it.html | 1 + _includes/header/header-ja.html | 1 + _includes/header/header-ko.html | 1 + _includes/header/header-pt-br.html | 1 + _includes/header/header-ru.html | 1 + _includes/header/header-sk.html | 1 + _includes/header/header-th.html | 1 + _includes/header/header-tr.html | 1 + _includes/header/header-uz.html | 3 ++- _includes/header/header-zh-cn.html | 1 + _includes/header/header-zh-tw.html | 1 + css/search.css | 16 ++++++++++++++++ 35 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 _data/docsearch.yml create mode 100644 _includes/footer/_docsearch.html create mode 100644 css/search.css diff --git a/_data/docsearch.yml b/_data/docsearch.yml new file mode 100644 index 00000000..e60470dc --- /dev/null +++ b/_data/docsearch.yml @@ -0,0 +1,3 @@ +# config: https://github.com/algolia/docsearch-configs/blob/master/configs/expressjs.json +apiKey: 7164e33055faa6ecddefd9e08fc59f5d +indexName: expressjs diff --git a/_includes/footer/_docsearch.html b/_includes/footer/_docsearch.html new file mode 100644 index 00000000..d6fa0c65 --- /dev/null +++ b/_includes/footer/_docsearch.html @@ -0,0 +1,6 @@ + diff --git a/_includes/footer/footer-de.html b/_includes/footer/footer-de.html index 2d872fad..9e9b4294 100755 --- a/_includes/footer/footer-de.html +++ b/_includes/footer/footer-de.html @@ -33,3 +33,5 @@ Creative Commons Lizenzvertrag Dieses Werk ist lizenziert unter einer Creative Commons Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 Vereinigte Staaten von Amerika Lizenz. + +{% include footer/_docsearch.html %} diff --git a/_includes/footer/footer-en.html b/_includes/footer/footer-en.html index 741546c1..fef3384f 100755 --- a/_includes/footer/footer-en.html +++ b/_includes/footer/footer-en.html @@ -42,3 +42,5 @@ + +{% include footer/_docsearch.html %} diff --git a/_includes/footer/footer-es.html b/_includes/footer/footer-es.html index 697a954a..b0fb0080 100755 --- a/_includes/footer/footer-es.html +++ b/_includes/footer/footer-es.html @@ -35,3 +35,5 @@ Licencia Creative Commons Esta obra está bajo una Licencia Creative Commons Atribución-CompartirIgual 3.0 Estados Unidos de América. + +{% include footer/_docsearch.html %} diff --git a/_includes/footer/footer-fr.html b/_includes/footer/footer-fr.html index 4a7f993c..d1a3f2b5 100755 --- a/_includes/footer/footer-fr.html +++ b/_includes/footer/footer-fr.html @@ -34,3 +34,5 @@ Licence Creative Commons Ce(tte) œuvre est mise à disposition selon les termes de la Licence Creative Commons Attribution - Partage dans les Mêmes Conditions 3.0 États-Unis. + +{% include footer/_docsearch.html %} diff --git a/_includes/footer/footer-it.html b/_includes/footer/footer-it.html index 36e07dfd..e6b8fe71 100755 --- a/_includes/footer/footer-it.html +++ b/_includes/footer/footer-it.html @@ -34,3 +34,5 @@ Licenza Creative Commons Quest'opera è distribuita con Licenza Creative Commons Attribuzione - Condividi allo stesso modo 3.0 Stati Uniti. + +{% include footer/_docsearch.html %} diff --git a/_includes/footer/footer-ja.html b/_includes/footer/footer-ja.html index 670c4bdb..c29245c1 100755 --- a/_includes/footer/footer-ja.html +++ b/_includes/footer/footer-ja.html @@ -33,3 +33,5 @@ クリエイティブ・コモンズ・ライセンス この 作品 は クリエイティブ・コモンズ 表示 - 継承 3.0 アメリカ合衆国 ライセンスの下に提供されています。 + +{% include footer/_docsearch.html %} diff --git a/_includes/footer/footer-ko.html b/_includes/footer/footer-ko.html index 51bb792f..be6e0ede 100755 --- a/_includes/footer/footer-ko.html +++ b/_includes/footer/footer-ko.html @@ -34,3 +34,5 @@ 크리에이티브 커먼즈 라이선스 이 저작물은 크리에이티브 커먼즈 저작자표시-동일조건변경허락 3.0 미국 라이선스에 따라 이용할 수 있습니다. + +{% include footer/_docsearch.html %} diff --git a/_includes/footer/footer-pt-br.html b/_includes/footer/footer-pt-br.html index ab3542d4..5bf234a8 100755 --- a/_includes/footer/footer-pt-br.html +++ b/_includes/footer/footer-pt-br.html @@ -36,3 +36,5 @@ contribuidores do expressjs.com. + +{% include footer/_docsearch.html %} diff --git a/_includes/footer/footer-ru.html b/_includes/footer/footer-ru.html index c4f11ec5..16f2cd5f 100755 --- a/_includes/footer/footer-ru.html +++ b/_includes/footer/footer-ru.html @@ -34,3 +34,5 @@ Лицензия Creative Commons Это произведение доступно по лицензии Creative Commons «Attribution-ShareAlike» («Атрибуция — На тех же условиях») 3.0 США. + +{% include footer/_docsearch.html %} diff --git a/_includes/footer/footer-sk.html b/_includes/footer/footer-sk.html index 068c8897..a52f454d 100644 --- a/_includes/footer/footer-sk.html +++ b/_includes/footer/footer-sk.html @@ -35,3 +35,5 @@ Creative Commons License This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License. + +{% include footer/_docsearch.html %} diff --git a/_includes/footer/footer-th.html b/_includes/footer/footer-th.html index fcae8e57..4c6ca6d6 100755 --- a/_includes/footer/footer-th.html +++ b/_includes/footer/footer-th.html @@ -36,3 +36,5 @@ + +{% include footer/_docsearch.html %} diff --git a/_includes/footer/footer-tr.html b/_includes/footer/footer-tr.html index 240431a6..c6fe3202 100644 --- a/_includes/footer/footer-tr.html +++ b/_includes/footer/footer-tr.html @@ -41,3 +41,5 @@ + +{% include footer/_docsearch.html %} diff --git a/_includes/footer/footer-uk.html b/_includes/footer/footer-uk.html index 006e3202..1aeb1e41 100755 --- a/_includes/footer/footer-uk.html +++ b/_includes/footer/footer-uk.html @@ -33,3 +33,5 @@ Ліцензія Creative Commons Цей твір ліцензовано за ліцензією Creative Commons Із Зазначенням Авторства - Поширення На Тих Самих Умовах 3.0 Сполучені Штати. + +{% include footer/_docsearch.html %} diff --git a/_includes/footer/footer-uz.html b/_includes/footer/footer-uz.html index 3e5a5994..c02a1b61 100755 --- a/_includes/footer/footer-uz.html +++ b/_includes/footer/footer-uz.html @@ -33,3 +33,5 @@ Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License. + +{% include footer/_docsearch.html %} diff --git a/_includes/footer/footer-zh-cn.html b/_includes/footer/footer-zh-cn.html index b9fd8713..2b2bec44 100755 --- a/_includes/footer/footer-zh-cn.html +++ b/_includes/footer/footer-zh-cn.html @@ -33,3 +33,5 @@ 知识共享许可协议 本作品采用知识共享署名-相同方式共享 3.0 美国许可协议进行许可。 + +{% include footer/_docsearch.html %} diff --git a/_includes/footer/footer-zh-tw.html b/_includes/footer/footer-zh-tw.html index 781d9edd..fe4ec2c4 100755 --- a/_includes/footer/footer-zh-tw.html +++ b/_includes/footer/footer-zh-tw.html @@ -34,3 +34,5 @@ 創用 CC 授權條款 本著作係採用創用 CC 姓名標示-相同方式分享 3.0 美國 授權條款授權. + +{% include footer/_docsearch.html %} diff --git a/_includes/head.html b/_includes/head.html index 931ed9ae..cdf3f643 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -19,4 +19,7 @@ + + + diff --git a/_includes/header/header-de.html b/_includes/header/header-de.html index 2959982e..20a172ea 100644 --- a/_includes/header/header-de.html +++ b/_includes/header/header-de.html @@ -5,6 +5,7 @@