website

#astro#js#html#css

git clone https://git.pyrossh.dev/website

木 Personal website of pyrossh. Built with astrojs, shiki, vite.


8d3592f — pyrossh 2025-10-10T10:01:22+05:30
fix code theme

Generated files not shown: bun.lock

astro.config.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  // @ts-check
2
2
  import { defineConfig } from 'astro/config';
3
3
  import icon from "astro-icon";
4
- import mdx from '@astrojs/mdx';
5
4
  import sitemap from '@astrojs/sitemap';
6
5
 
7
6
  // https://astro.build/config
@@ -9,9 +8,16 @@ export default defineConfig({
9
8
  site: 'https://pyrossh.dev',
10
9
  trailingSlash: 'never',
11
10
  output: 'static',
11
+ markdown: {
12
+ shikiConfig: {
13
+ themes: {
14
+ light: 'github-light',
15
+ dark: 'github-dark',
16
+ },
17
+ },
18
+ },
12
19
  integrations: [
13
20
  icon(),
14
- mdx(),
15
21
  sitemap(),
16
22
  ],
17
23
  experimental: {
package.json CHANGED
@@ -16,7 +16,6 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@appzic/astro-reset-css": "^1.2.0",
19
- "@astrojs/mdx": "^4.3.0",
20
19
  "@astrojs/rss": "^4.0.12",
21
20
  "@astrojs/sitemap": "^3.4.1",
22
21
  "astro": "^5.9.0",
src/layouts/Base.css CHANGED
@@ -11,15 +11,27 @@
11
11
  --color-highlight-bg: light-dark(hsl(184, 73%, 76%), hsl(260, 70%, 56%));
12
12
  --color-code-fg: light-dark(hsl(348, 86%, 43%), hsl(348, 86%, 80%));
13
13
  --color-code-bg: light-dark(hsl(210, 40%, 96%), hsl(0, 0%, 0%));
14
- --color-pre-bg: light-dark(hsl(210, 13%, 9%), hsl(0, 0%, 0%));
14
+ --color-pre-bg: light-dark(hsl(210, 40%, 96%), hsl(0, 0%, 0%));
15
15
  --color-md-table-bg: light-dark(hsl(210, 11%, 23%), hsl(210, 11%, 23%));
16
16
  --btn-light: none;
17
17
  --btn-dark: block;
18
+ .astro-code, .astro-code span {
19
+ background: var(--color-pre-bg) !important;
20
+ }
18
21
  }
19
22
 
20
23
  [data-theme="dark"] {
21
24
  --btn-light: block;
22
25
  --btn-dark: none;
26
+ .astro-code,
27
+ .astro-code span {
28
+ color: var(--shiki-dark) !important;
29
+ /* background-color: var(--shiki-dark-bg) !important; */
30
+ background: var(--color-pre-bg) !important;
31
+ font-style: var(--shiki-dark-font-style) !important;
32
+ font-weight: var(--shiki-dark-font-weight) !important;
33
+ text-decoration: var(--shiki-dark-text-decoration) !important;
34
+ }
23
35
  }
24
36
 
25
37
  body {
src/pages/posts/[...slug].astro CHANGED
@@ -99,7 +99,6 @@ const { Content } = await render(Astro.props);
99
99
  line-height: 1.6;
100
100
  padding: 16px;
101
101
  margin: 12px 0px;
102
- background: var(--color-pre-bg) !important;
103
102
  }
104
103
  }
105
104
  </style>
src/pages/repos/[...slug]/index.astro CHANGED
@@ -118,7 +118,6 @@ const { Content } = await render(Astro.props);
118
118
  line-height: 1.6;
119
119
  padding: 16px;
120
120
  margin: 12px 0px;
121
- background: var(--color-pre-bg) !important;
122
121
  }
123
122
 
124
123
  blockquote {