feat(v2): presets (#1401)

* feat(v2): presets

* misc: add newline

* misc: add tests

* misc: fix path
This commit is contained in:
Yangshun Tay 2019-04-27 10:47:56 -07:00 committed by GitHub
parent 7ebcf10478
commit 361986515c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 394 additions and 89 deletions

View file

@ -29,7 +29,7 @@ const DEFAULT_OPTIONS = {
};
class DocusaurusPluginContentBlog {
constructor(opts, context) {
constructor(context, opts) {
this.options = {...DEFAULT_OPTIONS, ...opts};
this.context = context;
this.contentPath = path.resolve(this.context.siteDir, this.options.path);