azu / gitbook-plugin-include-codeblock

GitBook plugin for including file
Other
40 stars 25 forks source link

Plugin ace support #38

Closed gdolle closed 7 years ago

gdolle commented 7 years ago

@azu I propose to support gitbook-ace-plugin to add an optional nicer code editor.

Result example: ex

Usage

Enable globally

{
    "pluginsConfig": {
        "include-codeblock": {
            "template": "ace",
        }
    }
}

[include:"marker0", theme:"monokai",edit:"false"](path/to/the/code)

See the readme for more details.

Changelog:

Bug/Known issues:

gdolle commented 7 years ago

FYI: I've created similar plugin. https://github.com/azu/gitbook-plugin-js-console It used CodeMirror and focus JavaScript.

Nice. (If you want to support it in the future, we just have to add a new template "templates/js-template.hbs") ;)

@gdolle Can you rename file path in example/ directory.

I'll do that. I'll let you know when I'm done

gdolle commented 7 years ago

@azu changes done !

azu commented 7 years ago

Ok. I'll merge it soon.

Refactor lang fix in particular for c++ (as ace-plugin is a native aceMods, it support c_cpp, see issue #21)

This include a bit of breaking change.(fixlang option is false by default.) So, We should release next as major update via semver.

azu commented 7 years ago

Sorry, I forget to check files in package.json. It define published files to npm.

template to templates.

and we should update gitbook config schema in package.json

@gdolle Can you update these?

gdolle commented 7 years ago

@gdolle Can you update these?

@azu done

azu commented 7 years ago

@gdolle Thanks!

azu commented 7 years ago

Release https://github.com/azu/gitbook-plugin-include-codeblock/releases/tag/3.0.0 🎉