Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bisheng 使用疑问 #28

Closed
jindada opened this issue Jun 19, 2017 · 5 comments
Closed

bisheng 使用疑问 #28

jindada opened this issue Jun 19, 2017 · 5 comments

Comments

@jindada
Copy link

jindada commented Jun 19, 2017

您好 我正在用您的代码学习bisheng 有个问题想请教您

image

这个里面的 highlightedCode 和 preview 是如何注入到 pageData 中的啊?查阅了相关文档和代码都没有找到相关的内容

bisheng版本:0.24.1

谢谢

@ioslh
Copy link
Collaborator

ioslh commented Jun 19, 2017

在插件 bisheng-plugin-antd (0.3.2)里;

// lib/process-demo.js
  markdownData.highlightedCode = getHighlightedCode(contentChildren, codeIndex);
  markdownData.preview = getPreview(contentChildren, codeIndex);

这个插件应该是专门为了 antd 项目写的;我的也是用这个插件,所以采用了一样的目录结构。

@jindada
Copy link
Author

jindada commented Jun 19, 2017

我已经在配置了 bisheng-plugin-antd 版本 0.15.0
image

但是在哪里可以获取到 这两个方法那?
@ioslh 谢谢

@ioslh
Copy link
Collaborator

ioslh commented Jun 19, 2017

不是 lib/process-demo.js 里吗?不是的话你直接在插件源代码里搜一下关键字

@jindada
Copy link
Author

jindada commented Jun 19, 2017

确实是在的 但是bisheng的插件不可以直接注入到props里面去吗 我看antd和react-amap都是配置plugins就可以用啦

@ioslh
Copy link
Collaborator

ioslh commented Jun 19, 2017

这个插件应该是专门为了 antd 项目写的,你得用 antd 项目一样的目录结构。

@jindada jindada closed this as completed Jun 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants