mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
refactor: update import alias in files
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
import type { APIRoute } from "astro";
|
import type { APIRoute } from "astro";
|
||||||
import { generateOgImageForSite } from "@utils/generateOgImages";
|
import { generateOgImageForSite } from "@/utils/generateOgImages";
|
||||||
|
|
||||||
export const GET: APIRoute = async () =>
|
export const GET: APIRoute = async () =>
|
||||||
new Response(await generateOgImageForSite(), {
|
new Response(await generateOgImageForSite(), {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
import { type CollectionEntry, getCollection } from "astro:content";
|
import { type CollectionEntry, getCollection } from "astro:content";
|
||||||
import PostDetails from "@layouts/PostDetails.astro";
|
import PostDetails from "@/layouts/PostDetails.astro";
|
||||||
import getSortedPosts from "@utils/getSortedPosts";
|
import getSortedPosts from "@/utils/getSortedPosts";
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
post: CollectionEntry<"blog">;
|
post: CollectionEntry<"blog">;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { APIRoute } from "astro";
|
import type { APIRoute } from "astro";
|
||||||
import { getCollection, type CollectionEntry } from "astro:content";
|
import { getCollection, type CollectionEntry } from "astro:content";
|
||||||
import { generateOgImageForPost } from "@utils/generateOgImages";
|
import { generateOgImageForPost } from "@/utils/generateOgImages";
|
||||||
import { slugifyStr } from "@utils/slugify";
|
import { slugifyStr } from "@/utils/slugify";
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
export async function getStaticPaths() {
|
||||||
const posts = await getCollection("blog").then(p =>
|
const posts = await getCollection("blog").then(p =>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import rss from "@astrojs/rss";
|
import rss from "@astrojs/rss";
|
||||||
import { getCollection } from "astro:content";
|
import { getCollection } from "astro:content";
|
||||||
import getSortedPosts from "@utils/getSortedPosts";
|
import getSortedPosts from "@/utils/getSortedPosts";
|
||||||
import { SITE } from "@config";
|
import { SITE } from "@/config";
|
||||||
|
|
||||||
export async function GET() {
|
export async function GET() {
|
||||||
const posts = await getCollection("blog");
|
const posts = await getCollection("blog");
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
---
|
---
|
||||||
import { getCollection } from "astro:content";
|
import { getCollection } from "astro:content";
|
||||||
import Header from "@components/Header.astro";
|
import Layout from "@/layouts/Layout.astro";
|
||||||
import Footer from "@components/Footer.astro";
|
import Header from "@/components/Header.astro";
|
||||||
import Layout from "@layouts/Layout.astro";
|
import Footer from "@/components/Footer.astro";
|
||||||
import Main from "@layouts/Main.astro";
|
import Main from "@/layouts/Main.astro";
|
||||||
import Tag from "@components/Tag.astro";
|
import Tag from "@/components/Tag.astro";
|
||||||
import getUniqueTags from "@utils/getUniqueTags";
|
import getUniqueTags from "@/utils/getUniqueTags";
|
||||||
import { SITE } from "@config";
|
import { SITE } from "@/config";
|
||||||
|
|
||||||
const posts = await getCollection("blog");
|
const posts = await getCollection("blog");
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { slugifyStr } from "./slugify";
|
|
||||||
import type { CollectionEntry } from "astro:content";
|
import type { CollectionEntry } from "astro:content";
|
||||||
|
import { slugifyStr } from "./slugify";
|
||||||
import postFilter from "./postFilter";
|
import postFilter from "./postFilter";
|
||||||
|
|
||||||
interface Tag {
|
interface Tag {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import satori from "satori";
|
import satori from "satori";
|
||||||
import type { CollectionEntry } from "astro:content";
|
import type { CollectionEntry } from "astro:content";
|
||||||
import { SITE } from "@config";
|
import { SITE } from "@/config";
|
||||||
import loadGoogleFonts, { type FontOptions } from "../loadGoogleFont";
|
import loadGoogleFonts, { type FontOptions } from "../loadGoogleFont";
|
||||||
|
|
||||||
export default async (post: CollectionEntry<"blog">) => {
|
export default async (post: CollectionEntry<"blog">) => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import satori from "satori";
|
import satori from "satori";
|
||||||
import { SITE } from "@config";
|
import { SITE } from "@/config";
|
||||||
import loadGoogleFonts, { type FontOptions } from "../loadGoogleFont";
|
import loadGoogleFonts, { type FontOptions } from "../loadGoogleFont";
|
||||||
|
|
||||||
export default async () => {
|
export default async () => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { SITE } from "@config";
|
|
||||||
import type { CollectionEntry } from "astro:content";
|
import type { CollectionEntry } from "astro:content";
|
||||||
|
import { SITE } from "@/config";
|
||||||
|
|
||||||
const postFilter = ({ data }: CollectionEntry<"blog">) => {
|
const postFilter = ({ data }: CollectionEntry<"blog">) => {
|
||||||
const isPublishTimePassed =
|
const isPublishTimePassed =
|
||||||
|
|||||||
Reference in New Issue
Block a user