Skip to content

Commit 2c2ca02

Browse files
committed
Add search to docs
1 parent f9baa84 commit 2c2ca02

File tree

4 files changed

+60
-7
lines changed

4 files changed

+60
-7
lines changed

docs/docusaurus.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,8 @@ module.exports = {
100100
},
101101
],
102102
],
103+
plugins: [
104+
// require('path').resolve(__dirname, '../../docusaurus-search-local/src'),
105+
'@cmfcmf/docusaurus-search-local'
106+
]
103107
};

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"deploy": "docusaurus deploy"
1010
},
1111
"dependencies": {
12+
"@cmfcmf/docusaurus-search-local": "^0.0.1",
1213
"@docusaurus/core": "^2.0.0-alpha.40",
1314
"@docusaurus/preset-classic": "^2.0.0-alpha.40",
1415
"classnames": "^2.2.6",

docs/src/pages/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const features = [
1111
title: <>Supports most free APIs</>,
1212
description: (
1313
<>
14-
This project comes with support for five of the most popular free APIs:
14+
<p>This project comes with support for five of the most popular free APIs:</p>
1515
<ul>
1616
<li>Current Weather Data</li>
1717
<li>16-day/daily Forecast Data</li>
@@ -25,20 +25,20 @@ const features = [
2525
{
2626
title: <>Easy to Use</>,
2727
description: (
28-
<>
28+
<p>
2929
The OpenWeatherMap APIs are poorly documented and oftentimes not easy to use. This project provides the necessary abstractions to make working with the API feel like a breeze.
30-
</>
30+
</p>
3131
),
3232
},
3333
{
3434
title: <>Powered by modern PHP</>,
3535
description: (
36-
<>
36+
<p>
3737
Since version 3.x, this project works with PHP 7.x.
3838
It uses <a href="https://www.php-fig.org/psr/psr-17/">PSR-17</a> and <a href="https://www.php-fig.org/psr/psr-18/">PSR-18</a> for
3939
HTTP requests, as well
4040
as <a href="https://www.php-fig.org/psr/psr-6/">PSR-6</a> for caching.
41-
</>
41+
</p>
4242
),
4343
},
4444
];
@@ -53,7 +53,7 @@ function Feature({imageUrl, title, description}) {
5353
</div>
5454
)}
5555
<h3>{title}</h3>
56-
<p>{description}</p>
56+
{description}
5757
</div>
5858
);
5959
}

docs/yarn.lock

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,16 @@
837837
lodash "^4.17.13"
838838
to-fast-properties "^2.0.0"
839839

840+
"@cmfcmf/docusaurus-search-local@^0.0.1":
841+
version "0.0.1"
842+
resolved "https://registry.yarnpkg.com/@cmfcmf/docusaurus-search-local/-/docusaurus-search-local-0.0.1.tgz#b741d2f06eba8b1b5901346dc474ff540a99d2b0"
843+
integrity sha512-HoReJD8A4WVxk8Gji3SDc6q3EQQpfUduroqr+o/kufEgIeeCQEQMczlKqz8cwN5tefOIm62X/FaM/GmQ/h+t2A==
844+
dependencies:
845+
autocomplete.js "^0.37.0"
846+
classnames "^2.2.6"
847+
htmlparser2 "^4.0.0"
848+
lunr "^2.3.8"
849+
840850
"@csstools/convert-colors@^1.4.0":
841851
version "1.4.0"
842852
resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7"
@@ -1676,6 +1686,13 @@ autocomplete.js@0.36.0:
16761686
dependencies:
16771687
immediate "^3.2.3"
16781688

