Skip to content

Commit 5aa78b7

Browse files
committed
fix: wrong url on books
1 parent 3c50bb0 commit 5aa78b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/build.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,14 @@ function mapAuthor(author: string) {
5858
const books = rawData.map(
5959
(book: {
6060
title: string
61+
slug: string
6162
description: string
6263
authors: string[]
6364
cover: string
6465
}) => {
6566
return {
6667
...book,
67-
url: `${baseUrl}/books/${slug(book.title)}.json`,
68+
url: `${baseUrl}/books/${slug(book.slug)}.json`,
6869
cover: `${baseUrl}/covers/${book.cover}`,
6970
descriptionHtml: marked.parse(book.description),
7071
authors: book.authors.map(mapAuthor),

0 commit comments

Comments
 (0)