more post support
This commit is contained in:
+2
-1
@@ -23,6 +23,7 @@
|
|||||||
"svelte": "^5.55.3",
|
"svelte": "^5.55.3",
|
||||||
"svelte-check": "^4.4.6",
|
"svelte-check": "^4.4.6",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
"vite": "^7.3.2"
|
"vite": "^7.3.2",
|
||||||
|
"vite-tsconfig-paths": "^6.1.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+55
@@ -49,6 +49,9 @@ importers:
|
|||||||
vite:
|
vite:
|
||||||
specifier: ^7.3.2
|
specifier: ^7.3.2
|
||||||
version: 7.3.2(@types/node@25.6.0)(sass@1.99.0)
|
version: 7.3.2(@types/node@25.6.0)(sass@1.99.0)
|
||||||
|
vite-tsconfig-paths:
|
||||||
|
specifier: ^6.1.1
|
||||||
|
version: 6.1.1(typescript@5.9.3)(vite@7.3.2(@types/node@25.6.0)(sass@1.99.0))
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
@@ -716,6 +719,15 @@ packages:
|
|||||||
resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==}
|
resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==}
|
||||||
engines: {node: '>= 0.6'}
|
engines: {node: '>= 0.6'}
|
||||||
|
|
||||||
|
debug@4.4.3:
|
||||||
|
resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==}
|
||||||
|
engines: {node: '>=6.0'}
|
||||||
|
peerDependencies:
|
||||||
|
supports-color: '*'
|
||||||
|
peerDependenciesMeta:
|
||||||
|
supports-color:
|
||||||
|
optional: true
|
||||||
|
|
||||||
deepmerge@4.3.1:
|
deepmerge@4.3.1:
|
||||||
resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==}
|
resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==}
|
||||||
engines: {node: '>=0.10.0'}
|
engines: {node: '>=0.10.0'}
|
||||||
@@ -760,6 +772,9 @@ packages:
|
|||||||
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
|
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
|
|
||||||
|
globrex@0.1.2:
|
||||||
|
resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==}
|
||||||
|
|
||||||
imagetools-core@9.1.0:
|
imagetools-core@9.1.0:
|
||||||
resolution: {integrity: sha512-xQjs+2vrxLnAjCq+omuNkd5UQTld9/bP8+YT0LyYTlKfuSQtgUBvqhUwGugzSAh6sCdN+LnROMuLswn5hZ9Fhg==}
|
resolution: {integrity: sha512-xQjs+2vrxLnAjCq+omuNkd5UQTld9/bP8+YT0LyYTlKfuSQtgUBvqhUwGugzSAh6sCdN+LnROMuLswn5hZ9Fhg==}
|
||||||
engines: {node: '>=20.0.0'}
|
engines: {node: '>=20.0.0'}
|
||||||
@@ -801,6 +816,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==}
|
resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==}
|
||||||
engines: {node: '>=10'}
|
engines: {node: '>=10'}
|
||||||
|
|
||||||
|
ms@2.1.3:
|
||||||
|
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
|
||||||
|
|
||||||
nanoid@3.3.11:
|
nanoid@3.3.11:
|
||||||
resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==}
|
resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==}
|
||||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||||
@@ -904,6 +922,16 @@ packages:
|
|||||||
resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==}
|
resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==}
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
|
|
||||||
|
tsconfck@3.1.6:
|
||||||
|
resolution: {integrity: sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w==}
|
||||||
|
engines: {node: ^18 || >=20}
|
||||||
|
hasBin: true
|
||||||
|
peerDependencies:
|
||||||
|
typescript: ^5.0.0
|
||||||
|
peerDependenciesMeta:
|
||||||
|
typescript:
|
||||||
|
optional: true
|
||||||
|
|
||||||
tslib@2.8.1:
|
tslib@2.8.1:
|
||||||
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
|
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
|
||||||
|
|
||||||
@@ -934,6 +962,11 @@ packages:
|
|||||||
resolution: {integrity: sha512-FwjApRNZyN+RucPW9Z9kf0dyzyi3r3zlDfrTnzHXNaYpmT3pZ5w//d6QkApy1iypbDm+3fq+Gwfv+PYA4j4uYw==}
|
resolution: {integrity: sha512-FwjApRNZyN+RucPW9Z9kf0dyzyi3r3zlDfrTnzHXNaYpmT3pZ5w//d6QkApy1iypbDm+3fq+Gwfv+PYA4j4uYw==}
|
||||||
engines: {node: '>=20.0.0'}
|
engines: {node: '>=20.0.0'}
|
||||||
|
|
||||||
|
vite-tsconfig-paths@6.1.1:
|
||||||
|
resolution: {integrity: sha512-2cihq7zliibCCZ8P9cKJrQBkfgdvcFkOOc3Y02o3GWUDLgqjWsZudaoiuOwO/gzTzy17cS5F7ZPo4bsnS4DGkg==}
|
||||||
|
peerDependencies:
|
||||||
|
vite: '*'
|
||||||
|
|
||||||
vite@7.3.2:
|
vite@7.3.2:
|
||||||
resolution: {integrity: sha512-Bby3NOsna2jsjfLVOHKes8sGwgl4TT0E6vvpYgnAYDIF/tie7MRaFthmKuHx1NSXjiTueXH3do80FMQgvEktRg==}
|
resolution: {integrity: sha512-Bby3NOsna2jsjfLVOHKes8sGwgl4TT0E6vvpYgnAYDIF/tie7MRaFthmKuHx1NSXjiTueXH3do80FMQgvEktRg==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
@@ -1425,6 +1458,10 @@ snapshots:
|
|||||||
|
|
||||||
cookie@0.6.0: {}
|
cookie@0.6.0: {}
|
||||||
|
|
||||||
|
debug@4.4.3:
|
||||||
|
dependencies:
|
||||||
|
ms: 2.1.3
|
||||||
|
|
||||||
deepmerge@4.3.1: {}
|
deepmerge@4.3.1: {}
|
||||||
|
|
||||||
detect-libc@2.1.2: {}
|
detect-libc@2.1.2: {}
|
||||||
@@ -1477,6 +1514,8 @@ snapshots:
|
|||||||
fsevents@2.3.3:
|
fsevents@2.3.3:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
|
globrex@0.1.2: {}
|
||||||
|
|
||||||
imagetools-core@9.1.0: {}
|
imagetools-core@9.1.0: {}
|
||||||
|
|
||||||
immutable@5.1.5:
|
immutable@5.1.5:
|
||||||
@@ -1516,6 +1555,8 @@ snapshots:
|
|||||||
|
|
||||||
mrmime@2.0.1: {}
|
mrmime@2.0.1: {}
|
||||||
|
|
||||||
|
ms@2.1.3: {}
|
||||||
|
|
||||||
nanoid@3.3.11: {}
|
nanoid@3.3.11: {}
|
||||||
|
|
||||||
node-addon-api@7.1.1:
|
node-addon-api@7.1.1:
|
||||||
@@ -1677,6 +1718,10 @@ snapshots:
|
|||||||
|
|
||||||
totalist@3.0.1: {}
|
totalist@3.0.1: {}
|
||||||
|
|
||||||
|
tsconfck@3.1.6(typescript@5.9.3):
|
||||||
|
optionalDependencies:
|
||||||
|
typescript: 5.9.3
|
||||||
|
|
||||||
tslib@2.8.1:
|
tslib@2.8.1:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
@@ -1715,6 +1760,16 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- rollup
|
- rollup
|
||||||
|
|
||||||
|
vite-tsconfig-paths@6.1.1(typescript@5.9.3)(vite@7.3.2(@types/node@25.6.0)(sass@1.99.0)):
|
||||||
|
dependencies:
|
||||||
|
debug: 4.4.3
|
||||||
|
globrex: 0.1.2
|
||||||
|
tsconfck: 3.1.6(typescript@5.9.3)
|
||||||
|
vite: 7.3.2(@types/node@25.6.0)(sass@1.99.0)
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
- typescript
|
||||||
|
|
||||||
vite@7.3.2(@types/node@25.6.0)(sass@1.99.0):
|
vite@7.3.2(@types/node@25.6.0)(sass@1.99.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
esbuild: 0.27.7
|
esbuild: 0.27.7
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<script lang="ts" module>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
let props = $props();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<h1>meow</h1>
|
||||||
|
{@render props.children?.()}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<script module lang="ts">
|
||||||
|
let posts = import.meta.glob("/src/routes/posts/*.md", { eager: true });
|
||||||
|
type Post = {
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
catagory: string;
|
||||||
|
date: Date;
|
||||||
|
updated: Date;
|
||||||
|
tags: [string];
|
||||||
|
};
|
||||||
|
export function getPosts(): Promise<Array<Post>> {
|
||||||
|
Object.entries(posts).map(([path, module]) => {
|
||||||
|
console.log(path, module.metadata);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<script lang="ts">
|
|
||||||
// You can import components or define shared logic here
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- This renders the content of the current page (e.g., an .svx file) -->
|
|
||||||
<slot />
|
|
||||||
|
|
||||||
<footer>© 2026 My Site</footer>
|
|
||||||
@@ -1,13 +1,12 @@
|
|||||||
<script lang="ts" module>
|
<script lang="ts" module>
|
||||||
import json from "./dic.json";
|
import json from "./dic.json";
|
||||||
const imageModules = import.meta.glob(
|
const imageModules = import.meta.glob(
|
||||||
"./imgs/*.{avif,AVIF,heif,HEIF,jpeg,gif,GIF,JPEG,jpg,JPG,png,PNG,tiff,TIFF,webp,WEBP}",
|
"./imgs/*.{avif,AVIF,heif,HEIF,jpeg,JPEG,jpg,JPG,png,PNG,tiff,TIFF,webp,WEBP}",
|
||||||
{
|
{
|
||||||
eager: true,
|
eager: true,
|
||||||
import: "default",
|
import: "default",
|
||||||
query: {
|
query: {
|
||||||
enhanced: true,
|
enhanced: true,
|
||||||
format: "gif",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -4,8 +4,11 @@
|
|||||||
import { SidebarRight } from "$lib/sidebar/sidebar_right.svelte";
|
import { SidebarRight } from "$lib/sidebar/sidebar_right.svelte";
|
||||||
import { WebButtons } from "$lib/web_buttons/webButtons.svelte";
|
import { WebButtons } from "$lib/web_buttons/webButtons.svelte";
|
||||||
import { NavBar } from "$lib/nav.svelte";
|
import { NavBar } from "$lib/nav.svelte";
|
||||||
|
import PostHelpers, { getPosts } from "$lib/PostHelpers.svelte";
|
||||||
let { children } = $props();
|
let { children } = $props();
|
||||||
|
|
||||||
export const prerender = true;
|
export const prerender = true;
|
||||||
|
getPosts();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
|
|||||||
@@ -8,21 +8,6 @@
|
|||||||
--accent-2: #66232e;
|
--accent-2: #66232e;
|
||||||
--accent-3: #44131a;
|
--accent-3: #44131a;
|
||||||
}
|
}
|
||||||
nav {
|
|
||||||
width: 100%;
|
|
||||||
height: 32px;
|
|
||||||
background-color: var(--accent-2);
|
|
||||||
border: 3px, outset, var(--accent-3);
|
|
||||||
align-content: center;
|
|
||||||
font-size: 18px;
|
|
||||||
a {
|
|
||||||
padding: 5px;
|
|
||||||
color: #9f8083;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
color: #043b2f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
body {
|
body {
|
||||||
background-image: url("/bg.png");
|
background-image: url("/bg.png");
|
||||||
margin: 40px auto;
|
margin: 40px auto;
|
||||||
|
|||||||
@@ -4,7 +4,26 @@ import { mdsvex } from "mdsvex";
|
|||||||
/** @type {import('@sveltejs/kit').Config} */
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
const config = {
|
const config = {
|
||||||
extensions: [".svelte", ".md"],
|
extensions: [".svelte", ".md"],
|
||||||
|
preprocess: [
|
||||||
|
mdsvex({
|
||||||
|
// The default mdsvex extension is .svx; this overrides that.
|
||||||
|
extensions: [".md"],
|
||||||
|
|
||||||
|
layout: {
|
||||||
|
_: 'src/lib/Layout.svelte',
|
||||||
|
},
|
||||||
|
|
||||||
|
// Adds IDs to headings, and anchor links to those IDs. Note: must stay in this order to work.
|
||||||
|
rehypePlugins: [
|
||||||
|
// rehypeSlug,
|
||||||
|
// rehypeAutolinkHeadings,
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
],
|
||||||
kit: {
|
kit: {
|
||||||
|
alias: {
|
||||||
|
'src': './src/',
|
||||||
|
},
|
||||||
files: {
|
files: {
|
||||||
assets: "./static",
|
assets: "./static",
|
||||||
},
|
},
|
||||||
@@ -18,20 +37,6 @@ const config = {
|
|||||||
strict: true
|
strict: true
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
preprocess: [
|
|
||||||
mdsvex({
|
|
||||||
// The default mdsvex extension is .svx; this overrides that.
|
|
||||||
extensions: [".md"],
|
|
||||||
|
|
||||||
layout: "$lib/md_layout.svelte",
|
|
||||||
|
|
||||||
// Adds IDs to headings, and anchor links to those IDs. Note: must stay in this order to work.
|
|
||||||
rehypePlugins: [
|
|
||||||
// rehypeSlug,
|
|
||||||
// rehypeAutolinkHeadings,
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
+7
-1
@@ -3,6 +3,11 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"rewriteRelativeImportExtensions": true,
|
"rewriteRelativeImportExtensions": true,
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
|
// "baseUrl": ".",
|
||||||
|
// "paths": {
|
||||||
|
// "$app/*": [".svelte/dev/runtime/app/*", ".svelte/build/runtime/app/*"],
|
||||||
|
// "$lib/*": ["src/lib/*"]
|
||||||
|
// },
|
||||||
"checkJs": true,
|
"checkJs": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
@@ -11,7 +16,8 @@
|
|||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"moduleResolution": "bundler"
|
"moduleResolution": "bundler"
|
||||||
}
|
},
|
||||||
|
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"]
|
||||||
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
|
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
|
||||||
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
|
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
|
||||||
//
|
//
|
||||||
|
|||||||
+9
-2
@@ -1,9 +1,16 @@
|
|||||||
import { sveltekit } from "@sveltejs/kit/vite";
|
import { sveltekit } from "@sveltejs/kit/vite";
|
||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
import { enhancedImages } from '@sveltejs/enhanced-img';
|
import { enhancedImages } from '@sveltejs/enhanced-img';
|
||||||
|
import tsconfigPaths from 'vite-tsconfig-paths'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
// publicDir: "./meowmeowmeow",
|
// publicDir: "./meowmeowmeow",
|
||||||
plugins: [enhancedImages(), sveltekit(),
|
plugins: [enhancedImages(), sveltekit(), tsconfigPaths()],
|
||||||
],
|
build: {
|
||||||
|
},
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'src': './src/',
|
||||||
|
}
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user