1689+
autocomplete.js@^0.37.0:
1690+
version "0.37.0"
1691+
resolved "https://registry.yarnpkg.com/autocomplete.js/-/autocomplete.js-0.37.0.tgz#bcfbfd7bcabe90e90fad4c2b1aaa931379a10c38"
1692+
integrity sha512-MxYfNb89sl7IRhNdEJv6z8dSfA7lVeU7Dk6m/+/ih0/tPLsbxIM7uPVsnWEUh4j7dFqJktlM7hCeU7jmx6VC8A==
1693+
dependencies:
1694+
immediate "^3.2.3"
1695+
16791696
autoprefixer@^9.6.1:
16801697
version "9.7.3"
16811698
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.3.tgz#fd42ed03f53de9beb4ca0d61fb4f7268a9bb50b4"
@@ -3090,7 +3107,7 @@ dom-converter@^0.2:
30903107
dependencies:
30913108
utila "~0.4"
30923109

3093-
dom-serializer@0:
3110+
dom-serializer@0, dom-serializer@^0.2.1:
30943111
version "0.2.2"
30953112
resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51"
30963113
integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==
@@ -3133,6 +3150,13 @@ domhandler@^2.3.0:
31333150
dependencies:
31343151
domelementtype "1"
31353152

3153+
domhandler@^3.0.0:
3154+
version "3.0.0"
3155+
resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-3.0.0.tgz#51cd13efca31da95bbb0c5bee3a48300e333b3e9"
3156+
integrity sha512-eKLdI5v9m67kbXQbJSNn1zjh0SDzvzWVWtX+qEI3eMjZw8daH9k8rlj1FZY9memPwjiskQFbe7vHVVJIAqoEhw==
3157+
dependencies:
3158+
domelementtype "^2.0.1"
3159+
31363160
domutils@1.5.1:
31373161
version "1.5.1"
31383162
resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf"
@@ -3149,6 +3173,15 @@ domutils@^1.5.1, domutils@^1.7.0:
31493173
dom-serializer "0"
31503174
domelementtype "1"
31513175

3176+
domutils@^2.0.0:
3177+
version "2.0.0"
3178+
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.0.0.tgz#15b8278e37bfa8468d157478c58c367718133c08"
3179+
integrity sha512-n5SelJ1axbO636c2yUtOGia/IcJtVtlhQbFiVDBZHKV5ReJO1ViX7sFEemtuyoAnBxk5meNSYgA8V4s0271efg==
3180+
dependencies:
3181+
dom-serializer "^0.2.1"
3182+
domelementtype "^2.0.1"
3183+
domhandler "^3.0.0"
3184+
31523185
dot-prop@^4.1.1:
31533186
version "4.2.0"
31543187
resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57"
@@ -4300,6 +4333,16 @@ htmlparser2@^3.3.0, htmlparser2@^3.9.1:
43004333
inherits "^2.0.1"
43014334
readable-stream "^3.1.1"
43024335

4336+
htmlparser2@^4.0.0:
4337+
version "4.0.0"
4338+
resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-4.0.0.tgz#6034658db65b7713a572a9ebf79f650832dceec8"
4339+
integrity sha512-cChwXn5Vam57fyXajDtPXL1wTYc8JtLbr2TN76FYu05itVVVealxLowe2B3IEznJG4p9HAYn/0tJaRlGuEglFQ==
4340+
dependencies:
4341+
domelementtype "^2.0.1"
4342+
domhandler "^3.0.0"
4343+
domutils "^2.0.0"
4344+
entities "^2.0.0"
4345+
43034346
http-deceiver@^1.2.7:
43044347
version "1.2.7"
43054348
resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87"
@@ -5282,6 +5325,11 @@ lru-cache@^5.1.1:
52825325
dependencies:
52835326
yallist "^3.0.2"
52845327

5328+
lunr@^2.3.8:
5329+
version "2.3.8"
5330+
resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.8.tgz#a8b89c31f30b5a044b97d2d28e2da191b6ba2072"
5331+
integrity sha512-oxMeX/Y35PNFuZoHp+jUj5OSEmLCaIH4KTFJh7a93cHBoFmpw2IoPs22VIz7vyO2YUnx2Tn9dzIwO2P/4quIRg==
5332+
52855333
make-dir@^2.0.0:
52865334
version "2.1.0"
52875335
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"

0 commit comments

Comments
 (0)