Comments (12)
WDYT @imeoer
如果你认为可行,我可以来负责实现。
from ink.
@gaocegege 嗯,的确是需要改进的,你有什么想法吗?之前我考虑让 ink 支持插件,每个插件是一个目录,可以引入到模板文件中,但还没有具体设计。
from ink.
强烈支持插件,之前还遇到一个需求,想在 parse markdown 的时候所有的 @xxx
会在生成 HTML 时变为 [@xxx](https://github.com/xxx)
。这些需求应该都可以通过第三方插件来做吧?
至于实现思路,每个插件是一个目录的意思是,每个插件在一个单独的目录里,有自己的配置文件,在根目录的 config.yml 里引入插件,然后在 build 的时候起作用么
from ink.
在 golang 上有动态插件的实现么,之前看过 drone/drone 的插件实现,是基于 Docker Container 来做的,听说 1.8 是有原生支持的?
from ink.
@gaocegege 嗯是的,比如插件目录有config.yml和html模板,在build时使用。现在看大部分需要插件的需求多是可以用html,js,css就能完成的,暂时用不到go的二进制插件方式(嗯Go 1.8要支持plugins)。
插件的html模板比较简单,可以直接在build时引入,主要是css和js也许需要合并到主css和js文件中去,这个当然直接concat也可以。比如刚说的那个at功能,可以在页面加载后用js再替换成链接。
from ink.
如果可以用 js 的话,那插件就简单了很多,包括 toc #65 之类的都可以实现
from ink.
@at15 @gaocegege 嗯嗯,看来插件机制还是很有帮助,包括现在默认的disqus评论框,搜索,图片查看器都可以独立成插件。
from ink.
渲染还是丢给前端好了...高亮的那一套也可以更新下,之前写Swift不能高亮,我自己换成了prism(可能算是theme的范畴了)
from ink.
@solarhell prism比highlight.js效果好么?可以的话默认替换成这个,目前高亮效果的确不太好。
from ink.
@imeoer 嗯,效果好很多,另外我可以帮助把webpack部分的完善下。
from ink.
@solarhell 嗯,主要是不想做特化的工作,希望改的可以 merge 到 origin 上
from ink.
@solarhell 可以的,麻烦啦,随时提PR,还有蛮多可以优化的地方。
from ink.
Related Issues (20)
- MarkDown解析错误 HOT 2
- 添加使用者
- 希望将链接解析为在新页面打开 HOT 2
- 你好,请问如何生成sitemap.xml HOT 2
- 作者你好,自带的主题能否实现多种语言的代码高亮 HOT 1
- Ink not building from source HOT 3
- Release HOT 1
- Include other files
- http/https with external webserver HOT 1
- 新的使用者,以及一个Material Design风格主题 HOT 2
- Ink doesn't build HOT 1
- Improve site previews HOT 2
- Remove comment section from about page HOT 2
- chole.io still part of this project? HOT 2
- New Design for Ink Editor
- 寻找新的维护者? HOT 4
- [Build] Nightly build HOT 1
- update ink project website HOT 1
- problem building docker/podman image HOT 1
- tag 下超过10篇文章时,翻页按钮链接出错 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ink.