Skip to content

Commit

Permalink
v2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
EveSunMaple committed Jul 19, 2024
1 parent 321622f commit bd53664
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 15 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,10 @@
### Refactored

- 修改了 `astro.config.mjs` 现在代码框样式完全了

## [2.3.1] - 2024-7-19

## Fix

- 修复了 `astro.config.mjs` 中的问题(我填错了位置了)
- 完善了白天的代码框样式
12 changes: 6 additions & 6 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ import pagefind from "astro-pagefind";
export default defineConfig({
site: 'https://www.saroprock.com',
style: {
shikiConfig: {
themes: {
light: 'github-dark',
dark: 'github-dark',
},
},
scss: {
includePaths: ['./src/styles']
}
},
integrations: [mdx(), sitemap(), tailwind(), playformCompress(), pagefind()],
markdown: {
shikiConfig: {
themes: {
light: 'github-light',
dark: 'github-dark',
},
},
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeKatex]
},
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "frosti",
"type": "module",
"version": "2.3.0",
"version": "2.3.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
Expand Down
12 changes: 8 additions & 4 deletions src/content/blog/How-to-customize-code-box.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,15 @@ Frosti 使用 `Shiki` 来渲染代码框, `Shiki` 已经提供了足够多的

有关于 `Shiki` 的主题详见:https://shiki.style/themes

`astro.config.mjs` 中修改内容(某些内容不需要)
`astro.config.mjs` 中修改内容:

```js
themes: {
light: 'github-light', // 白天主题
dark: 'github-dark', // 夜晚主题
markdown: {
shikiConfig: {
themes: {
light: 'github-light',
dark: 'github-dark',
},
},
},
```
1 change: 0 additions & 1 deletion src/scripts/copybutton.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ document.addEventListener('astro:page-load', () => {
copyButton.style.width = '30px';
copyButton.style.height = '30px';
copyButton.style.borderRadius = '4px';
copyButton.style.color = '#fff';
copyButton.style.border = 'none';
copyButton.style.zIndex = 100;

Expand Down
5 changes: 4 additions & 1 deletion src/styles/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
html {
@apply scroll-smooth;
}

.astro-code,
.astro-code span {
background-color: oklch(var(--b2)) !important;
}
html[data-theme="dracula"] {
--pagefind-ui-primary: oklch(var(--nc));
--pagefind-ui-text: oklch(var(--nc));
Expand Down

0 comments on commit bd53664

Please sign in to comment.