Skip to content

Commit

Permalink
chore: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
icfor committed Dec 27, 2023
1 parent 23b6d37 commit fbab841
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/api/posts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ export const getSinglePost = async (slug: string) => {
};

/** Get all post tags */
export const getTags = async () => {
export const getTags = async (limit = "15") => {
try {
return await api.tags.browse({
order: "count.posts DESC",
limit: "15",
include: "count.posts",
limit,
order: "count.posts DESC",
});
} catch (err) {
// eslint-disable-next-line no-console
Expand Down
4 changes: 2 additions & 2 deletions src/pages/tag/[tag]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { removeInternalTags } from "@src/utils/remove_internal_tags";
const TagDetailsPage = (props: any) => <TagTitlePosts {...props} />;

export const getStaticPaths: GetStaticPaths = async () => {
const tags = await getTags();
const tags = await getTags("1000");

const paths = locales
.map((locale) =>
Expand All @@ -24,7 +24,7 @@ export const getStaticPaths: GetStaticPaths = async () => {
)
.flat();

return { paths, fallback: true };
return { paths, fallback: "blocking" };
};

export const getStaticProps: GetStaticProps<any, { tag: string }> = async (
Expand Down

0 comments on commit fbab841

Please sign in to comment.