I would like to know how to get the Complete HTML view of my website which is generated from ELM.
Here is an example
view-source:https://santhosh.thediaryofanentrepreneur.com/ This is my landing page I created using elm-land.
It doesn’t give me the complete Html view.
Is there a way I can download the raw HTML of the site generated from ELM?
Best would be a package or tool which elm supports. But for now I’m open to know if there are any other cli tools which could help me get such raw html.
I don’t know exactly what you are trying to achieve, but I would say that elm-pages is the best at producing pages that are sent as HTML over the wire.
Might be annoying to switch though, if you’re already using Elm Land.
Thanks @lydell for your response. Yep. Migrating is not an option now
Just to give some more context. I want to send the generated files from elm as email. And having these content as embedded javascript will not work for Email HTML, so I needed the raw HTML instead of the one with the javascript generated by elm.
Then it sounds like you might be looking for elm-html-string 2.0.2, and maybe Platform - core 1.0.5 to run an Elm program in Node.js, for example as a CLI tool that writes the email HTML files.
Looks 5 years old. I will check if it still works. But I already see the limitations of img tag being not supported. But still will give me some good insight on how to go about it.
I need more time to look at this. I will get back with some updates shortly.
Just for kicks, I also thought of hand rolling my own DSL parser and renderer in ELM
It is not complete yet. Wanted to get some opinion on pros and cons of such thing compared to the possible solutions suggested here.
Obvious Cons is that, too much boiler plate code.
But the upside is I’m able to render the generated HTML using elm-land and also dump the required html on to the console, which I could pick from “node myscript.js” and get my work done.
I’m open for some feedback on this custom DSL apporach.