diff --git a/astro.config.ts b/astro.config.ts index 57b7380..4858d39 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -7,7 +7,7 @@ import remarkLinkCard from 'remark-link-card' import RemarkLinkRewrite, { type RemarkLinkRewriteOptions, } from 'remark-link-rewrite' -import { formatUrl } from './src/utils/validateUrl' +import { getFormatUrl } from './src/utils/validateUrl' const { SITE_URL } = loadEnv(process.env.NODE_ENV!, process.cwd(), '') @@ -43,7 +43,7 @@ export default defineConfig({ remarkLinkCard, [ RemarkLinkRewrite, - { replacer: formatUrl } satisfies RemarkLinkRewriteOptions, + { replacer: getFormatUrl(SITE_URL) } satisfies RemarkLinkRewriteOptions, ], ], }, diff --git a/src/components/activity/EventsSection.astro b/src/components/activity/EventsSection.astro index 10f58c5..1e7bc57 100644 --- a/src/components/activity/EventsSection.astro +++ b/src/components/activity/EventsSection.astro @@ -26,7 +26,7 @@ export const items: Item[] = [ image: welcomeImage, description: 'プログラミングの基礎、機械学習、3Dモデリングなど様々なテーマで、数カ月間にわたり講習会が開催されます。新歓イベントの一環として開催しており、どなたでも参加できます。※画像は2022年度のものです。', - link: { href: '/workshop', text: '講習会について詳しく' }, + link: { href: '/workshop/', text: '講習会について詳しく' }, }, { title: '5月 いちょう祭', diff --git a/src/components/common/InlineLink.astro b/src/components/common/InlineLink.astro index 1d255be..3abff84 100644 --- a/src/components/common/InlineLink.astro +++ b/src/components/common/InlineLink.astro @@ -1,18 +1,11 @@ --- -import { formatUrl } from '@/utils/validateUrl' import type { HTMLAttributes } from 'astro/types' type Props = Omit, 'slot'> const { class: className, href, ...attrs } = Astro.props - -const formattedHref = href && formatUrl(href) --- - + diff --git a/src/components/faq/FaqSection.astro b/src/components/faq/FaqSection.astro index 0a92a3f..30df358 100644 --- a/src/components/faq/FaqSection.astro +++ b/src/components/faq/FaqSection.astro @@ -35,7 +35,7 @@ import FaqCard from './FaqCard.astro' 普段はDiscordサーバーで雑談をしているほか、月に一度週末にオンラインで集まって部会を開催しています。また、大阪大学の大学祭であるいちょう祭(5月)とまちかね祭(11月)への出展は部員全員で協力して行います。

- 詳しくは + 詳しくは 活動紹介 をご覧ください。

diff --git a/src/components/index/activity/ActivitySection.astro b/src/components/index/activity/ActivitySection.astro index 5b4b18b..0b62ca1 100644 --- a/src/components/index/activity/ActivitySection.astro +++ b/src/components/index/activity/ActivitySection.astro @@ -20,7 +20,7 @@ const items: Item[] = [ image: welcomeImage, description: 'プログラミングの基礎、機械学習、3Dモデリングなど様々なテーマで、数カ月間にわたり講習会が開催されます。新歓イベントの一環として開催しており、どなたでも参加できます。※画像は2022年度のものです。', - link: { href: '/workshop', text: '講習会について詳しく' }, + link: { href: '/workshop/', text: '講習会について詳しく' }, }, { title: '5月 いちょう祭', @@ -52,7 +52,7 @@ const items: Item[] = [ }
- 活動紹介について詳しく + 活動紹介について詳しく
diff --git a/src/components/index/faq/FaqSection.astro b/src/components/index/faq/FaqSection.astro index 5f5bcc3..7458e58 100644 --- a/src/components/index/faq/FaqSection.astro +++ b/src/components/index/faq/FaqSection.astro @@ -10,7 +10,7 @@ import LinkButton from '@/components/common/button/LinkButton.astro' 「部室はあるの?」「活動には必ず参加しないといけないの?」「部費はかかるの?」など、よくある質問はこちらから。
- FAQを確認する + FAQを確認する
diff --git a/src/components/index/join/JoinSection.astro b/src/components/index/join/JoinSection.astro index c490ee0..386b27b 100644 --- a/src/components/index/join/JoinSection.astro +++ b/src/components/index/join/JoinSection.astro @@ -11,7 +11,7 @@ import LinkButton from '@/components/common/button/LinkButton.astro' まずは公開サーバーに参加し、部内の雰囲気を感じてみませんか?
- Join OUCC! + Join OUCC!
diff --git a/src/components/layout/Footer.astro b/src/components/layout/Footer.astro index 01f9a61..7d0e5ff 100644 --- a/src/components/layout/Footer.astro +++ b/src/components/layout/Footer.astro @@ -11,6 +11,6 @@ import FooterLink from './FooterLink.astro'
規約 - プライバシーポリシー + プライバシーポリシー
diff --git a/src/components/layout/nav/BlogNav.astro b/src/components/layout/nav/BlogNav.astro index 800c734..dcdc9f6 100644 --- a/src/components/layout/nav/BlogNav.astro +++ b/src/components/layout/nav/BlogNav.astro @@ -1,7 +1,6 @@ --- import { BlogCategoryMapping } from '@/content/config' -import { validateUrl } from '@/utils/validateUrl' const current = Astro.url.pathname const navList = [ @@ -21,8 +20,6 @@ const navList = [ isHere: '/blog/tags/' === current, }, ] as const satisfies { target: string; title: string; isHere: boolean }[] - -for (const { target } of navList) validateUrl(target) ---
diff --git a/src/components/layout/nav/Header.astro b/src/components/layout/nav/Header.astro index 5ee7970..01f5169 100644 --- a/src/components/layout/nav/Header.astro +++ b/src/components/layout/nav/Header.astro @@ -4,7 +4,6 @@ import Image from '@/components/common/Image.astro' import ouccImage from '@/assets/oucc.svg' import LinkButton from '@/components/common/button/LinkButton.astro' import Navigation from './Navigation.astro' -import { formatUrl } from '@/utils/validateUrl' interface Props { showJoinLink?: boolean @@ -19,8 +18,6 @@ const { rootPath = '/', headerTitle, } = Astro.props - -const formattedRootPath = formatUrl(rootPath) ---
- +
- {showJoinLink && Join OUCC!} + {showJoinLink && Join OUCC!}
{ /** diff --git a/src/components/layout/nav/Navigation.astro b/src/components/layout/nav/Navigation.astro index 81cc8f7..bbe1178 100644 --- a/src/components/layout/nav/Navigation.astro +++ b/src/components/layout/nav/Navigation.astro @@ -11,12 +11,12 @@ import DrWani from './DrWani.astro'