docs: Update to VuePress 2

This commit is contained in:
Christian W. Zuckschwerdt 2022-07-21 13:18:42 +02:00
commit 2bdae984d6
4 changed files with 35 additions and 9 deletions

2
docs/.gitignore vendored
View file

@ -1,5 +1,7 @@
# ignore VuePress build files
.vuepress/dist
.temp
.cache
node_modules
yarn.lock
# ignore copied files

View file

@ -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',
]
}
],
}),
};

View file

@ -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);
}

View file

@ -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"
}
}