add commit sha to footer
This commit is contained in:
parent
0c604f89ee
commit
bf504e0b26
@ -2,7 +2,7 @@ import { defineConfig } from "vitepress";
|
||||
import { withPwa } from "@vite-pwa/vitepress";
|
||||
import UnoCSS from "unocss/vite";
|
||||
import { presetUno, presetAttributify, presetIcons } from "unocss";
|
||||
import { meta } from "./constants";
|
||||
import { commitRef, meta } from "./constants";
|
||||
import { pwa } from "./pwa";
|
||||
import { generateMeta } from "./hooks/meta";
|
||||
|
||||
@ -62,6 +62,9 @@ export default defineConfig({
|
||||
},
|
||||
provider: "local",
|
||||
},
|
||||
footer: {
|
||||
message: `Made with ❤️ (${commitRef})`,
|
||||
},
|
||||
outline: "deep",
|
||||
logo: "/fmhy.ico",
|
||||
nav: [
|
||||
|
@ -5,3 +5,14 @@ export const meta = {
|
||||
hostname: "https://fmhy.pages.dev",
|
||||
keywords: ["stream", "movies", "gaming", "reading", "anime"],
|
||||
};
|
||||
|
||||
// Netlify to Cloudflare otherwise dev
|
||||
export const commitRef = process.env.COMMIT_REF
|
||||
? `<a href="https://github.com/fmhy/FMHYEdit/commit/${
|
||||
process.env.COMMIT_REF
|
||||
}">${process.env.COMMIT_REF.slice(0, 8)}</a>`
|
||||
: process.env.CF_PAGES_COMMIT_SHA
|
||||
? `<a href="https://github.com/fmhy/FMHYEdit/commit/${
|
||||
process.env.CF_PAGES_COMMIT_SHA
|
||||
}">${process.env.CF_PAGES_COMMIT_SHA.slice(0, 8)}</a>`
|
||||
: "dev";
|
||||
|
Loading…
Reference in New Issue
Block a user