mirror of
https://github.com/xHyroM/website.git
synced 2024-11-22 06:51:05 +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"),
|
"~": resolve(__dirname, "./src"),
|
||||||
"@pages": resolve(__dirname, "./src/pages"),
|
"@pages": resolve(__dirname, "./src/pages"),
|
||||||
"@assets": resolve(__dirname, "./src/assets"),
|
"@assets": resolve(__dirname, "./src/assets"),
|
||||||
|
"@scripts": resolve(__dirname, "./src/scripts"),
|
||||||
"@layouts": resolve(__dirname, "./src/layouts"),
|
"@layouts": resolve(__dirname, "./src/layouts"),
|
||||||
"@components": resolve(__dirname, "./src/components"),
|
"@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>
|
<script>
|
||||||
import "../../scripts/snow.js";
|
import "@scripts/snow.js";
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -43,7 +43,7 @@ const { title, description, keywords, schemaOrg } = {
|
||||||
<slot />
|
<slot />
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import "../scripts/menu.ts";
|
import "@scripts/menu.ts";
|
||||||
</script>
|
</script>
|
||||||
<style is:global>
|
<style is:global>
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
|
|
|
@ -8,7 +8,11 @@ const item = Astro.props;
|
||||||
const currentPage = new URL(Astro.request.url).pathname;
|
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 />
|
<Navbar />
|
||||||
|
|
||||||
<div class="grid grid-cols-12">
|
<div class="grid grid-cols-12">
|
||||||
|
@ -38,5 +42,5 @@ const currentPage = new URL(Astro.request.url).pathname;
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import "../../scripts/sidebarToggle.js";
|
import "@scripts/sidebarToggle.js";
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
"~/*": ["src/*"],
|
"~/*": ["src/*"],
|
||||||
"@pages/*": ["src/pages/*"],
|
"@pages/*": ["src/pages/*"],
|
||||||
"@assets/*": ["src/assets"],
|
"@assets/*": ["src/assets"],
|
||||||
|
"@scripts/*": ["src/scripts"],
|
||||||
"@layouts/*": ["src/layouts/*"],
|
"@layouts/*": ["src/layouts/*"],
|
||||||
"@components/*": ["src/components/*"]
|
"@components/*": ["src/components/*"]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue