Skip to content

Commit d0281d7

Browse files
committed
format
1 parent 9acd0d8 commit d0281d7

13 files changed

Lines changed: 262 additions & 241 deletions

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"recommendations": ["biomejs.biome", "astro-build.astro-vscode"]
2+
"recommendations": ["biomejs.biome", "astro-build.astro-vscode"]
33
}

.vscode/settings.json

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
{
2-
"editor.formatOnSave": true,
3-
"editor.defaultFormatter": "biomejs.biome",
4-
"[javascript]": {
5-
"editor.defaultFormatter": "biomejs.biome"
6-
},
7-
"[javascriptreact]": {
8-
"editor.defaultFormatter": "biomejs.biome"
9-
},
10-
"[typescript]": {
11-
"editor.defaultFormatter": "biomejs.biome"
12-
},
13-
"[typescriptreact]": {
14-
"editor.defaultFormatter": "biomejs.biome"
15-
},
16-
"editor.codeActionsOnSave": {
17-
"source.fixAll": "explicit",
18-
"quickfix.biome": "always",
19-
"source.organizeImports.biome": "always"
20-
},
21-
"frontMatter.dashboard.openOnStart": false
2+
"editor.formatOnSave": true,
3+
"editor.defaultFormatter": "biomejs.biome",
4+
"[javascript]": {
5+
"editor.defaultFormatter": "biomejs.biome"
6+
},
7+
"[javascriptreact]": {
8+
"editor.defaultFormatter": "biomejs.biome"
9+
},
10+
"[typescript]": {
11+
"editor.defaultFormatter": "biomejs.biome"
12+
},
13+
"[typescriptreact]": {
14+
"editor.defaultFormatter": "biomejs.biome"
15+
},
16+
"editor.codeActionsOnSave": {
17+
"source.fixAll.biome": "explicit"
18+
},
19+
"frontMatter.dashboard.openOnStart": false
2220
}

astro.config.mjs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import tailwind from "@astrojs/tailwind";
44
import { pluginCollapsibleSections } from "@expressive-code/plugin-collapsible-sections";
55
import { pluginLineNumbers } from "@expressive-code/plugin-line-numbers";
66
import swup from "@swup/astro";
7+
import { defineConfig } from "astro/config";
78
import expressiveCode from "astro-expressive-code";
89
import icon from "astro-icon";
9-
import { defineConfig } from "astro/config";
1010
import rehypeAutolinkHeadings from "rehype-autolink-headings";
1111
import rehypeComponents from "rehype-components"; /* Render the custom directive content */
1212
import rehypeKatex from "rehype-katex";
@@ -16,18 +16,18 @@ import remarkGithubAdmonitionsToDirectives from "remark-github-admonitions-to-di
1616
import remarkMath from "remark-math";
1717
import remarkSectionize from "remark-sectionize";
1818
import { expressiveCodeConfig } from "./src/config.ts";
19+
import { pluginCustomCopyButton } from "./src/plugins/expressive-code/custom-copy-button.js";
1920
import { pluginLanguageBadge } from "./src/plugins/expressive-code/language-badge.ts";
2021
import { AdmonitionComponent } from "./src/plugins/rehype-component-admonition.mjs";
2122
import { GithubCardComponent } from "./src/plugins/rehype-component-github-card.mjs";
2223
import { parseDirectiveNode } from "./src/plugins/remark-directive-rehype.js";
2324
import { remarkExcerpt } from "./src/plugins/remark-excerpt.js";
2425
import { remarkReadingTime } from "./src/plugins/remark-reading-time.mjs";
25-
import { pluginCustomCopyButton } from "./src/plugins/expressive-code/custom-copy-button.js";
2626

