feat(v2): bootstrap theme, preset, template, CI previews (#2981)

* fix(v2): doc sidebar

* chore(v2): prettier

* fix(v2): docs navbar path

* fix(v2): fix error about activepath

* chore(v2): prettier

* feat(v2): change active color

* feat(v2): Add bootstrap doc

* docs(v2): Update preset

* doc(v2): finish bootstrap documentation

* chore(v2): run lint

* doc(v2): update hook

* fix theme bootstrap layout (far from perfect)

* Try to fix bootstrap theme and deploy it!

* fix netlify error

Co-authored-by: slorber <lorber.sebastien@gmail.com>
This commit is contained in:
Fanny 2020-08-17 15:18:37 -03:00 committed by GitHub
parent 5fdf96c552
commit 8c05aa8e94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 561 additions and 67 deletions

View file

@ -15,6 +15,12 @@ const allDocHomesPaths = [
];
const baseUrl = process.env.BASE_URL || '/';
const isBootstrapPreset = process.env.DOCUSAURUS_PRESET === 'bootstrap';
const isVersioningDisabled = !!process.env.DISABLE_VERSIONING;
if (isBootstrapPreset) {
console.log('Will use bootstrap preset!');
}
module.exports = {
title: 'Docusaurus',
@ -23,7 +29,7 @@ module.exports = {
projectName: 'docusaurus',
baseUrl,
url: 'https://v2.docusaurus.io',
onBrokenLinks: 'throw',
onBrokenLinks: isVersioningDisabled ? 'warn' : 'throw',
favicon: 'img/docusaurus.ico',
customFields: {
description:
@ -154,7 +160,9 @@ module.exports = {
],
presets: [
[
'@docusaurus/preset-classic',
isBootstrapPreset
? '@docusaurus/preset-bootstrap'
: '@docusaurus/preset-classic',
{
debug: true, // force debug plugin usage
docs: {
@ -166,7 +174,7 @@ module.exports = {
showLastUpdateAuthor: true,
showLastUpdateTime: true,
remarkPlugins: [require('./src/plugins/remark-npm2yarn')],
disableVersioning: !!process.env.DISABLE_VERSIONING,
disableVersioning: isVersioningDisabled,
},
blog: {
// routeBasePath: '/',