add og images, add json and xml feed, fix minor issues

This commit is contained in:
Hans Pagel
2021-07-10 22:51:06 +02:00
parent 2e40a827fb
commit 2fefcf31da
15 changed files with 298 additions and 171 deletions

View File

@@ -8,7 +8,7 @@ import App from '~/layouts/App'
Prism.manual = true
export default function (Vue) {
export default function (Vue, { router, head }) {
// fix docsearch
if (typeof window === 'object' && !window.process) {
window.process = {
@@ -18,6 +18,29 @@ export default function (Vue) {
}
}
head.link.push({
rel: 'alternate',
type: 'application/rss+xml',
title: 'tiptap blog',
href: 'https://www.tiptap.dev/feed.xml',
})
head.link.push({
rel: 'alternate',
type: 'application/json',
title: 'tiptap blog',
href: 'https://www.tiptap.dev/feed.json',
})
router.beforeEach((to, _from, next) => {
head.meta.push({
key: 'og:url',
name: 'og:url',
content: `https://www.tiptap.dev/${to.path}`,
})
next()
})
Vue.use(PortalVue)
Vue.directive('resize', {