2727
// https://astro.build/config
2828
export default defineConfig({
2929
site: "https://blog.g-rinai.cn/",
30-
// base: "/WHITE",
30+
// base: "/WHITE",
3131
trailingSlash: "always",
3232
integrations: [
3333
tailwind({
@@ -61,12 +61,12 @@ export default defineConfig({
6161
pluginCollapsibleSections(),
6262
pluginLineNumbers(),
6363
pluginLanguageBadge(),
64-
pluginCustomCopyButton()
64+
pluginCustomCopyButton(),
6565
],
6666
defaultProps: {
6767
wrap: true,
6868
overridesByLang: {
69-
'shellsession': {
69+
shellsession: {
7070
showLineNumbers: false,
7171
},
7272
},
@@ -76,7 +76,8 @@ export default defineConfig({
7676
borderRadius: "0.75rem",
7777
borderColor: "none",
7878
codeFontSize: "0.875rem",
79-
codeFontFamily: "'JetBrains Mono Variable', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
79+
codeFontFamily:
80+
"'JetBrains Mono Variable', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
8081
codeLineHeight: "1.5rem",
8182
frames: {
8283
editorBackground: "var(--codeblock-bg)",
@@ -87,19 +88,19 @@ export default defineConfig({
8788
editorActiveTabIndicatorBottomColor: "var(--primary)",
8889
editorActiveTabIndicatorTopColor: "none",
8990
editorTabBarBorderBottomColor: "var(--codeblock-topbar-bg)",
90-
terminalTitlebarBorderBottomColor: "none"
91+
terminalTitlebarBorderBottomColor: "none",
9192
},
9293
textMarkers: {
9394
delHue: 0,
9495
insHue: 180,
95-
markHue: 250
96-
}
96+
markHue: 250,
97+
},
9798
},
9899
frames: {
99100
showCopyToClipboardButton: false,
100-
}
101+
},
101102
}),
102-
svelte(),
103+
svelte(),
103104
sitemap(),
104105
],
105106
markdown: {

frontmatter.json

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,67 @@
11
{
2-
"$schema": "https://frontmatter.codes/frontmatter.schema.json",
3-
"frontMatter.framework.id": "astro",
4-
"frontMatter.preview.host": "http://localhost:4321",
5-
"frontMatter.content.publicFolder": "public",
6-
"frontMatter.content.pageFolders": [
7-
{
8-
"title": "posts",
9-
"path": "[[workspace]]/src/content/posts"
10-
}
11-
],
12-
"frontMatter.taxonomy.contentTypes": [
13-
{
14-
"name": "default",
15-
"pageBundle": true,
16-
"previewPath": "'blog'",
17-
"filePrefix": null,
18-
"clearEmpty": true,
19-
"fields": [
20-
{
21-
"title": "title",
22-
"name": "title",
23-
"type": "string",
24-
"single": true
25-
},
26-
{
27-
"title": "description",
28-
"name": "description",
29-
"type": "string"
30-
},
31-
{
32-
"title": "published",
33-
"name": "published",
34-
"type": "datetime",
35-
"default": "{{now}}",
36-
"isPublishDate": true
37-
},
38-
{
39-
"title": "preview",
40-
"name": "image",
41-
"type": "image",
42-
"isPreviewImage": true
43-
},
44-
{
45-
"title": "tags",
46-
"name": "tags",
47-
"type": "list"
48-
},
49-
{
50-
"title": "category",
51-
"name": "category",
52-
"type": "string"
53-
},
54-
{
55-
"title": "draft",
56-
"name": "draft",
57-
"type": "boolean"
58-
},
59-
{
60-
"title": "language",
61-
"name": "language",
62-
"type": "string"
63-
}
64-
]
65-
}
66-
]
2+
"$schema": "https://frontmatter.codes/frontmatter.schema.json",
3+
"frontMatter.framework.id": "astro",
4+
"frontMatter.preview.host": "http://localhost:4321",
5+
"frontMatter.content.publicFolder": "public",
6+
"frontMatter.content.pageFolders": [
7+
{
8+
"title": "posts",
9+
"path": "[[workspace]]/src/content/posts"
10+
}
11+
],
12+
"frontMatter.taxonomy.contentTypes": [
13+
{
14+
"name": "default",
15+
"pageBundle": true,
16+
"previewPath": "'blog'",
17+
"filePrefix": null,
18+
"clearEmpty": true,
19+
"fields": [
20+
{
21+
"title": "title",
22+
"name": "title",
23+
"type": "string",
24+
"single": true
25+
},
26+
{
27+
"title": "description",
28+
"name": "description",
29+
"type": "string"
30+
},
31+
{
32+
"title": "published",
33+
"name": "published",
34+
"type": "datetime",
35+
"default": "{{now}}",
36+
"isPublishDate": true
37+
},
38+
{
39+
"title": "preview",
40+
"name": "image",
41+
"type": "image",
42+
"isPreviewImage": true
43+
},
44+
{
45+
"title": "tags",
46+
"name": "tags",
47+
"type": "list"
48+
},
49+
{
50+
"title": "category",
51+
"name": "category",
52+
"type": "string"
53+
},
54+
{
55+
"title": "draft",
56+
"name": "draft",
57+
"type": "boolean"
58+
},
59+
{
60+
"title": "language",
61+
"name": "language",
62+
"type": "string"
63+
}
64+
]
65+
}
66+
]
6767
}

0 commit comments

Comments
 (0)