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

Support for code highlighting #238

Open
shonfeder opened this issue Apr 25, 2021 · 5 comments
Open

Support for code highlighting #238

shonfeder opened this issue Apr 25, 2021 · 5 comments
Labels

Comments

@shonfeder
Copy link
Collaborator

Requested in #236 (comment). This should probably be implemented in a lightweight way that takes advantage of the clean extension mechanism we want (but don't yet have) ;)

@ghost
Copy link

ghost commented Jun 28, 2021

There is a project called lowlight which integrates highlight.js with vdoms. It might be useful to do the same here where there is another project for integrating with jsoo vdom implementations.

@alan-j-hu
Copy link

Hi, I am using Omd to make a static site generator. One of the features I wanted for my static site generator was syntax highlighting, so I went and implemented it myself. I have published the textmate-language package for processing TextMate grammars on OPAM. I would love to work with the maintainers of Omd to integrate my existing work into Omd.

@sonologico
Copy link
Collaborator

Hi, @alan-j-hu, thanks! I'll take a look at your package to get an idea. As @shonfeder suggests, this might be a good opportunity to think about extensions more concretely.

@shonfeder
Copy link
Collaborator Author

shonfeder commented Jul 17, 2021

I guess one place to start is with this question:

Is it (a) sufficient for our purposes that "extension" be through OCaml library APIs, or (b) do we need a plugin system that would allow different external executables to serve as extension mechanisms?

My current inclination is that (a) will suffice for current needs. The cost is that using a plugin means that you are either leveraging omd as a library, or you are building a new executable. Would this be satisfactory for your current needs @alan-j-hu?

If (a) is the right target for now, I propose we expore implementing it via a functorial interface. Later, we might consider adding something which is midway between (a) and (b) via ocaml_plugin (this would allow dynamically loading ocaml modules as plugins, but wouldn't work with arbitrary executables).

@alan-j-hu
Copy link

Yes, accessing the extension mechanism through the OCaml library should be sufficient for my needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants