added env to comment

This commit is contained in:
ClovertaTheTrilobita 2026-03-25 11:01:09 +02:00
parent 91d8947761
commit 5554f25352
7 changed files with 37 additions and 7 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,4 +1,5 @@
--- ---
import "@/styles/global.css";
const data = Astro.props; const data = Astro.props;
--- ---
@ -13,7 +14,7 @@ const data = Astro.props;
<span class="post-stats"> <span class="post-stats">
<span class="post-stat">💬 {data.commentCount ?? 0}</span> <span class="post-stat">💬 {data.commentCount ?? 0}</span>
<span class="post-stat">👍 {data.reactionCount ?? 0}</span> <span class="post-stat"> {data.reactionCount ?? 0}</span>
</span> </span>
</div> </div>
</div> </div>
@ -51,9 +52,10 @@ const data = Astro.props;
} }
.post-title { .post-title {
font-family: "Recursive Mono", "Maple Mono";
color: inherit; color: inherit;
font-weight: 700; font-weight: 700;
font-size: 1.05rem; font-size: 1.34rem;
line-height: 1.6; line-height: 1.6;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 3; -webkit-line-clamp: 3;

View file

@ -3,6 +3,10 @@ import { getCollection } from "astro:content";
import PostItem from "./PostItem.astro"; import PostItem from "./PostItem.astro";
import { getLangFromUrl } from "@/i18n"; import { getLangFromUrl } from "@/i18n";
const token = import.meta.env.GITHUB_TOKEN;
const owner = import.meta.env.GISCUS_REPO_OWNER;
const name = import.meta.env.GISCUS_REPO_NAME;
const categoryId = import.meta.env.GISCUS_CATEGORY_ID;
const lang = getLangFromUrl(Astro.url); const lang = getLangFromUrl(Astro.url);
const allPosts = await getCollection("blog"); const allPosts = await getCollection("blog");
@ -25,7 +29,7 @@ function normalizePath(path: string) {
} }
async function fetchDiscussionStats(): Promise<DiscussionNode[]> { async function fetchDiscussionStats(): Promise<DiscussionNode[]> {
const token = import.meta.env.GITHUB_TOKEN; // const token = import.meta.env.GITHUB_TOKEN;
if (!token) return []; if (!token) return [];
const query = ` const query = `
@ -57,9 +61,9 @@ async function fetchDiscussionStats(): Promise<DiscussionNode[]> {
body: JSON.stringify({ body: JSON.stringify({
query, query,
variables: { variables: {
owner: "ClovertaTheTrilobita", owner: owner,
name: "SanYeCao-blog", name: name,
categoryId: "DIC_kwDORvuVpM4C5MDE", categoryId: categoryId,
}, },
}), }),
}); });

View file

@ -8,7 +8,7 @@ export default {
posts: "Posts", posts: "Posts",
tags: "Tags", tags: "Tags",
about: "About", about: "About",
timeline: "timeline", timeline: "Timeline",
}, },
post: { post: {
writtenBy: "Written by", writtenBy: "Written by",

View file

@ -46,6 +46,30 @@
font-display: swap; font-display: swap;
} }
@font-face {
font-family: "Recursive Mono";
src: url("/fonts/RecursiveMonoCslSt-Bold.woff2") format("woff2");
font-weight: 700;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "Recursive Mono";
src: url("/fonts/RecursiveMonoCslSt-Regular.woff2") format("woff2");
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "Recursive Mono";
src: url("/fonts/RecursiveMonoCslSt-Italic.woff2") format("woff2");
font-weight: 400;
font-style: italic;
font-display: swap;
}
html { html {
font-family: "Maple Mono", "Maple Mono CN", monospace; font-family: "Maple Mono", "Maple Mono CN", monospace;
background-color: #ffffff; background-color: #ffffff;