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

Integrating with ProseMirror #982

Open
Kleidukos opened this issue Apr 12, 2023 · 5 comments
Open

Integrating with ProseMirror #982

Kleidukos opened this issue Apr 12, 2023 · 5 comments
Labels

Comments

@Kleidukos
Copy link

ProseMirror is a WYSIWYG-style content editor that provides a very pleasant interface for writing. It would be quite interesting to run an edition interface based on ProseMirror when one starts the watch mode.

I'd be delighted to implement this, although I'm all ears for any piece of advice regarding interactivity, routes, etc. This is my first time contributing to Hakyll.

@Minoru Minoru added the feature label Apr 29, 2023
@Minoru
Copy link
Collaborator

Minoru commented Apr 29, 2023

Hi! As far as I understand, ProseMirror is a greatly enhanced <textarea>, so it can't modify files on disk by itself; we'll need some sort of dynamic web backend built into watch. Is that right?

I think it could work for editing existing files, and also authoring new ones as long as they fall under one of the existing match rules. For anything that requires modifying Haskell code, I think it's too much trouble to create a "hot reload" (although XMonad managed it). If we give up things that require a recompilation of Haskell code, then I think Hakyll already exposes all the required knobs, so this thing can be implemented as a separate module package.

@Kleidukos
Copy link
Author

Yes, watch's backend would be used for this. :)

I think it could work for editing existing files, and also authoring new ones as long as they fall under one of the existing match rules.

Yes it's reasonable to limit the implementation to that kind of files.

@Minoru
Copy link
Collaborator

Minoru commented May 1, 2023

I'm not too keen on maintaining a dynamic web backend in Hakyll. I believe Hakyll already provides a way to swap out an implementation of watch, so it seems this can really be implemented as a separate package (I wrote "module" above; that was a wrong word). But if some API is missing, I'd like to know about that!

@Kleidukos
Copy link
Author

Fully understandable. :)

Is there any documentation about changing the implementation of watch? Or some pitfalls I should know about?

@Minoru
Copy link
Collaborator

Minoru commented May 1, 2023

I don't think it's possible to change the implementation of watch; what I had in mind is swapping a new one into its place. #959 describes how one could add a new command to the Hakyll binary; the same can be done to replace an existing command.

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

2 participants