Skip to content

Commit a33f327

Browse files
committed
Use withastro/action@v2 with node 21.5.0
1 parent 393948c commit a33f327

File tree

12 files changed

+76
-98
lines changed

12 files changed

+76
-98
lines changed

.vscode/extensions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"recommendations": ["astro-build.astro-vscode"],
3+
"unwantedRecommendations": []
4+
}

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"command": "./node_modules/.bin/astro dev",
6+
"name": "Development server",
7+
"request": "launch",
8+
"type": "node-terminal"
9+
}
10+
]
11+
}

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ My site should be @ [https://emeraldjava.github.io/](http://emeraldjava.github.i
1111
- https://docs.astro.build/en/guides/migrate-to-astro/from-hugo/
1212
- https://mckerlie.com/posts/migrating-your-blog-from-hugo-to-astro/
1313

14-
1514
# Hugo
1615

1716
## github-style
@@ -29,7 +28,7 @@ Use the -H to set the hostname IP address for remote access
2928

3029
gatsby develop -H 10.157.149.208
3130

32-
http://localhost:8000/___graphql
31+
http://localhost:8000/\_\_\_graphql
3332

3433
## gatsby-theme-blog-core
3534

astro.config.ts

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,51 +7,53 @@ import sitemap from "@astrojs/sitemap";
77

88
// https://astro.build/config
99
export default defineConfig({
10-
// https://docs.astro.build/en/reference/configuration-reference/#site
11-
// see https://config.tips/c/astro/dynamic-astro-site-value/
12-
site: import.meta.env.DEV ? "http://localhost:4321" : 'https://emeraldjava.github.io/',
13-
// See https://github.com/withastro/astro/issues/5512
14-
// https://docs.astro.build/en/guides/environment-variables/
15-
// https://vitejs.dev/guide/env-and-mode.html#env-files
16-
//base: import.meta.env.DEV ? "." : "/emeraldjava-astro",
17-
//base: import.meta.env.VITE_BASE,
18-
integrations: [
19-
tailwind({
20-
applyBaseStyles: true,
21-
}),
22-
react(),
23-
sitemap(),
24-
],
25-
markdown: {
26-
remarkPlugins: [
27-
remarkToc,
28-
[
29-
remarkCollapse,
30-
{
31-
test: "Table of contents",
32-
},
33-
],
34-
],
35-
// shikiConfig: {
36-
// theme: "one-dark-pro",
37-
// wrap: true,
38-
// },
39-
},
40-
vite: {
41-
// build: {
42-
// rollupOptions: {
43-
// output: {
44-
// entryFileNames: '[name]-[hash].js',
45-
// }
46-
// }
47-
// },
48-
optimizeDeps: {
49-
exclude: ["@resvg/resvg-js"],
10+
// https://docs.astro.build/en/reference/configuration-reference/#site
11+
// see https://config.tips/c/astro/dynamic-astro-site-value/
12+
site: import.meta.env.DEV
13+
? "http://localhost:4321"
14+
: "https://emeraldjava.github.io/",
15+
// See https://github.com/withastro/astro/issues/5512
16+
// https://docs.astro.build/en/guides/environment-variables/
17+
// https://vitejs.dev/guide/env-and-mode.html#env-files
18+
//base: import.meta.env.DEV ? "." : "/emeraldjava-astro",
19+
//base: import.meta.env.VITE_BASE,
20+
integrations: [
21+
tailwind({
22+
applyBaseStyles: false,
23+
}),
24+
react(),
25+
sitemap(),
26+
],
27+
markdown: {
28+
remarkPlugins: [
29+
remarkToc,
30+
[
31+
remarkCollapse,
32+
{
33+
test: "Table of contents",
5034
},
35+
],
36+
],
37+
// shikiConfig: {
38+
// theme: "one-dark-pro",
39+
// wrap: true,
40+
// },
41+
},
42+
vite: {
43+
// build: {
44+
// rollupOptions: {
45+
// output: {
46+
// entryFileNames: '[name]-[hash].js',
47+
// }
48+
// }
49+
// },
50+
optimizeDeps: {
51+
exclude: ["@resvg/resvg-js"],
5152
},
52-
scopedStyleStrategy: "where",
53-
// https://about.gitlab.com/blog/2022/10/24/publishing-an-astro-site-with-pages/
54-
// GitLab Pages requires exposed files to be located in a folder called "public".
55-
// So we're instructing Astro to put the static build output in a folder of that name.
56-
outDir: './dist'
53+
},
54+
scopedStyleStrategy: "where",
55+
// https://about.gitlab.com/blog/2022/10/24/publishing-an-astro-site-with-pages/
56+
// GitLab Pages requires exposed files to be located in a folder called "public".
57+
// So we're instructing Astro to put the static build output in a folder of that name.
58+
outDir: "./dist",
5759
});

layouts/partials/comments.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

layouts/partials/head.html

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import type { Site, SocialObjects } from "./types";
22

33
export const SITE: Site = {
4-
website: "https://emeraldjava.github.io/emeraldjava-astro/", // replace this with your deployed domain
4+
website: "https://emeraldjava.github.io/", // replace this with your deployed domain
55
author: "emeraldjava",
66
desc: "A minimal, responsive and SEO-friendly Astro blog theme.",
7-
title: "emeraldjava AstroPaper",
7+
title: "emeraldjava",
88
ogImage: "astropaper-og.jpg",
9-
lightAndDarkMode: true,
10-
postPerPage: 3,
9+
lightAndDarkMode: false,
10+
postPerPage: 5,
1111
scheduledPostMargin: 15 * 60 * 1000, // 15 minutes
1212
};
1313

src/content/config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { SITE } from "@config";
22
import { defineCollection, z } from "astro:content";
33

4+
// see https://docs.astro.build/en/guides/content-collections/#defining-a-collection-schema
5+
46
const blog = defineCollection({
57
type: "content",
68
schema: ({ image }) =>

src/env.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
// https://docs.astro.build/en/guides/environment-variables/
1212
interface ImportMetaEnv {
13-
readonly VITE_BASE: string;
13+
readonly VITE_BASE: string;
1414
}
1515

1616
interface ImportMeta {
17-
readonly env: ImportMetaEnv;
18-
}
17+
readonly env: ImportMetaEnv;
18+
}

src/pages/index.astro

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ const socialCount = SOCIALS.filter(social => social.active).length;
4646
<!-- href="/blog">Blog</a>-->
4747
<!--</li>-->
4848

49-
50-
5149
<a
5250
target="_blank"
5351
href="/rss.xml"

themes/github-style

Lines changed: 0 additions & 1 deletion
This file was deleted.

tsconfig.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"@layouts/*": ["layouts/*"],
1212
"@pages/*": ["pages/*"],
1313
"@styles/*": ["styles/*"],
14-
"@utils/*": ["utils/*"],
15-
},
16-
},
17-
}
14+
"@utils/*": ["utils/*"]
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)