Skip to content

Commit 364e64d

Browse files
authored
feat: move search from pagefind to algolia (#117)
1 parent 4a927e3 commit 364e64d

File tree

5 files changed

+378
-1
lines changed

5 files changed

+378
-1
lines changed

.prettierrc.mjs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/** @type {import("prettier").Config} */
2+
const config = {
3+
plugins: [
4+
"prettier-plugin-astro",
5+
"prettier-plugin-tailwindcss", // MUST come last
6+
],
7+
overrides: [
8+
{
9+
files: "*.astro",
10+
options: {
11+
parser: "astro",
12+
},
13+
},
14+
],
15+
};
16+
17+
export default config;

astro.config.mjs

+11
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ export default defineConfig({
9595
href: "/manifest.webmanifest",
9696
},
9797
},
98+
{
99+
tag: "link",
100+
attrs: {
101+
rel: "preconnect",
102+
href: "https://JXZNTZ86UN-dsn.algolia.net",
103+
crossorigin: true,
104+
},
105+
},
98106
{
99107
tag: "script",
100108
attrs: {
@@ -107,6 +115,9 @@ export default defineConfig({
107115
logo: {
108116
src: "./src/assets/astronvim.svg",
109117
},
118+
components: {
119+
Search: "./src/components/Search.astro",
120+
},
110121
customCss: [
111122
// Path to your Tailwind base styles:
112123
"./src/tailwind.css",

package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,18 @@
1414
"@astrojs/starlight": "^0.11.1",
1515
"@astrojs/starlight-tailwind": "^2.0.0",
1616
"@astrojs/tailwind": "^5.0.2",
17+
"@docsearch/css": "^3.5.2",
18+
"@docsearch/js": "^3.5.2",
1719
"astro": "^3.3.0",
1820
"sharp": "^0.32.6",
1921
"tailwindcss": "^3.3.3"
2022
},
2123
"devDependencies": {
2224
"@netlify/plugin-lighthouse": "^5.0.0",
2325
"netlify-plugin-checklinks": "^4.1.1",
24-
"netlify-plugin-submit-sitemap": "^0.4.0"
26+
"netlify-plugin-submit-sitemap": "^0.4.0",
27+
"prettier": "^3.0.3",
28+
"prettier-plugin-astro": "^0.12.0",
29+
"prettier-plugin-tailwindcss": "^0.5.6"
2530
}
2631
}

0 commit comments

Comments
 (0)