diff --git a/src/routes/about/+page.svelte b/src/routes/about/+page.svelte index 9e4ee80..00a14c8 100644 --- a/src/routes/about/+page.svelte +++ b/src/routes/about/+page.svelte @@ -1,10 +1,16 @@
- About +
+ About + Version: {gitTagVersion} +

Alexandria is a reader and writer for curated publications (in Asciidoc), and will eventually also support long-form articles (Markdown) and wiki pages (Asciidoc). It is produced by the GitCitadel project team.

Please submit support issues on the project repo page and follow us on GitHub and Geyserfund.

@@ -53,4 +59,4 @@

Documentation

-
\ No newline at end of file + diff --git a/vite.config.ts b/vite.config.ts index b9ba52c..7a6e207 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,9 +1,26 @@ import { sveltekit } from "@sveltejs/kit/vite"; import { defineConfig } from "vite"; +import { execSync } from "child_process"; + +// Function to get the latest git tag +function getLatestGitTag() { + try { + // Get the latest git tag + const tag = execSync('git describe --tags --abbrev=0').toString().trim(); + return tag; + } catch (error) { + console.error("Failed to get git tag:", error); + return "unknown"; + } +} export default defineConfig({ plugins: [sveltekit()], test: { include: ['./tests/unit/**/*.unit-test.js'] + }, + define: { + // Expose the git tag as a global variable + 'import.meta.env.GIT_TAG': JSON.stringify(getLatestGitTag()) } });