diff --git a/docs/.gitignore b/docs/.gitignore index 670b71cb..38e332ce 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,5 +1,7 @@ # ignore VuePress build files .vuepress/dist +.temp +.cache node_modules yarn.lock # ignore copied files diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 51814b56..d61fb7b8 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -1,15 +1,36 @@ +const { defaultTheme } = require('vuepress') +const { searchPlugin } = require('@vuepress/plugin-search') + module.exports = { + lang: 'en-US', title: 'rtl_433', description: 'generic data receiver for ISM/SRD bands.', - base: "/rtl_433/", + + base: '/rtl_433/', markdown: { - linkify: true + code: { + lineNumbers: false, + }, }, - themeConfig: { + + plugins: [ + searchPlugin(), + ], + + theme: defaultTheme({ repo: 'merbanan/rtl_433', displayAllHeaders: true, + + editLink: true, + docsBranch: 'master', + docsDir: 'docs', + + navbar: [ + { text: 'Projects', link: 'https://triq.org/' }, + ], + sidebar: [ - ['/', 'Overview'], + { text: 'Overview', link: '/' }, 'BUILDING', 'CHANGELOG', 'CONTRIBUTING', @@ -22,6 +43,6 @@ module.exports = { 'INTEGRATION', 'LINKS', 'TESTS', - ] - } + ], + }), }; diff --git a/docs/.vuepress/styles/index.scss b/docs/.vuepress/styles/index.scss new file mode 100644 index 00000000..458ce8a8 --- /dev/null +++ b/docs/.vuepress/styles/index.scss @@ -0,0 +1,4 @@ +// Missing background color on bare code sections +.theme-default-content pre, .theme-default-content pre[class*="language-"] { + background-color: var(--code-bg-color); +} diff --git a/docs/package.json b/docs/package.json index 61f853a0..b2ffb2f8 100644 --- a/docs/package.json +++ b/docs/package.json @@ -7,8 +7,7 @@ "docs:build": "vuepress build" }, "devDependencies": { - "vuepress": "^1.0.0", - "@vuepress/plugin-back-to-top": "^1.0.0", - "@vuepress/plugin-medium-zoom": "^1.0.0" + "@vuepress/plugin-search": "^2.0.0-beta.49", + "vuepress": "^2.0.0-beta.49" } }