mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-31 09:57:03 +02:00
refactor(v2): move livecodeblock as plugin (#1566)
* refactor(v2): move livecodeblock as plugin * tweak from rebase * nits * nits * dep
This commit is contained in:
parent
a0777f7c57
commit
5362c2cda2
17 changed files with 208 additions and 72 deletions
|
@ -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],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue