Skip to content

Commit 674e0c9

Browse files
committed
update
1 parent 56e6ddd commit 674e0c9

39 files changed

+595
-1364
lines changed

astro.config.mjs

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,37 @@
11
import { defineConfig } from "astro/config";
2+
import AutoImport from 'astro-auto-import';
23
import tailwind from "@astrojs/tailwind";
34
import { rehypeHeadingIds } from "@astrojs/markdown-remark";
45
import remarkToc from "remark-toc";
56
import { rehypeAccessibleEmojis } from "rehype-accessible-emojis";
67
import rehypeKatex from "rehype-katex";
78
import remarkMath from "remark-math";
8-
import react from "@astrojs/react";
9-
109
import mdx from "@astrojs/mdx";
10+
import { Site } from "./src/consts.ts";
11+
import compressor from "astro-compressor";
12+
import min from "astro-min";
13+
import robotsTxt from "astro-robots-txt";
14+
import sitemap from "astro-sitemap";
15+
16+
import vtbot from "astro-vtbot";
1117

1218
// https://astro.build/config
1319
export default defineConfig({
14-
site: "https://aweblog.vercel.app",
15-
integrations: [tailwind(), react(), mdx()],
20+
site: Site.url,
21+
integrations: [AutoImport({
22+
imports: [{
23+
'./src/components/embed/Arte.astro': [['default', 'Video']]
24+
}]
25+
}), tailwind(), mdx(), vtbot(), robotsTxt(), sitemap(), min(), compressor()],
1626
image: {
1727
domains: ["https://github.com"],
18-
remotePatterns: [
19-
{
20-
protocol: "https",
21-
hostname: "**.github.com",
22-
},
23-
],
28+
remotePatterns: [{
29+
protocol: "https",
30+
hostname: "**.github.com"
31+
}]
2432
},
2533
markdown: {
2634
rehypePlugins: [rehypeHeadingIds, rehypeAccessibleEmojis, rehypeKatex],
27-
remarkPlugins: [remarkToc, remarkMath],
28-
},
35+
remarkPlugins: [remarkMath, remarkToc]
36+
}
2937
});

bun.lockb

18.2 KB
Binary file not shown.

