Skip to content

Commit

Permalink
✨ support customer meta
Browse files Browse the repository at this point in the history
  • Loading branch information
XiYang6666 committed Aug 23, 2024
1 parent 1fad83c commit 51e4c45
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ NUXT_SOCIALS = {"github":{"link":"https://github.com/","icon":"fa-brands fa-gith
NUXT_KEYWORDS = ["main page"]

NUXT_IMAGE_HOSTING = false
NUXT_IMAGE_LINKS = []
NUXT_IMAGE_LINKS = []

NUXT_META = [{"name":"test","content","a test meta"}]
3 changes: 3 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,14 @@ const socials = useState(() => config.socials as Record<string, { link: string;
const keywords = useState(() => config.keywords);
const meta = useState(() => config.meta as Record<string, string>[]);
useHead({
title: config.title,
meta: [
{ name: "description", content: `${hitokoto.value}\n${description.value}` },
{ hid: "keywords", name: "keywords", content: keywords.value.join(", ") },
...meta.value,
],
link: [
{
Expand Down
1 change: 1 addition & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ export default defineNuxtConfig({
keywords: ["main page"],
imageHosting: false,
imageLinks: [],
meta: [],
},
});

0 comments on commit 51e4c45

Please sign in to comment.