add page titles
This commit is contained in:
@@ -12,7 +12,7 @@ function addStyleResource(rule) {
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
siteName: 'tiptap',
|
siteName: 'tiptap',
|
||||||
titleTemplate: '%s',
|
titleTemplate: '%s | tiptap',
|
||||||
port: 3000,
|
port: 3000,
|
||||||
plugins: [
|
plugins: [
|
||||||
{
|
{
|
||||||
@@ -20,7 +20,7 @@ module.exports = {
|
|||||||
options: {
|
options: {
|
||||||
typeName: 'DocPage',
|
typeName: 'DocPage',
|
||||||
baseDir: './src/docPages',
|
baseDir: './src/docPages',
|
||||||
template: './src/templates/DocPage',
|
template: './src/templates/DocPage/index.vue',
|
||||||
index: './introduction',
|
index: './introduction',
|
||||||
plugins: [
|
plugins: [
|
||||||
'@gridsome/remark-prismjs',
|
'@gridsome/remark-prismjs',
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
---
|
||||||
|
title: Renderless rich-text editor
|
||||||
|
---
|
||||||
|
|
||||||
:::error Don’t try this at home
|
:::error Don’t try this at home
|
||||||
Nothing here is production-ready, don’t use it anywhere.
|
Nothing here is production-ready, don’t use it anywhere.
|
||||||
:::
|
:::
|
||||||
|
|||||||
@@ -6,4 +6,42 @@
|
|||||||
</Layout>
|
</Layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<page-query>
|
||||||
|
query($path: String!) {
|
||||||
|
docPage(path: $path) {
|
||||||
|
id
|
||||||
|
title
|
||||||
|
fileInfo {
|
||||||
|
path
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</page-query>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
metaInfo() {
|
||||||
|
return {
|
||||||
|
title: this.$page?.docPage?.title,
|
||||||
|
meta: [
|
||||||
|
/* OpenGraph */
|
||||||
|
{
|
||||||
|
property: 'og:title',
|
||||||
|
content: this.$page?.docPage?.title,
|
||||||
|
},
|
||||||
|
/* Twitter */
|
||||||
|
{
|
||||||
|
name: 'twitter:title',
|
||||||
|
content: this.$page?.docPage?.title,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'twitter:site',
|
||||||
|
content: '@_ueberdosis',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<style lang="scss" src="./style.scss" scoped></style>
|
<style lang="scss" src="./style.scss" scoped></style>
|
||||||
|
|||||||
Reference in New Issue
Block a user