package.json

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
{
22
"name": "astro-weblog",
3-
"type": "module",
43
"version": "0.0.1",
4+
"type": "module",
55
"scripts": {
6+
"astro": "astro",
7+
"build": "bunx --bun astro build",
8+
"check": "astro check",
69
"dev": "astro dev",
7-
"start": "astro dev",
8-
"build": "astro check && astro build",
910
"preview": "vercel deploy",
11+
"prepublish": "biome check . && astro check",
1012
"publish": "vercel deploy --prod",
11-
"prepublish": "biome check . && astro check",
12-
"astro": "astro"
13+
"start": "astro dev"
1314
},
1415
"dependencies": {
1516
"@astrojs/check": "^0.8.2",
@@ -20,27 +21,38 @@
2021
"@astrojs/tailwind": "^5.1.0",
2122
"@fontsource/merriweather": "^5.0.13",
2223
"@fontsource/montserrat": "^5.0.18",
23-
"@types/react": "^18.3.3",
24-
"@types/react-dom": "^18.3.0",
24+
"@xexiu/astro-progress-bar": "^0.3.9",
2525
"astro": "^4.12.2",
26+
"astro-auto-import": "^0.4.2",
27+
"astro-compressor": "^0.4.1",
2628
"astro-loading-indicator": "^0.5.0",
29+
"astro-robots-txt": "^1.0.0",
30+
"astro-sitemap": "^1.0.0",
31+
"astro-vtbot": "^1.8.2",
2732
"colorjs.io": "^0.5.2",
28-
"react": "^18.3.1",
29-
"react-dom": "^18.3.1",
33+
"dayjs": "^1.11.12",
34+
"lite-youtube-embed": "^0.3.2",
35+
"more-modern-css-reset": "^1.1.0",
3036
"rehype-accessible-emojis": "^0.3.2",
3137
"rehype-katex": "^7.0.0",
3238
"remark-math": "^6.0.0",
3339
"remark-toc": "^9.0.0",
3440
"tailwindcss": "^3.4.6",
41+
"threads-api": "^1.6.3",
3542
"typescript": "^5.5.3"
3643
},
3744
"devDependencies": {
3845
"@types/node": "^20.14.11",
46+
"astro-min": "^1.3.1",
3947
"autoprefixer": "^10.4.19",
4048
"biome-config-astro": "^1.2.0",
4149
"open-props": "^1.7.5",
4250
"postcss-jit-props": "^1.0.14"
4351
},
52+
"packageManager": "bun@1.20.0",
53+
"engines": {
54+
"node": ">=18.17.1"
55+
},
4456
"trustedDependencies": [
4557
"@biomejs/biome"
4658
]
Binary file not shown.
464 KB
Binary file not shown.

public/s/bm.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/BaseHead.astro

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
// Import the global.css file here so that it is included on
3+
// all pages through the use of the <BaseHead /> component.
4+
import '@/styles/global.css'
5+
6+
interface Props {
7+
title: string
8+
desc: string
9+
img?: string
10+
}
11+
12+
const canonicalURL = new URL(Astro.url.pathname, Astro.site)
13+
14+
const { title, desc, img = '/i/social.png' } = Astro.props
15+
---
16+
17+
<!-- Global Metadata -->
18+
<meta charset="utf-8" />
19+
<meta name="viewport" content="width=device-width, initial-scale=1" />
20+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
21+
<link rel="alternate" type="application/rss+xml" href="/rss.xml" title="ToxicFlags RSS Feed" />
22+
<meta name="generator" content={Astro.generator} />
23+
24+
<!-- Font preloads -->
25+
<link rel="preload" href="/f/atkinson-hyper-pro-regular-subset.woff2" as="font" type="font/woff2" crossorigin />
26+
<!-- <link rel="preload" href="/f/atkinson-hyperlegible-v11-latin-regular.woff2" as="font" type="font/woff2" crossorigin /> -->
27+
<link rel="preload" href="/f/comfortaa-v45-latin-regular.woff2" as="font" type="font/woff2" crossorigin />
28+
<!-- <link rel="preload" href="/f/noto-emoji-v50-emoji-regular.woff2" as="font" type="font/woff2" crossorigin /> -->
29+
<!-- <link rel="preload" href="/fonts/shrikhand-v15-latin-regular.woff2" as="font" type="font/woff2" crossorigin /> -->
30+
31+
<!-- Canonical URL -->
32+
<link rel="canonical" href={canonicalURL} />
33+
34+
<!-- Primary Meta Tags -->
35+
<title>{title}</title>
36+
<meta name="title" content={title} />
37+
<meta name="description" content={desc} />
38+
39+
<!-- Open Graph / Facebook -->
40+
<meta property="og:type" content="website" />
41+
<meta property="og:url" content={Astro.url} />
42+
<meta property="og:title" content={title} />
43+
<meta property="og:description" content={desc} />
44+
<meta property="og:image" content={new URL(img, Astro.url)} />
45+
46+
<!-- Twitter -->
47+
<meta property="twitter:card" content="summary_large_image" />
48+
<meta property="twitter:url" content={Astro.url} />
49+
<meta property="twitter:title" content={title} />
50+
<meta property="twitter:description" content={desc} />
51+
<meta property="twitter:image" content={new URL(img, Astro.url)} />
52+
53+
<!-- Thems -->
54+
<meta name="theme-color" content="#7e22ce" />

src/components/FormattedDate.astro

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
import { Site } from '@/consts'
3+
4+
interface Props {
5+
date: Date
6+
}
7+
8+
const { date } = Astro.props
9+
---
10+
11+
<time datetime={date.toISOString()}>
12+
{
13+
date.toLocaleDateString(Site.lang, {
14+
year: 'numeric',
15+
month: 'short',
16+
day: 'numeric',
17+
})
18+
}
19+
</time>

src/components/header.astro

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,33 @@ import { Image } from 'astro:assets'
44
import Link from './link.astro'
55
---
66

7-
<header class="mb-14 flex flex-row place-content-between">
7+
<header>
88
<HomeLink />
9-
<span class="relative top-[4px] italic">
9+
<span>
1010
by
11-
<Link
12-
classList={["scale-100 active:scale-100"]}
13-
href="https://github.com/sunshineLixun"
14-
><Image
11+
<Link classList={["scale-100 active:scale-100"]} href="https://github.com/rdwz">
12+
<Image
1513
width="32"
1614
height="32"
1715
class="relative -top-1 mx-2 inline h-8 w-8 rounded-full"
18-
src="https://avatars.githubusercontent.com/u/15700015?v=4"
19-
alt="sunshineLixun"
20-
/></Link
21-
>
16+
src="https://avatars.githubusercontent.com/u/8125196?v=4"
17+
alt="rdwz avatar"
18+
/>
19+
</Link>
2220
</span>
2321
</header>
22+
23+
<style>
24+
header {
25+
margin-bottom: 1.75rem;
26+
display: flex;
27+
flex-direction: row;
28+
justify-content: space-between;
29+
}
30+
31+
span {
32+
position: relative;
33+
top: 4px;
34+
font-style: italic;
35+
}
36+
</style>

src/components/homeLink.astro

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@ const isActive = pathname === '/'
2323
WebkitBackgroundClip: "text",
2424
color: "transparent",
2525
transition: "--myColor1 0.2s ease-out, --myColor2 0.2s ease-in-out",
26-
}}>overreacted</span
27-
></Link
28-
>
26+
}}>ToxicFlags</span
27+
></Link>

0 commit comments

Comments
 (0)