mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-17 18:00:34 +03:00
5eaa0ab5b6
support slots for head/body make config fully external (while providing defaults users can use) type fixes
46 lines
729 B
TypeScript
46 lines
729 B
TypeScript
export interface ConfigOption {
|
|
tag?: string
|
|
to?: string
|
|
group?: boolean
|
|
keyAttribute?: string
|
|
valueAttribute?: string
|
|
nameless?: boolean
|
|
namespaced?: boolean
|
|
namespacedAttribute?: boolean
|
|
}
|
|
|
|
export interface Config {
|
|
[key: string]: ConfigOption
|
|
}
|
|
|
|
const defaultConfig: Config = {
|
|
body: {
|
|
tag: 'script',
|
|
to: 'body'
|
|
},
|
|
base: {
|
|
valueAttribute: 'href'
|
|
},
|
|
charset: {
|
|
tag: 'meta',
|
|
nameless: true,
|
|
valueAttribute: 'charset'
|
|
},
|
|
description: {
|
|
tag: 'meta'
|
|
},
|
|
og: {
|
|
group: true,
|
|
namespacedAttribute: true,
|
|
tag: 'meta',
|
|
keyAttribute: 'property'
|
|
},
|
|
twitter: {
|
|
group: true,
|
|
namespacedAttribute: true,
|
|
tag: 'meta'
|
|
}
|
|
}
|
|
|
|
export { defaultConfig }
|