From a34fdbc58a4281b0eb77ebb19271adc4466e18ae Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Sat, 13 Feb 2021 20:12:43 +0100 Subject: [PATCH] initial vuepress --- .npmignore | 12 ++++ package.json | 19 ++++++ src/.vuepress/components/Foo/Bar.vue | 15 +++++ src/.vuepress/components/OtherComponent.vue | 3 + src/.vuepress/components/demo-component.vue | 15 +++++ src/.vuepress/config.js | 70 +++++++++++++++++++++ src/.vuepress/enhanceApp.js | 14 +++++ src/.vuepress/styles/index.styl | 8 +++ src/.vuepress/styles/palette.styl | 10 +++ src/config/README.md | 15 +++++ src/guide/README.md | 5 ++ src/guide/using-vue.md | 9 +++ src/index.md | 15 +++++ 13 files changed, 210 insertions(+) create mode 100644 .npmignore create mode 100644 package.json create mode 100644 src/.vuepress/components/Foo/Bar.vue create mode 100644 src/.vuepress/components/OtherComponent.vue create mode 100644 src/.vuepress/components/demo-component.vue create mode 100644 src/.vuepress/config.js create mode 100644 src/.vuepress/enhanceApp.js create mode 100644 src/.vuepress/styles/index.styl create mode 100644 src/.vuepress/styles/palette.styl create mode 100644 src/config/README.md create mode 100644 src/guide/README.md create mode 100644 src/guide/using-vue.md create mode 100644 src/index.md diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..595e215 --- /dev/null +++ b/.npmignore @@ -0,0 +1,12 @@ +pids +logs +node_modules +npm-debug.log +coverage/ +run +dist +.DS_Store +.nyc_output +.basement +config.local.js +basement_dist diff --git a/package.json b/package.json new file mode 100644 index 0000000..1c686e9 --- /dev/null +++ b/package.json @@ -0,0 +1,19 @@ +{ + "name": "@lfk/docs-de", + "version": "0.0.1", + "description": "The german documentation for the lfk", + "main": "index.js", + "authors": { + "name": "", + "email": "" + }, + "repository": "/@lfk/docs-de", + "scripts": { + "dev": "vuepress dev src", + "build": "vuepress build src" + }, + "license": "MIT", + "devDependencies": { + "vuepress": "^1.5.3" + } +} diff --git a/src/.vuepress/components/Foo/Bar.vue b/src/.vuepress/components/Foo/Bar.vue new file mode 100644 index 0000000..7ee8286 --- /dev/null +++ b/src/.vuepress/components/Foo/Bar.vue @@ -0,0 +1,15 @@ + + + diff --git a/src/.vuepress/components/OtherComponent.vue b/src/.vuepress/components/OtherComponent.vue new file mode 100644 index 0000000..1d97c7c --- /dev/null +++ b/src/.vuepress/components/OtherComponent.vue @@ -0,0 +1,3 @@ + diff --git a/src/.vuepress/components/demo-component.vue b/src/.vuepress/components/demo-component.vue new file mode 100644 index 0000000..7d49de7 --- /dev/null +++ b/src/.vuepress/components/demo-component.vue @@ -0,0 +1,15 @@ + + + diff --git a/src/.vuepress/config.js b/src/.vuepress/config.js new file mode 100644 index 0000000..6fbcd98 --- /dev/null +++ b/src/.vuepress/config.js @@ -0,0 +1,70 @@ +const { description } = require('../../package') + +module.exports = { + /** + * Ref:https://v1.vuepress.vuejs.org/config/#title + */ + title: 'Vuepress Docs Boilerplate', + /** + * Ref:https://v1.vuepress.vuejs.org/config/#description + */ + description: description, + + /** + * Extra tags to be injected to the page HTML `` + * + * ref:https://v1.vuepress.vuejs.org/config/#head + */ + head: [ + ['meta', { name: 'theme-color', content: '#3eaf7c' }], + ['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }], + ['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }] + ], + + /** + * Theme configuration, here is the default theme configuration for VuePress. + * + * ref:https://v1.vuepress.vuejs.org/theme/default-theme-config.html + */ + themeConfig: { + repo: '', + editLinks: false, + docsDir: '', + editLinkText: '', + lastUpdated: false, + nav: [ + { + text: 'Guide', + link: '/guide/', + }, + { + text: 'Config', + link: '/config/' + }, + { + text: 'VuePress', + link: 'https://v1.vuepress.vuejs.org' + } + ], + sidebar: { + '/guide/': [ + { + title: 'Guide', + collapsable: false, + children: [ + '', + 'using-vue', + ] + } + ], + } + }, + + /** + * Apply plugins,ref:https://v1.vuepress.vuejs.org/zh/plugin/ + */ + plugins: [ + '@vuepress/plugin-back-to-top', + '@vuepress/plugin-medium-zoom', + ] +} diff --git a/src/.vuepress/enhanceApp.js b/src/.vuepress/enhanceApp.js new file mode 100644 index 0000000..8452a86 --- /dev/null +++ b/src/.vuepress/enhanceApp.js @@ -0,0 +1,14 @@ +/** + * Client app enhancement file. + * + * https://v1.vuepress.vuejs.org/guide/basic-config.html#app-level-enhancements + */ + +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 +}) => { + // ...apply enhancements for the site. +} diff --git a/src/.vuepress/styles/index.styl b/src/.vuepress/styles/index.styl new file mode 100644 index 0000000..420feb9 --- /dev/null +++ b/src/.vuepress/styles/index.styl @@ -0,0 +1,8 @@ +/** + * Custom Styles here. + * + * ref:https://v1.vuepress.vuejs.org/config/#index-styl + */ + +.home .hero img + max-width 450px!important diff --git a/src/.vuepress/styles/palette.styl b/src/.vuepress/styles/palette.styl new file mode 100644 index 0000000..6490cb3 --- /dev/null +++ b/src/.vuepress/styles/palette.styl @@ -0,0 +1,10 @@ +/** + * Custom palette here. + * + * ref:https://v1.vuepress.vuejs.org/zh/config/#palette-styl + */ + +$accentColor = #3eaf7c +$textColor = #2c3e50 +$borderColor = #eaecef +$codeBgColor = #282c34 diff --git a/src/config/README.md b/src/config/README.md new file mode 100644 index 0000000..63a04b9 --- /dev/null +++ b/src/config/README.md @@ -0,0 +1,15 @@ +--- +sidebar: auto +--- + +# Config + +## foo + +- Type: `string` +- Default: `/` + +## bar + +- Type: `string` +- Default: `/` diff --git a/src/guide/README.md b/src/guide/README.md new file mode 100644 index 0000000..fc82aec --- /dev/null +++ b/src/guide/README.md @@ -0,0 +1,5 @@ +# Introduction + +VuePress is composed of two parts: a [minimalistic static site generator](https://github.com/vuejs/vuepress/tree/master/packages/%40vuepress/core) with a Vue-powered [theming system](https://v1.vuepress.vuejs.org/theme/) and [Plugin API](https://v1.vuepress.vuejs.org/plugin/), and a [default theme](https://v1.vuepress.vuejs.org/theme/default-theme-config.html) optimized for writing technical documentation. It was created to support the documentation needs of Vue's own sub projects. + +Each page generated by VuePress has its own pre-rendered static HTML, providing great loading performance and is SEO-friendly. Once the page is loaded, however, Vue takes over the static content and turns it into a full Single-Page Application (SPA). Additional pages are fetched on demand as the user navigates around the site. diff --git a/src/guide/using-vue.md b/src/guide/using-vue.md new file mode 100644 index 0000000..71ac45b --- /dev/null +++ b/src/guide/using-vue.md @@ -0,0 +1,9 @@ +# Using Vue in Markdown + +## Browser API Access Restrictions + +Because VuePress applications are server-rendered in Node.js when generating static builds, any Vue usage must conform to the [universal code requirements](https://ssr.vuejs.org/en/universal.html). In short, make sure to only access Browser / DOM APIs in `beforeMount` or `mounted` hooks. + +If you are using or demoing components that are not SSR friendly (for example containing custom directives), you can wrap them inside the built-in `` component: + +## diff --git a/src/index.md b/src/index.md new file mode 100644 index 0000000..f425832 --- /dev/null +++ b/src/index.md @@ -0,0 +1,15 @@ +--- +home: true +heroImage: https://v1.vuepress.vuejs.org/hero.png +tagline: The german documentation for the lfk +actionText: Quick Start → +actionLink: /guide/ +features: +- title: Feature 1 Title + details: Feature 1 Description +- title: Feature 2 Title + details: Feature 2 Description +- title: Feature 3 Title + details: Feature 3 Description +footer: Made by with ❤️ +---