refactor(v2): move livecodeblock as plugin (#1566)

* refactor(v2): move livecodeblock as plugin

* tweak from rebase

* nits

* nits

* dep
This commit is contained in:
Endi 2019-06-06 15:49:11 +07:00 committed by GitHub
parent a0777f7c57
commit 5362c2cda2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 208 additions and 72 deletions

View file

@ -6,10 +6,15 @@
*/
module.exports = function preset(context, opts = {}) {
const {siteConfig = {}} = context;
const {themeConfig} = siteConfig;
const {algolia} = themeConfig;
return {
themes: [
['@docusaurus/theme-classic', opts.theme],
'@docusaurus/theme-search-algolia',
// Don't add this if algolia config is not defined
algolia && '@docusaurus/theme-search-algolia',
],
plugins: [
['@docusaurus/plugin-content-docs', opts.docs],