From 772f92156e5d3bf7c3e475a0ee194fb18d609b97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucien=20B=C3=A9ni=C3=A9?= Date: Wed, 18 Apr 2018 13:19:55 -0400 Subject: [PATCH 1/3] feat: support toml config --- CHANGELOG.md | 21 +++++++++ docs/.vuepress/config.toml | 67 +++++++++++++++++++++++++++++ lib/default-theme/DropdownLink.vue | 5 ++- lib/default-theme/Layout.vue | 1 + lib/default-theme/NavLinks.vue | 8 ++-- lib/default-theme/SearchBox.vue | 16 ++++++- lib/default-theme/Sidebar.vue | 7 +-- lib/default-theme/styles/theme.styl | 28 +++++++++--- lib/dev.js | 5 ++- lib/markdown/slugify.js | 2 + lib/prepare.js | 31 ++++++++++++- lib/util/index.js | 3 +- lib/webpack/createBaseConfig.js | 2 +- lib/webpack/createServerConfig.js | 1 + package.json | 3 +- yarn.lock | 4 ++ 16 files changed, 181 insertions(+), 23 deletions(-) create mode 100644 docs/.vuepress/config.toml diff --git a/CHANGELOG.md b/CHANGELOG.md index 3294b4ea04..1b83f9f4a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,24 @@ + +## [0.6.1](https://github.com/vuejs/vuepress/compare/v0.6.0...v0.6.1) (2018-04-18) + + +### Bug Fixes + +* handle headers that start with numbers (fix [#121](https://github.com/vuejs/vuepress/issues/121)) ([ad83169](https://github.com/vuejs/vuepress/commit/ad83169)) +* make search locale-scoped (close [#128](https://github.com/vuejs/vuepress/issues/128)) ([846eb59](https://github.com/vuejs/vuepress/commit/846eb59)) +* **nav:** unepxected error when themeConfig.nav isn't given. (close: [#125](https://github.com/vuejs/vuepress/issues/125)) ([#127](https://github.com/vuejs/vuepress/issues/127)) ([f052472](https://github.com/vuejs/vuepress/commit/f052472)) +* service worker path ([51c6eb2](https://github.com/vuejs/vuepress/commit/51c6eb2)) +* use correct host in tip after the server has started ([#130](https://github.com/vuejs/vuepress/issues/130)) ([fd447ae](https://github.com/vuejs/vuepress/commit/fd447ae)) +* use header's slug as it is if possible ([#119](https://github.com/vuejs/vuepress/issues/119)) ([5f7e199](https://github.com/vuejs/vuepress/commit/5f7e199)) + + +### Features + +* enable source map in build error traces ([efff472](https://github.com/vuejs/vuepress/commit/efff472)) +* **sidebar:** support click the part outside sidebar to close the sidebar. ([#132](https://github.com/vuejs/vuepress/issues/132)) ([c6c71af](https://github.com/vuejs/vuepress/commit/c6c71af)) + + + # [0.6.0](https://github.com/vuejs/vuepress/compare/v0.5.1...v0.6.0) (2018-04-18) diff --git a/docs/.vuepress/config.toml b/docs/.vuepress/config.toml new file mode 100644 index 0000000000..e7e317a484 --- /dev/null +++ b/docs/.vuepress/config.toml @@ -0,0 +1,67 @@ +dest = "vuepress" +serviceWorker = true + +[title] + "/" = "VuePress" + "/zh/" = "VuePress" + +[description] + "/" = "Vue-powered Static Site Generator" + "/zh/" = "Vue 驱动的静态网站生成器" + +[[langs]] + lang = "en" + label = "English" + path = "/" + selectText = "Languages" +[[langs]] + lang = "zh-CN" + label = "简体中文" + path = "/zh/" + selectText = "选择语言" + +[[head.link]] + rel = "icon" + href = "/logo.png" + +[themeConfig] + repo = "vuejs/vuepress" + editLinks = true + docsDir = 'docs' + [themeConfig.nav] + "/" = [ + { text = "Guide", link = "/guide/" }, + { text = "Config Reference", link = "/config/" }, + { text = "Default Theme Config", link = "/default-theme-config/" } + ] + "/zh" = [ + { text = "指南", link = "/zh/guide/" }, + { text = "配置", link = "/zh/config/" }, + { text = "默认主题", link = "/zh/default-theme-config/" } + ] + [themeConfig.sidebar] + "/guide/" = [ + { title = "Guide", collapsable = false, children = [ + "", + "getting-started", + "basic-config", + "assets", + "markdown", + "using-vue", + "custom-themes", + "deploy" + ] } + ] + "/zh/guide/" = [ + { title = "指南", collapsable = false, children = [ + "", + "getting-started", + "basic-config", + "assets", + "markdown", + "using-vue", + "custom-themes", + "deploy" + ] } + ] + diff --git a/lib/default-theme/DropdownLink.vue b/lib/default-theme/DropdownLink.vue index 96e53df9ec..498f95ab1d 100644 --- a/lib/default-theme/DropdownLink.vue +++ b/lib/default-theme/DropdownLink.vue @@ -1,9 +1,9 @@