From 20237f353b6eb3296f0aec934bbb8a73b7e5b3bd Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Fri, 28 Aug 2020 13:20:49 +0200 Subject: [PATCH] move everything around --- docs/gridsome.config.js | 1 + .../Installation}/index.vue | 0 .../BuildYourEditor}/index.vue | 0 docs/src/docPages/api/extensions/bold.md | 2 +- docs/src/docPages/api/extensions/italic.md | 2 +- docs/src/docPages/basic-vue-example.md | 15 ------------- .../installation.md | 2 +- .../upgrade-guide.md | 0 docs/src/docPages/guide/build-your-editor.md | 2 +- docs/src/docPages/guide/getting-started.md | 2 +- .../{getting-started => }/introduction.md | 4 +++- docs/src/docPages/renderless.md | 3 --- docs/src/layouts/App/index.vue | 3 +++ docs/src/links.yaml | 22 +++++++++---------- docs/src/pages/Index.vue | 5 ----- docs/src/templates/DocPage/style.scss | 6 ++--- 16 files changed, 26 insertions(+), 43 deletions(-) rename docs/src/demos/{VueSetup => General/Installation}/index.vue (100%) rename docs/src/demos/{HandleExtensions => Guide/BuildYourEditor}/index.vue (100%) delete mode 100644 docs/src/docPages/basic-vue-example.md rename docs/src/docPages/{getting-started => general}/installation.md (98%) rename docs/src/docPages/{getting-started => general}/upgrade-guide.md (100%) rename docs/src/docPages/{getting-started => }/introduction.md (77%) delete mode 100644 docs/src/docPages/renderless.md delete mode 100644 docs/src/pages/Index.vue diff --git a/docs/gridsome.config.js b/docs/gridsome.config.js index 8d653a08..e7d1d401 100644 --- a/docs/gridsome.config.js +++ b/docs/gridsome.config.js @@ -21,6 +21,7 @@ module.exports = { typeName: 'DocPage', baseDir: './src/docPages', template: './src/templates/DocPage', + index: './getting-started/introduction', plugins: [ '@gridsome/remark-prismjs', 'remark-container', diff --git a/docs/src/demos/VueSetup/index.vue b/docs/src/demos/General/Installation/index.vue similarity index 100% rename from docs/src/demos/VueSetup/index.vue rename to docs/src/demos/General/Installation/index.vue diff --git a/docs/src/demos/HandleExtensions/index.vue b/docs/src/demos/Guide/BuildYourEditor/index.vue similarity index 100% rename from docs/src/demos/HandleExtensions/index.vue rename to docs/src/demos/Guide/BuildYourEditor/index.vue diff --git a/docs/src/docPages/api/extensions/bold.md b/docs/src/docPages/api/extensions/bold.md index eb9ded60..b3380de5 100644 --- a/docs/src/docPages/api/extensions/bold.md +++ b/docs/src/docPages/api/extensions/bold.md @@ -21,4 +21,4 @@ The extension will generate the corresponding `` HTML tags when reading [packages/extension-bold/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-bold/) ## Usage - \ No newline at end of file + \ No newline at end of file diff --git a/docs/src/docPages/api/extensions/italic.md b/docs/src/docPages/api/extensions/italic.md index 701c6713..d41a4b0e 100644 --- a/docs/src/docPages/api/extensions/italic.md +++ b/docs/src/docPages/api/extensions/italic.md @@ -21,4 +21,4 @@ The extension will generate the corresponding `` HTML tags when reading cont [packages/extension-italic/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-italic/) ## Usage - + diff --git a/docs/src/docPages/basic-vue-example.md b/docs/src/docPages/basic-vue-example.md deleted file mode 100644 index 57c56584..00000000 --- a/docs/src/docPages/basic-vue-example.md +++ /dev/null @@ -1,15 +0,0 @@ -# Use tiptap with Vue.js - -tiptap is framework-agnostic and works with plain JavaScript, Vue.js and React. To use tiptap with Vue.js or one of the tools that are based on Vue.js like Nuxt.js or Gridsome, you’ll need the tiptap Vue.js adapter. Install it as an dependency in your project: - -```bash -# Install tiptap & Vue.js adapter with npm -npm install @tiptap/core @tiptap/starter-kit @tiptap/vue - -# Install tiptap & Vue.js adapter with Yarn -yarn add @tiptap/core @tiptap/starter-kit @tiptap/vue -``` - -Create a new Vue component (e. g. ``) and add the following content. That’s the shortest way to get tiptap up and running with Vue.js. No worries, you’ll be able to add more functionality soon. - - \ No newline at end of file diff --git a/docs/src/docPages/getting-started/installation.md b/docs/src/docPages/general/installation.md similarity index 98% rename from docs/src/docPages/getting-started/installation.md rename to docs/src/docPages/general/installation.md index eeedf432..06d78b73 100644 --- a/docs/src/docPages/getting-started/installation.md +++ b/docs/src/docPages/general/installation.md @@ -41,7 +41,7 @@ yarn add @tiptap/vue @tiptap/vue-starter-kit We even prepared a Vue.js starter kit for you. That should give you a good headstart. Create a new component and add the following content to get a basic version of tiptap: - + ## CodeSandbox diff --git a/docs/src/docPages/getting-started/upgrade-guide.md b/docs/src/docPages/general/upgrade-guide.md similarity index 100% rename from docs/src/docPages/getting-started/upgrade-guide.md rename to docs/src/docPages/general/upgrade-guide.md diff --git a/docs/src/docPages/guide/build-your-editor.md b/docs/src/docPages/guide/build-your-editor.md index 96929a1a..04b805bf 100644 --- a/docs/src/docPages/guide/build-your-editor.md +++ b/docs/src/docPages/guide/build-your-editor.md @@ -22,7 +22,7 @@ You are free to choose which parts of tiptap you want to use. Tiptap has support Note that `Document`, `Paragraph` and `Text` are required. Otherwise you won’t be able to add any plain text. - + That’s also the place where you can register custom extensions, which you or someone else built for tiptap. diff --git a/docs/src/docPages/guide/getting-started.md b/docs/src/docPages/guide/getting-started.md index a0206f5f..00dc0565 100644 --- a/docs/src/docPages/guide/getting-started.md +++ b/docs/src/docPages/guide/getting-started.md @@ -20,7 +20,7 @@ The `@tiptap/vue-starter-kit` includes a few basics you would probably need anyw Create a new Vue component (you can call it ``) and add the following content. This is the fastest way to get tiptap up and running with Vue.js. It will give you a very basic version of tiptap, without any buttons. No worries, you will be able to add more functionality soon. - + ::: warning Using with Nuxt.js If you are using Nuxt.js, note that tiptap needs to run in the client, not on the server. It’s required to wrap the editor in a `` tag. diff --git a/docs/src/docPages/getting-started/introduction.md b/docs/src/docPages/introduction.md similarity index 77% rename from docs/src/docPages/getting-started/introduction.md rename to docs/src/docPages/introduction.md index 7d14458e..6f02c362 100644 --- a/docs/src/docPages/getting-started/introduction.md +++ b/docs/src/docPages/introduction.md @@ -1,9 +1,11 @@ # Introduction - tiptap is a renderless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich-text editors that are already in use at many well-known companies such as *New York Times*, *The Guardian* or *Atlassian*. Although tiptap tries to hide most of the complexity of ProseMirror, it’s is built on top of its APIs and we strongly recommend you to read through the [ProseMirror Guide](https://ProseMirror.net/docs/guide/). You’ll have a better understanding of how everything works under the hood and get familiar with many terms and jargon used by tiptap. +## Renderless +The implementation of a text editor can be very specific for each use case. We don’t want to tell you what a menu should look like or where it should be rendered in the DOM. That’s why tiptap is renderless and comes without any CSS. You’ll have full control over markup and styling. + ## Who is using tiptap? - [GitLab](https://gitlab.com) - [Statamic CMS](https://statamic.com) diff --git a/docs/src/docPages/renderless.md b/docs/src/docPages/renderless.md deleted file mode 100644 index 6dc43113..00000000 --- a/docs/src/docPages/renderless.md +++ /dev/null @@ -1,3 +0,0 @@ -# Renderless - -The implementation of a text editor can be very specific for each use case. We don’t want to tell you what a menu should look like or where it should be rendered in the DOM. That’s why tiptap is renderless and comes without any CSS. You’ll have full control over markup and styling. diff --git a/docs/src/layouts/App/index.vue b/docs/src/layouts/App/index.vue index 8b32bc50..d7278c34 100644 --- a/docs/src/layouts/App/index.vue +++ b/docs/src/layouts/App/index.vue @@ -69,6 +69,9 @@ Edit this page on GitHub

+

+ Made with 🖤 by überdosis +

diff --git a/docs/src/links.yaml b/docs/src/links.yaml index 309b5345..a9d44398 100644 --- a/docs/src/links.yaml +++ b/docs/src/links.yaml @@ -1,28 +1,28 @@ -- title: Getting Started +- title: General items: - title: Introduction - link: /getting-started/introduction/ + link: / - title: Installation - link: /getting-started/installation/ + link: /general/installation - title: Upgrade Guide - link: /getting-started/upgrade-guide/ + link: /general/upgrade-guide - title: Guide items: - title: Getting started - link: /guide/getting-started/ + link: /guide/getting-started - title: Configuration - link: /guide/configuration/ + link: /guide/configuration - title: Build your editor - link: /guide/build-your-editor/ + link: /guide/build-your-editor - title: Custom styling - link: /guide/custom-styling/ + link: /guide/custom-styling - title: Get content - link: /guide/get-content/ + link: /guide/get-content - title: Custom extensions - link: /guide/custom-extensions/ + link: /guide/custom-extensions - title: Use Vue Components - link: /guide/use-vue-components/ + link: /guide/use-vue-components - title: Examples items: diff --git a/docs/src/pages/Index.vue b/docs/src/pages/Index.vue deleted file mode 100644 index 2164ae1a..00000000 --- a/docs/src/pages/Index.vue +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/docs/src/templates/DocPage/style.scss b/docs/src/templates/DocPage/style.scss index 7457935d..b7067efd 100644 --- a/docs/src/templates/DocPage/style.scss +++ b/docs/src/templates/DocPage/style.scss @@ -58,7 +58,7 @@ > * + * { margin-top: 0.5rem; - } + } li { position: relative; @@ -80,7 +80,7 @@ > * + * { margin-top: 0.5rem; - } + } li { position: relative; @@ -146,7 +146,7 @@ padding: 1rem; border: 2px solid rgba($colorBlack, 0.1); border-radius: 0.25rem; - + &.warning { border-color:#ffd8a8; background-color: #fff4e6;