erixtekila / gitbook-plugin-richquotes

Gitbook plugin : Transform annoted quotes to notes
Apache License 2.0
49 stars 14 forks source link

Error Loading plugin #4

Closed brice-morin closed 10 years ago

brice-morin commented 10 years ago

Hi, It seems gitbook cannot load your plugin, producing (in DEBUG mode) the following stack:

Error: Error loading plugins: richquotes
    at Function.Plugin.fromList (/usr/local/lib/node_modules/gitbook/lib/generate/plugin.js:146:45)
    at BaseGenerator.loadPlugins (/usr/local/lib/node_modules/gitbook/lib/generate/generator.js:23:19)
    at Generator.loadPlugins (/usr/local/lib/node_modules/gitbook/lib/generate/site/index.js:45:48)
    at bound [as loadPlugins] (/usr/local/lib/node_modules/gitbook/node_modules/lodash/dist/lodash.js:729:21)
    at /usr/local/lib/node_modules/gitbook/lib/generate/index.js:42:26
    at _fulfilled (/usr/local/lib/node_modules/gitbook/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/gitbook/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/gitbook/node_modules/q/q.js:749:13)
    at /usr/local/lib/node_modules/gitbook/node_modules/q/q.js:810:14
    at flush (/usr/local/lib/node_modules/gitbook/node_modules/q/q.js:108:17)
erixtekila commented 10 years ago

You'd update your gitbook version. What's yours ? Mine is 0.6.3 and is fine.

Thanks to give feedback.

uraimo commented 10 years ago

Just FYI, i tried to use the plugin with gitbook 0.7.1 from the command line and the rich quotes are displayed as normal quotes in both html and mobi output, couldn't check if something was displayed in debug mode (don't know the launch option).

erixtekila commented 10 years ago

@uraimo Did you install the plugin in your book.json correctly like so ?

{
    "plugins"       : ["richquotes"]
    ,"pluginsConfig":
    {
        "richquotes" :
        {
            "todos" : true /*false by default*/
        }
    }
}
uraimo commented 10 years ago

yep, removing that comment because the gui editor doesn't like it. Both richquotes and gitbook were installed via npm.

erixtekila commented 10 years ago

Would you mind share your repo please ?

uraimo commented 10 years ago

I've published @uraimo/gitbook-test

As you can see it's only a test page with all your quote types in it.

Edit: Your plugin appears to be loaded in the html output, there is a directory _book/gitbook/plugins/gitbook-plugin-richquotes

Edit2: Enabled debug mode, the error pasted by OP does not show up.

erixtekila commented 10 years ago

OK, I got it, the entire quotes block is seen as a single quote. You'd put text between them, like so :

> **Info** Info

Some paragraph

Everything works as expected then. HTH

uraimo commented 10 years ago

Confirmed! Thanks. :+1: