Skip to content

Commit

Permalink
fix: no show post
Browse files Browse the repository at this point in the history
  • Loading branch information
Parsifa1 committed Sep 18, 2024
1 parent db3c0c4 commit 1a32260
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const SITE: Site = {
ogImage:
"https://i2.woh.to/2023/09/30/photo_2023-05-07_23-49-04a122368bf889ed18.jpg",
lightAndDarkMode: true,
postPerPage: 5,
postPerPage: 4,
scheduledPostMargin: 15 * 60 * 1000, // 15 minutes
};

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/content/blog/angle_beats_question.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ tags:
- math
author: Parsifal
description: 一道有趣的计算几何
modDatetime: 2024-09-19T03:41:24Z
modDatetime: 2024-09-19T05:15:24Z
pubDatetime: 2024-09-19T01:56:21Z
---

Expand Down
2 changes: 1 addition & 1 deletion src/content/blog/tensor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ author: "Parsifal"
tags: ["math"]
---

import Main from "../_typst/tensor.typ/";
import Main from "./_typst/tensor.typ/";

<Main />
10 changes: 5 additions & 5 deletions src/utils/postFilter.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { SITE } from "@config";
import type { CollectionEntry } from "astro:content";

const postFilter = ({ data }: CollectionEntry<"blog">) => {
const isPublishTimePassed =
Date.now() >
new Date(data.pubDatetime).getTime() - SITE.scheduledPostMargin;
return !data.draft && (import.meta.env.DEV || isPublishTimePassed);
// const isPublishTimePassed =
// Date.now() >
// new Date(data.pubDatetime).getTime() - SITE.scheduledPostMargin;
// return !data.draft && (import.meta.env.DEV || isPublishTimePassed);
return !data.draft;
};

export default postFilter;

0 comments on commit 1a32260

Please sign in to comment.