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;
---
@ -13,7 +14,7 @@ const data = Astro.props;
<span class="post-stats">
<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>
</div>
</div>
@ -51,9 +52,10 @@ const data = Astro.props;
}
.post-title {
font-family: "Recursive Mono", "Maple Mono";
color: inherit;
font-weight: 700;
font-size: 1.05rem;
font-size: 1.34rem;
line-height: 1.6;
display: -webkit-box;
-webkit-line-clamp: 3;

View file

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

View file

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

View file

@ -46,6 +46,30 @@
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 {
font-family: "Maple Mono", "Maple Mono CN", monospace;
background-color: #ffffff;