Giter VIP home page Giter VIP logo

Comments (12)

gaocegege avatar gaocegege commented on August 20, 2024

WDYT @imeoer

如果你认为可行,我可以来负责实现。

from ink.

imeoer avatar imeoer commented on August 20, 2024

@gaocegege 嗯,的确是需要改进的,你有什么想法吗?之前我考虑让 ink 支持插件,每个插件是一个目录,可以引入到模板文件中,但还没有具体设计。

from ink.

gaocegege avatar gaocegege commented on August 20, 2024

强烈支持插件,之前还遇到一个需求,想在 parse markdown 的时候所有的 @xxx 会在生成 HTML 时变为 [@xxx](https://github.com/xxx)。这些需求应该都可以通过第三方插件来做吧?

至于实现思路,每个插件是一个目录的意思是,每个插件在一个单独的目录里,有自己的配置文件,在根目录的 config.yml 里引入插件,然后在 build 的时候起作用么

from ink.

gaocegege avatar gaocegege commented on August 20, 2024

在 golang 上有动态插件的实现么,之前看过 drone/drone 的插件实现,是基于 Docker Container 来做的,听说 1.8 是有原生支持的?

from ink.

imeoer avatar imeoer commented on August 20, 2024

@gaocegege 嗯是的,比如插件目录有config.yml和html模板,在build时使用。现在看大部分需要插件的需求多是可以用html,js,css就能完成的,暂时用不到go的二进制插件方式(嗯Go 1.8要支持plugins)。
插件的html模板比较简单,可以直接在build时引入,主要是css和js也许需要合并到主css和js文件中去,这个当然直接concat也可以。比如刚说的那个at功能,可以在页面加载后用js再替换成链接。

from ink.

at15 avatar at15 commented on August 20, 2024

如果可以用 js 的话,那插件就简单了很多,包括 toc #65 之类的都可以实现

from ink.

imeoer avatar imeoer commented on August 20, 2024

@at15 @gaocegege 嗯嗯,看来插件机制还是很有帮助,包括现在默认的disqus评论框,搜索,图片查看器都可以独立成插件。

from ink.

solarhell avatar solarhell commented on August 20, 2024

渲染还是丢给前端好了...高亮的那一套也可以更新下,之前写Swift不能高亮,我自己换成了prism(可能算是theme的范畴了)

from ink.

imeoer avatar imeoer commented on August 20, 2024

@solarhell prism比highlight.js效果好么?可以的话默认替换成这个,目前高亮效果的确不太好。

from ink.

solarhell avatar solarhell commented on August 20, 2024

@imeoer 嗯,效果好很多,另外我可以帮助把webpack部分的完善下。

from ink.

gaocegege avatar gaocegege commented on August 20, 2024

@solarhell 嗯,主要是不想做特化的工作,希望改的可以 merge 到 origin 上

from ink.

imeoer avatar imeoer commented on August 20, 2024

@solarhell 可以的,麻烦啦,随时提PR,还有蛮多可以优化的地方。

from ink.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.