Skip to content

Commit 04a96f7

Browse files
committed
run astro check
1 parent 5ca6326 commit 04a96f7

File tree

14 files changed

+8
-31
lines changed

14 files changed

+8
-31
lines changed

astro.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import icon from "astro-icon";
88

99
// https://astro.build/config
1010
export default defineConfig({
11+
site: "https://utcode.net",
1112
vite: {
1213
plugins: [
1314
tailwind(),

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"prepare": "lefthook install && bun sync",
1313
"sync": "astro sync",
1414
"dev": "astro dev",
15+
"check": "astro check",
1516
"build": "astro build",
1617
"preview": "astro preview",
1718
"lint": "eslint .",

src/layouts/GlobalLayout.astro

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ interface Props {
1010
description: string | null;
1111
focus: Focus;
1212
class?: string;
13-
url: `/${string}`; // absolute value of URL. example: /articles
1413
}
15-
const { title, description, url, focus } = Astro.props;
14+
const { title, description, focus } = Astro.props;
1615
---
1716

1817
<html lang="ja">
19-
<Meta {title} {description} url={url} />
18+
<Meta {title} {description} />
2019
<body class="min-h-full w-full">
2120
<Header {focus} />
2221
<slot />

src/layouts/meta.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ interface Props {
99
keywords?: string[];
1010
image?: string; // URL of image
1111
// linkedData?: WithContext<Thing>;
12-
url: string; // absolute path starting with /
1312
}
14-
const { title, description, keywords = [], image, url } = Astro.props;
13+
const { title, description, keywords = [], image } = Astro.props;
14+
const url = Astro.url.href;
1515
1616
const favicon = await getImage({
1717
src: Favicon,

src/pages/articles.astro

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,12 @@
22
import GlobalLayout from "../layouts/GlobalLayout.astro";
33
import ArticleList from "../components/ArticleList.astro";
44
import { Focus } from "../schema";
5-
import { getCollection } from "astro:content";
6-
7-
`
8-
query ArticlesPage {
9-
allMdx(
10-
filter: {
11-
internal: { contentFilePath: { glob: "**/contents/articles/**" } }
12-
}
13-
sort: { frontmatter: { date: DESC } }
14-
) {
15-
nodes {
16-
...ArticleListArticle
17-
}
18-
}
19-
}
20-
`;
215
---
226

237
<GlobalLayout
248
title="すべての記事"
259
description="ut.code(); からの最新情報"
2610
focus={Focus.articles}
27-
url="/articles"
2811
>
2912
<main class="container mx-auto px-4 py-24">
3013
<h1 class="text-center text-4xl">すべての記事</h1>

src/pages/articles/[article].astro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ if (article.data.author && !author)
3131
title={article.data.title}
3232
description="ut.code(); のウェブサイトに書かれた記事のひとつです。"
3333
focus={Focus.articles}
34-
url={`/articles/${article.id}`}
3534
>
3635
{
3736
article.data.image && (

src/pages/contact.astro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import ContactHeader from "../images/contact-header.jpg";
1212
title="連絡"
1313
description="ut.code(); 連絡する手段"
1414
focus={Focus.contact}
15-
url="/contact"
1615
>
1716
<div class="container mx-auto px-4 pt-16 pb-12">
1817
<h1 class="text-4xl">ut.code(); に連絡する</h1>

src/pages/donation.astro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import ActionButton from "../components/ActionButton.astro";
1313
description="ご寄付・ご協賛をお願いしております"
1414
focus={Focus.contact}
1515
class="prose"
16-
url="/donation"
1716
>
1817
<h1 class="mt-12 ml-[20%] text-4xl">ご寄付・ご協賛のお願い</h1>
1918
<Image

src/pages/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import LabCafe from "../images/lab-cafe.jpg";
1414
import LogoGMOMedia from "../images/logo-gmo-media.png";
1515
---
1616

17-
<GlobalLayout title={null} description={null} focus={Focus.none} url="/">
17+
<GlobalLayout title={null} description={null} focus={Focus.none}>
1818
<Image
1919
alt=""
2020
loading="eager"

src/pages/join.astro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import JoinHeader from "../images/join-header.jpg";
1212
title="参加"
1313
description="ut.code(); に参加する"
1414
focus={Focus.join}
15-
url="/join"
1615
>
1716
<Image
1817
alt=""

0 commit comments

Comments
 (0)