Including Version number on about page
This commit is contained in:
parent
d774bb169b
commit
d150c6cdba
2 changed files with 20 additions and 1 deletions
|
@ -1,8 +1,20 @@
|
||||||
|
<script lang="ts">
|
||||||
|
import { version } from '$app/environment'
|
||||||
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>About</title>
|
<title>About</title>
|
||||||
<meta name="description" content="Information about this Website" />
|
<meta name="description" content="Information about this Website" />
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Version:
|
||||||
|
<a href="https://forgejo.neshweb.net/Neshweb-Sites/main-site/releases/tag/{version}" class="hover:underline">
|
||||||
|
{version}
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="text-background">Background</p>
|
<p class="text-background">Background</p>
|
||||||
<p class="text-foreground">Foreground</p>
|
<p class="text-foreground">Foreground</p>
|
||||||
<p class="text-muted">Muted</p>
|
<p class="text-muted">Muted</p>
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
import adapter from '@sveltejs/adapter-auto';
|
import adapter from '@sveltejs/adapter-auto';
|
||||||
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
||||||
import path from "path";
|
import { readFileSync } from 'node:fs';
|
||||||
|
import { fileURLToPath } from 'node:url';
|
||||||
|
|
||||||
|
const path = fileURLToPath(new URL('package.json', import.meta.url));
|
||||||
|
const pkg = JSON.parse(readFileSync(path, 'utf8'));
|
||||||
|
|
||||||
/** @type {import('@sveltejs/kit').Config} */
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
const config = {
|
const config = {
|
||||||
|
@ -13,6 +17,9 @@ const config = {
|
||||||
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
|
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
|
||||||
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
|
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
|
||||||
adapter: adapter(),
|
adapter: adapter(),
|
||||||
|
version: {
|
||||||
|
name: pkg.version
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue