diff --git a/cdk/cf-functions/rewrite-url.js b/cdk/cf-functions/rewrite-url.js index 576bab1..bd59844 100644 --- a/cdk/cf-functions/rewrite-url.js +++ b/cdk/cf-functions/rewrite-url.js @@ -5,7 +5,7 @@ function handler(event) { if (uri.endsWith('/')) { request.uri = '/index.html' } if (uri.endsWith('/about')) { request.uri = '/about/index.html' } if (uri.endsWith('/tags')) { request.uri = '/tags/index.html' } - if (uri.endsWith('/search')) { request.uri = '/search/index.html' } + if (uri.endsWith('/notes/search')) { request.uri = '/notes/search/index.html' } var pathNames = uri.split('/') if (pathNames.length > 2 && (pathNames[1] == 'notes' || pathNames[1] == 'tags')) { diff --git a/src/components/Nav.astro b/src/components/Nav.astro index 42e5d5f..2ddf766 100644 --- a/src/components/Nav.astro +++ b/src/components/Nav.astro @@ -12,7 +12,7 @@ import { Icon } from 'astro-icon/components' Tags About - + \ No newline at end of file diff --git a/src/pages/search.astro b/src/pages/notes/search.astro similarity index 80% rename from src/pages/search.astro rename to src/pages/notes/search.astro index 0a144d8..0356fe2 100644 --- a/src/pages/search.astro +++ b/src/pages/notes/search.astro @@ -1,7 +1,7 @@ --- -import Main from '../layouts/Main.astro' +import Main from '../../layouts/Main.astro' import { getCollection } from 'astro:content' -import SearchBar from '../components/SearchBar.astro' +import SearchBar from '../../components/SearchBar.astro' const allNotes = await getCollection('notes') allNotes.sort((a, b) => Date.parse(b.data.pubDate) - Date.parse(a.data.pubDate))