diff --git a/astro.config.ts b/astro.config.ts index 8408ce6..34ceb45 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -7,61 +7,57 @@ import { defineConfig } from "astro/config"; // import pageInsight from "astro-page-insight"; import astroExpressiveCode, { - ExpressiveCodeTheme, + ExpressiveCodeTheme, } from "astro-expressive-code"; const customStyle = fs.readFileSync( - new URL("./src/styles/codeTheme.jsonc", import.meta.url), - "utf8", + new URL("./src/styles/codeTheme.jsonc", import.meta.url), + "utf8" ); const customTheme = ExpressiveCodeTheme.fromJSONString(customStyle); // https://astro.build/config export default defineConfig({ - site: "https://teaclient.net", - server: { - port: 7053, - }, - integrations: [ - astroExpressiveCode({ - themes: [customTheme], - }), - mdx(), - metaTags(), - sitemap({ - filter: (page) => - page !== `${import.meta.env.SITE}/staffhandbook-13-4-24`, - customPages: ["docs.teaclient.net"], - }), - tailwind({ - nesting: true, - applyBaseStyles: true, - }), - // pageInsight(), - ], - redirects: { - // Resources - "/discord": "https://discord.gg/ejFTe4Hfnc", - "/github": "https://github.com/TeaClientMC", - "/roadmap": "https://github.com/orgs/TeaClientMC/projects/3", - // Partner Networks - "/dropps": "https://discord.gg/qFarXHT32J", - // Easter-Eggs - "/klaas": "https://klaas.tiiny.site/", - }, - vite: { - resolve: { - alias: { - "@layout": "src/layouts", - "@component": "src/components", - "@scripts": "src/scripts", - "@styles": "src/styles", - "@assets": "src/assets", - }, - }, - build: { - minify: true, - sourcemap: false, - }, - }, + site: "https://teaclient.net", + server: { + port: 7053, + }, + integrations: [ + astroExpressiveCode({ + themes: [customTheme], + }), + mdx(), + metaTags(), + sitemap({ + filter: (page) => + page !== `${import.meta.env.SITE}/staffhandbook-13-4-24`, + customPages: ["docs.teaclient.net"], + }), + tailwind({ + nesting: true, + applyBaseStyles: true, + }), + // pageInsight(), + ], + redirects: { + // Resources + "/discord": "https://discord.gg/ejFTe4Hfnc", + "/github": "https://github.com/TeaClientMC", + "/roadmap": "https://github.com/orgs/TeaClientMC/projects/3", + // Partner Networks + "/dropps": "https://discord.gg/qFarXHT32J", + // Easter-Eggs + "/klaas": "https://klaas.tiiny.site/", + }, + vite: { + resolve: { + alias: { + "@": "src/", + }, + }, + build: { + minify: true, + sourcemap: false, + }, + }, }); diff --git a/src/components/footer.astro b/src/components/footer.astro index f631add..18a946f 100644 --- a/src/components/footer.astro +++ b/src/components/footer.astro @@ -1,7 +1,5 @@ --- import { Image } from "astro:assets"; -import DiscordSVG from "@assets/svgs/Discord.svg"; -import GithubSVG from "@assets/svgs/Github-white.svg"; import { twMerge } from "tailwind-merge"; interface Props { diff --git a/src/content/wiki/developers/api/index.mdx b/src/content/wiki/developers/api/index.mdx index 634f72d..32adde1 100644 --- a/src/content/wiki/developers/api/index.mdx +++ b/src/content/wiki/developers/api/index.mdx @@ -3,7 +3,7 @@ title: "API Notices & Info" desc: "Notices and Information about the API" --- -import TabComponent from "../../../../components/TabComponent.astro"; +import TabComponent from "@/"; export const tabData = [ { diff --git a/src/layouts/documents.astro b/src/layouts/documents.astro index 9ef4997..e3932cf 100644 --- a/src/layouts/documents.astro +++ b/src/layouts/documents.astro @@ -1,7 +1,7 @@ --- -import Footer from "@component/footer.astro"; -import Head from "@component/head.astro"; -import Header from "@component/header.astro"; +import Footer from "@/components/footer.astro"; +import Head from "@/components/head.astro"; +import Header from "@/components/header.astro"; import { twMerge } from "tailwind-merge"; import "../styles/style.css"; @@ -24,7 +24,7 @@ const { title, className, desc, banner } = Astro.props;
diff --git a/src/layouts/error.astro b/src/layouts/error.astro index 014f90a..f22fc92 100644 --- a/src/layouts/error.astro +++ b/src/layouts/error.astro @@ -3,10 +3,10 @@ const { errorNumber: errorNumberProp, Message } = Astro.props.frontmatter || Astro.props; -import Footer from "@component/footer.astro"; +import Footer from "@/componentss/footer.astro"; // Components -import Head from "@component/head.astro"; -import Header from "@component/header.astro"; +import Head from "@/componentss/head.astro"; +import Header from "@/componentss/header.astro"; // Styles import "../styles/style.css"; diff --git a/src/layouts/layout.astro b/src/layouts/layout.astro index 4a91076..99cd400 100644 --- a/src/layouts/layout.astro +++ b/src/layouts/layout.astro @@ -1,7 +1,7 @@ --- -import Footer from "@component/footer.astro"; -import Head from "@component/head.astro"; -import Header from "@component/header.astro"; +import Footer from "@/componentss/footer.astro"; +import Head from "@/componentss/head.astro"; +import Header from "@/componentss/header.astro"; import { twMerge } from "tailwind-merge"; import "../styles/style.css"; diff --git a/src/layouts/newspost.astro b/src/layouts/newspost.astro index f81c48f..63ecfe6 100644 --- a/src/layouts/newspost.astro +++ b/src/layouts/newspost.astro @@ -1,10 +1,10 @@ --- import type { CollectionEntry } from "astro:content"; -import DiscordSVG from "@assets/svgs/Discord.svg"; -import GithubSVG from "@assets/svgs/Github-white.svg"; -import Footer from "@component/footer.astro"; -import Header from "@component/header.astro"; -import Head from "@component/head.astro"; +import DiscordSVG from "@/assets/svgs/Discord.svg"; +import GithubSVG from "@/assets/svgs/Github-white.svg"; +import Footer from "@/components/footer.astro"; +import Header from "@/components/header.astro"; +import Head from "@/components/head.astro"; import { twMerge } from "tailwind-merge"; import { getEntry } from "astro:content"; import { Image } from "astro:assets"; @@ -29,7 +29,7 @@ const Sociallogosizes = 24;
+ diff --git a/src/pages/apply/[apply].astro b/src/pages/apply/[apply].astro index 553abc2..63aa0bd 100644 --- a/src/pages/apply/[apply].astro +++ b/src/pages/apply/[apply].astro @@ -1,52 +1,56 @@ --- -import Layout from "@layout/layout.astro"; +import Layout from "@/layouts/layout.astro"; const { apply } = Astro.params; export async function getStaticPaths() { - return [{ params: { apply: "staff" } }, { params: { apply: "team" } }]; + return [{ params: { apply: "staff" } }, { params: { apply: "team" } }]; } let title = ""; if (apply === "staff") { - title = "Staff Application"; + title = "Staff Application"; } else if (apply === "teams") { - title = "Teams Application"; + title = "Teams Application"; } else { - title = "Invalid application"; + title = "Invalid application"; } --- { - apply === "staff" - ? ( + apply === "staff" ? (
+ > + Loading… +
- Go Back + + Go Back +
- ) - : apply === "team" - ? ( + ) : apply === "team" ? (
+ > + Loading… +
- Go Back + + Go Back +
+ ) : ( +
Error: Invalid application type
) - :
Error: Invalid application type
}
diff --git a/src/pages/apply/index.astro b/src/pages/apply/index.astro index 7641f98..36a7469 100644 --- a/src/pages/apply/index.astro +++ b/src/pages/apply/index.astro @@ -1,5 +1,5 @@ --- -import Layout from "@layout/layout.astro"; +import Layout from "@/layouts/layout.astro"; --- Staff Applications + >Staff Applications
Team Applications + >Team Applications

diff --git a/src/pages/community.astro b/src/pages/community.astro index 1fccb5b..ca034a7 100644 --- a/src/pages/community.astro +++ b/src/pages/community.astro @@ -1,5 +1,5 @@ --- -import Layout from "@layout/layout.astro"; +import Layout from "@/layouts/layout.astro"; const socials = [ { diff --git a/src/pages/index.astro b/src/pages/index.astro index 9cb8231..d584efe 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,7 +1,7 @@ --- -import CustomImage from "@component/CustomImage.astro"; -import HeroImage from "@component/HeroImage.astro"; -import Layout from "@layout/layout.astro"; +import CustomImage from "@/componentss/CustomImage.astro"; +import HeroImage from "@/componentss/HeroImage.astro"; +import Layout from "@/layouts/layout.astro"; --- @@ -7,15 +7,17 @@ import Layout from "@layout/layout.astro";
diff --git a/src/pages/news/[...slug].astro b/src/pages/news/[...slug].astro index 573a865..64a2cf9 100644 --- a/src/pages/news/[...slug].astro +++ b/src/pages/news/[...slug].astro @@ -1,14 +1,14 @@ --- -import Layout from "@layout/newspost.astro"; +import Layout from "@/layouts/newspost.astro"; import { getCollection } from "astro:content"; import type { CollectionEntry } from "astro:content"; export async function getStaticPaths() { - const posts = await getCollection("news"); - return posts.map((post) => ({ - params: { slug: post.slug }, - props: { ...post }, - })); + const posts = await getCollection("news"); + return posts.map((post) => ({ + params: { slug: post.slug }, + props: { ...post }, + })); } type Props = CollectionEntry<"news">; const post = Astro.props; diff --git a/src/pages/news/index.astro b/src/pages/news/index.astro index 95373a5..94c539e 100644 --- a/src/pages/news/index.astro +++ b/src/pages/news/index.astro @@ -1,6 +1,6 @@ --- import { Image } from "astro:assets"; -import Layout from "@layout/layout.astro"; +import Layout from "@/layouts/layout.astro"; import { getCollection } from "astro:content"; const newsitems = await getCollection("news"); --- diff --git a/src/pages/readme.mdx b/src/pages/readme.mdx index 258808f..ef38028 100644 --- a/src/pages/readme.mdx +++ b/src/pages/readme.mdx @@ -1,4 +1,4 @@ -import Layout from "@layout/layout.astro"; +import Layout from "@/layouts/layout.astro"; diff --git a/src/pages/resources.astro b/src/pages/resources.astro index 33b67b6..f48c654 100644 --- a/src/pages/resources.astro +++ b/src/pages/resources.astro @@ -1,5 +1,5 @@ --- -import Layout from "@layout/layout.astro"; +import Layout from "@/layouts/layout.astro"; --- diff --git a/src/pages/staffhandbook-13-4-24.mdx b/src/pages/staffhandbook-13-4-24.mdx index 55c68c3..4552c43 100644 --- a/src/pages/staffhandbook-13-4-24.mdx +++ b/src/pages/staffhandbook-13-4-24.mdx @@ -1,4 +1,4 @@ -import Layout from "@layout/documents.astro"; +import Layout from "@/layouts/documents.astro"; diff --git a/src/pages/terms.astro b/src/pages/terms.astro index 9134c95..7a4dff5 100644 --- a/src/pages/terms.astro +++ b/src/pages/terms.astro @@ -1,5 +1,5 @@ --- -import Layout from "@layout/documents.astro"; +import Layout from "@/layouts/documents.astro"; const updated = "5/9/2024"; --- diff --git a/tsconfig.json b/tsconfig.json index ffcd549..dc1739d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,24 +8,12 @@ ], "baseUrl": ".", "paths": { - "@layout/*": [ - "src/layouts/*" - ], - "@component/*": [ - "src/components/*" - ], - "@scripts/*": [ - "src/scripts/*" - ], - "@styles/*": [ - "src/styles/*" - ], - "@assets/*": [ - "src/assets/*" + "@/*": [ + "src" ] }, "types": [ "bun-types" ] } -} +} \ No newline at end of file