-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
Allow custom HTML in <head>
.
#385
Conversation
Adds `headHtml : Optional Text` option to the configuration. It can be set in one of two ways, but not both simultaneously. - The option can be set as usual in `./neuron.dhall`. - If the file `./head.html` exists, then `headHtml` is set to its `Some [head.html's contents]`.
@vizziv Thanks! Taking a quick look at the diff, I see that this differs from #362 in two ways:
|
The answer in both cases is that I chose a solution that made the fewest changes to the code, as I wanted to submit the minimally invasive patch that added the feature. But I'm happy to make both changes. Regarding how to organize the code for the first change: should we use the |
Another question about the second change: right now we replace |
Checkout how the icon and manifest files are handled for inspiration. They are loaded in src/app/Main.hs as |
re: MathJax - I'm not sure what you mean; neuron doesn't do any special processing, aside from letting commonmark handle it (see |
You can probably sneak in the head.html stuff in a new field of the |
Ahh, I'd already made a new module for this, creatively named |
I've removed I'm not sure how you want to update the guide to reflect these changes, so I'll leave that to you and others if that's okay.
Yeah, looks like the |
About the deprecation warning .. okay, let's not worry about it; let's ignore the mathjax field silently if used by the user. I added some comments in your PR. About the $ -> ( conversion, that happens here: https://github.com/srid/reflex-dom-pandoc/blob/259c7a881dd4ba69f82ac2fdec83ddf8f5ee0fc5/src/Reflex/Dom/Pandoc/Document.hs#L204 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vizziv You know what, I'm now not sure if it is so important to support backwards compact, especially if it makes config parsing rather complex.
Most users I imagine won't have mathJaxSupport = false
in their config. Those that do, can always remove it when next updating neuron.
So let's get rid of the config fields check entirely. Please undo the Config changes in your PR, except for removing mathJaxSupport
field entirely from the Config type.
Okay, I undid the config changes (except I removed the The |
Adds
headHtml : Optional Text
option to the configuration. It can be set in one of two ways, but not both simultaneously../neuron.dhall
../head.html
exists, thenheadHtml
is set toSome [head.html's contents]
.Addresses #362 directly. Also solves or enables workarounds for several other issues (e.g. #212, #361, #383).