move docs to own folder
This commit is contained in:
25
docs/src/pages/Index.vue
Normal file
25
docs/src/pages/Index.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<Layout>
|
||||
|
||||
<div v-for="edge in $static.allPost.edges" :key="edge.node.id">
|
||||
<g-link :to="edge.node.path">
|
||||
{{ edge.node.title }}
|
||||
</g-link>
|
||||
</div>
|
||||
|
||||
</Layout>
|
||||
</template>
|
||||
|
||||
<static-query>
|
||||
query {
|
||||
allPost {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
title
|
||||
path
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</static-query>
|
||||
5
docs/src/pages/README.md
Normal file
5
docs/src/pages/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
Pages are usually used for normal pages or for listing items from a GraphQL collection.
|
||||
Add .vue files here to create pages. For example **About.vue** will be **site.com/about**.
|
||||
Learn more about pages: https://gridsome.org/docs/pages/
|
||||
|
||||
You can delete this file.
|
||||
45
docs/src/pages/tests/Basic.vue
Normal file
45
docs/src/pages/tests/Basic.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<Layout>
|
||||
<editor-content :editor="editor" />
|
||||
</Layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Editor } from '@tiptap/core'
|
||||
import { EditorContent } from '@tiptap/vue'
|
||||
import Document from '@tiptap/extension-document'
|
||||
import Paragraph from '@tiptap/extension-paragraph'
|
||||
import Text from '@tiptap/extension-text'
|
||||
import History from '@tiptap/extension-history'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
EditorContent,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
editor: null,
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.editor = new Editor({
|
||||
element: this.$refs.editor,
|
||||
content: '<p>foo</p>',
|
||||
extensions: [
|
||||
new Document(),
|
||||
new Paragraph(),
|
||||
new Text(),
|
||||
new History(),
|
||||
],
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
this.editor.destroy()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user