Skip to content

Commit

Permalink
alias を使う
Browse files Browse the repository at this point in the history
  • Loading branch information
0maru committed Dec 11, 2023
1 parent 82d404e commit 329038f
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/components/BaseHead.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import { SITE_URL } from '../consts'
import { SITE_URL } from '@/consts'
interface Props {
title : string;
Expand Down
8 changes: 4 additions & 4 deletions src/layouts/Default.astro
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
import BaseHead from '../components/BaseHead.astro'
import Footer from '../components/Footer.astro'
import BodyBottomScript from '../components/BodyBottomScript.astro'
import Header from '../components/Header.astro'
import BaseHead from '@/components/BaseHead.astro'
import Footer from '@/components/Footer.astro'
import BodyBottomScript from '@/components/BodyBottomScript.astro'
import Header from '@/components/Header.astro'
interface Props {
title : string;
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/Post.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import DefaultLayout from './Default.astro'
import Tag from '../components/Tag.astro'
import DefaultLayout from '@/layouts/Default.astro'
import Tag from '@/components/Tag.astro'
interface Props {
frontmatter : {
title : string;
Expand Down
4 changes: 2 additions & 2 deletions src/pages/about.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import DefaultLayout from '../layouts/Default.astro'
import { SITE_TITLE, SITE_DESCRIPTION } from '../consts'
import DefaultLayout from '@/layouts/Default.astro'
import { SITE_TITLE, SITE_DESCRIPTION } from '@/consts'
---

<DefaultLayout title={SITE_TITLE} description={SITE_DESCRIPTION}>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import DefaultLayout from '../layouts/Default.astro'
import ArticleCard from '../components/ArticleCard.astro'
import { SITE_TITLE, SITE_DESCRIPTION } from '../consts'
import DefaultLayout from '@/layouts/Default.astro'
import ArticleCard from '@/components/ArticleCard.astro'
import { SITE_TITLE, SITE_DESCRIPTION } from '@/consts'
const allPosts = await Astro.glob('../pages/posts/*.md')
// status がpublish の記事のみ表示する
const filteredPosts = allPosts.filter((e) => e.frontmatter.status == 'published')
Expand Down
1 change: 1 addition & 0 deletions src/pages/rss.xml.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { SITE_DESCRIPTION, SITE_TITLE } from '@/consts';
import rss from '@astrojs/rss';
import { SITE_DESCRIPTION, SITE_TITLE } from '../consts';

Expand Down
4 changes: 2 additions & 2 deletions src/pages/tags/[tag].astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import DefaultLayout from '../../layouts/Default.astro'
import ArticleCard from '../../components/ArticleCard.astro'
import DefaultLayout from '@/layouts/Default.astro'
import ArticleCard from '@/components/ArticleCard.astro'
export async function getStaticPaths() {
const allPosts = await Astro.glob('../../pages/posts/*.md')
Expand Down
8 changes: 7 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"extends": "astro/tsconfigs/base",
"compilerOptions": {
"strictNullChecks": true,
"allowJs": true
"allowJs": true,
"baseUrl": ".",
"paths": {
"@/*": [
"src/*"
]
}
}
}

0 comments on commit 329038f

Please sign in to comment.