mirror of
https://github.com/xHyroM/website.git
synced 2024-12-22 12:31:06 +01:00
feat: add @scripts resolve alias
This commit is contained in:
parent
49546bed12
commit
134f0ce564
5 changed files with 11 additions and 5 deletions
|
@ -50,6 +50,7 @@ export default defineConfig({
|
|||
"~": resolve(__dirname, "./src"),
|
||||
"@pages": resolve(__dirname, "./src/pages"),
|
||||
"@assets": resolve(__dirname, "./src/assets"),
|
||||
"@scripts": resolve(__dirname, "./src/scripts"),
|
||||
"@layouts": resolve(__dirname, "./src/layouts"),
|
||||
"@components": resolve(__dirname, "./src/components"),
|
||||
},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="snow-container absolute top-0 left-0 z-[-1000] h-full w-full"></div>
|
||||
<div class="snow-container absolute left-0 top-0 z-[-1000] h-full w-full"></div>
|
||||
|
||||
<script>
|
||||
import "../../scripts/snow.js";
|
||||
import "@scripts/snow.js";
|
||||
</script>
|
||||
|
|
|
@ -43,7 +43,7 @@ const { title, description, keywords, schemaOrg } = {
|
|||
<slot />
|
||||
|
||||
<script>
|
||||
import "../scripts/menu.ts";
|
||||
import "@scripts/menu.ts";
|
||||
</script>
|
||||
<style is:global>
|
||||
::-webkit-scrollbar {
|
||||
|
|
|
@ -8,7 +8,11 @@ const item = Astro.props;
|
|||
const currentPage = new URL(Astro.request.url).pathname;
|
||||
---
|
||||
|
||||
<Layout title={`Docs - ${item.content.title}`} description={item.content.description} url={`https://xhyrom.dev${item.url}`}>
|
||||
<Layout
|
||||
title={`Docs - ${item.content.title}`}
|
||||
description={item.content.description}
|
||||
url={`https://xhyrom.dev${item.url}`}
|
||||
>
|
||||
<Navbar />
|
||||
|
||||
<div class="grid grid-cols-12">
|
||||
|
@ -38,5 +42,5 @@ const currentPage = new URL(Astro.request.url).pathname;
|
|||
</Layout>
|
||||
|
||||
<script>
|
||||
import "../../scripts/sidebarToggle.js";
|
||||
import "@scripts/sidebarToggle.js";
|
||||
</script>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"~/*": ["src/*"],
|
||||
"@pages/*": ["src/pages/*"],
|
||||
"@assets/*": ["src/assets"],
|
||||
"@scripts/*": ["src/scripts"],
|
||||
"@layouts/*": ["src/layouts/*"],
|
||||
"@components/*": ["src/components/*"]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue