Skip to content

Commit

Permalink
feat(Next > Search): Add search support to gallery search keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
danactive committed Nov 5, 2023
1 parent 5377101 commit 356eb34
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion next/pages/[gallery].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const getStaticProps: GetStaticProps<ComponentProps, Params> = async (con
corpus: [album.h1, album.h2, album.year].join(' '),
}))
return {
props: { gallery: params.gallery, albums: preparedAlbums, ...indexKeywords(albums) },
props: { gallery: params.gallery, albums: preparedAlbums, ...indexKeywords(preparedAlbums) },
}
}

Expand Down
1 change: 1 addition & 0 deletions next/public/galleries/demo/gallery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
<album_h2>British Columbia</album_h2> <!-- heading 2: State/Province -->
<year>2001-2005</year> <!-- Year outputted as text in gallery view -->
<filename>2004-01-04-01.jpg</filename> <!-- must start with a four letter year; file must be hosted in the media folder > year folder (i.e. media/2004/2004-01-04-01.jpg) -->
<search>2001, 2004, British Columbia</search>
</album>
</gallery>
1 change: 1 addition & 0 deletions public/galleries/demo/gallery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
<album_h2>British Columbia</album_h2> <!-- heading 2: State/Province -->
<year>2001-2005</year> <!-- Year outputted as text in gallery view -->
<filename>2004-01-04-01.jpg</filename> <!-- must start with a four letter year; file must be hosted in the media folder > year folder (i.e. media/2004/2004-01-04-01.jpg) -->
<search>2001, 2004, British Columbia</search>
</album>
</gallery>

0 comments on commit 356eb34

Please sign in to comment.