Skip to content

Commit

Permalink
Add Algolia DocSearch to website
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-hiller committed Dec 9, 2023
1 parent 3ffece3 commit a266136
Show file tree
Hide file tree
Showing 18 changed files with 775 additions and 15 deletions.
4 changes: 4 additions & 0 deletions website/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
PUBLIC_WEBSITE_URL="https://valibot.dev"
PUBLIC_ALGOLIA_APP_ID="B90T8F2PFG"
PUBLIC_ALGOLIA_INDEX_NAME="valibot"
PUBLIC_ALGOLIA_PUBLIC_API_KEY="ccdb9a38bd679cb82c879625d31d15ae"
4 changes: 2 additions & 2 deletions website/scripts/sitemap.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fs from 'node:fs';
import path from 'node:path';

const ORIGIN = 'https://valibot.dev/';
const ORIGIN = 'https://valibot.dev';

/**
* Finds all index files in the given directory.
Expand Down Expand Up @@ -56,7 +56,7 @@ async function generateSitemap() {
// Reduce URL paths to URL set
.reduce(
(urlPaths, urlPath) =>
`${urlPaths}<url><loc>${ORIGIN}${urlPath}</loc></url>`,
`${urlPaths}<url><loc>${ORIGIN}/${urlPath}</loc></url>`,
''
);

Expand Down
Loading

0 comments on commit a266136

Please sign in to comment.