diff --git a/docs/.vuepress/components/BasicExample.vue b/docs/.vuepress/components/BasicExample.vue new file mode 100644 index 0000000..78776be --- /dev/null +++ b/docs/.vuepress/components/BasicExample.vue @@ -0,0 +1,20 @@ + + + diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 8ed2b82..59ef7ba 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -1,31 +1,50 @@ module.exports = { - plugins: [ - require('./plugin.js') + head: [ + // [ + // "link", + // { + // rel: "stylesheet", + // type: "text/css", + // href: "https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.1/mapbox-gl.css" + // } + // ], + [ + "script", + { + src: "https://unpkg.com/quill" + } + ], + [ + "script", + { + src: "https://unpkg.com/vue2-editor@alpha" + } + ] ], + plugins: [require("./plugin.js")], locales: { - '/': { - lang: 'en-US', - title: 'Vue2Editor', - description: 'Vue2Editor for Vue.js' + "/": { + lang: "en-US", + title: "Vue2Editor", + description: "Vue2Editor for Vue.js" } }, themeConfig: { - repo: 'David Royer/vue2-editor', - docsDir: 'docs', + repo: "David Royer/vue2-editor", + docsDir: "docs", locales: { - '/': { - label: 'English', - selectText: 'Languages', - editLinkText: 'Edit this page on GitHub', - nav: [{ - text: 'Release Notes', - link: 'https://github.com/David Royer/vue2-editor/releases' - }], - sidebar: [ - '/installation.md', - '/started.md', - ] + "/": { + label: "English", + selectText: "Languages", + editLinkText: "Edit this page on GitHub", + nav: [ + { + text: "Release Notes", + link: "https://github.com/David Royer/vue2-editor/releases" + } + ], + sidebar: ["/installation.md", "/started.md", "/usage.md"] } } } -} +}; diff --git a/docs/.vuepress/enhanceApp.js b/docs/.vuepress/enhanceApp.js new file mode 100644 index 0000000..589e48d --- /dev/null +++ b/docs/.vuepress/enhanceApp.js @@ -0,0 +1,13 @@ +export default ({ + Vue, // the version of Vue being used in the VuePress app + options, // the options for the root Vue instance + router, // the router instance for the app + siteData // site metadata +}) => { + // if (window !== undefined) { + // console.log("FROM ENHANCE: ", Vue2Editor); + // Vue.use(Vue2Editor); + // Vue.prototype.$Editor = Vue2Editor; + // } + // ...apply enhancements to the app +}; diff --git a/docs/.vuepress/plugin.js b/docs/.vuepress/plugin.js index f58244b..9b4a113 100644 --- a/docs/.vuepress/plugin.js +++ b/docs/.vuepress/plugin.js @@ -1,7 +1,7 @@ -const { version } = require('../../package.json') +const { version } = require("../../package.json"); module.exports = (/*options, ctx*/) => ({ - async enhanceAppFiles () { + async enhanceAppFiles() { const code = `export default ({ Vue }) => { Vue.mixin({ computed: { @@ -10,10 +10,12 @@ module.exports = (/*options, ctx*/) => ({ } } }) -}` - return [{ - name: 'vuepress-plugin-vue-cli-plugin-p11n', - content: code - }] +}`; + return [ + { + name: "vuepress-plugin-vue-cli-plugin-p11n", + content: code + } + ]; } -}) +}); diff --git a/docs/usage.md b/docs/usage.md new file mode 100644 index 0000000..177a2fb --- /dev/null +++ b/docs/usage.md @@ -0,0 +1,11 @@ +# Usage + +## Basic Example + + + + + +