-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Files aren't generated for extensions besides .md and .emu #16
Comments
This is really holding me back. I need to be able to parse different types of files. I'm using dillonkearns/elm-markdown and it does not parse HTML. I tried defining my own htmlDocument and it does not work: main =
Pages.application
{ init = init
, view = view
, update = update
, subscriptions = subscriptions
, documents = [ markdownDocument, htmlDocument ]
, head = head
, manifest = manifest
, canonicalSiteUrl = canonicalSiteUrl
}
htmlDocument =
let
res =
\md ->
case HP.run md of
Ok hp_nodes ->
Ok (H.div [] (HPU.toVirtualDom hp_nodes))
Err deadends ->
Ok (H.text (Parser.deadEndsToString deadends))
in
Pages.Document.parser
{ extension = "html"
, metadata = Metadata.decoder
, body = res
} |
I'm doing my best to keep on top of these issues. There are a lot of people using |
Of course! :)
And congrats!!! Definitely worry about the wedding and (hopefully) honeymoon first.
I just wanted you to know I’m using it for a critical project (accepting the risks, of course) so you could prioritize amongst other things.
I’m looking forward to your new feature, which, I think, is the ability to bring in data from an external source (say through GraphQL), which is also an important feature for my long-term plans.
No worries. Thanks for all you do to contribute to the Elm ecosystem. I also love to read your code - I’ve learned a lot.
Dirk
"You cannot legislate the poor into prosperity by legislating the wealthy out of prosperity. What one person receives without working for, another person must work for without receiving. The government cannot give to anybody anything that the government does not first take from somebody else. When half of the people get the idea that they do not have to work because the other half is going to take care of them, and when the other half gets the idea that it does no good to work because somebody else is going to get what they work for, that my dear friend, is the beginning of the end of any nation. You cannot multiply wealth by dividing it.”
Adrian Rogers, 1931
… On Oct 31, 2019, at 10:15 AM, Dillon Kearns ***@***.***> wrote:
I'm doing my best to keep on top of these issues. There are a lot of people using elm-pages, and I'm working on a big new feature. And I'm getting married in less than a month, so it's crunch time. I'll do my best to work through the queue and push out some new changes, but please have patience as it's a super busy time for me.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#16?email_source=notifications&email_token=AAAPN7OSOVZJBUSO6MLIES3QRMHCFA5CNFSM4JF32442YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECYR6NI#issuecomment-548478773>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAAPN7NR6YZ3UCZ6VT77O6LQRMHCFANCNFSM4JF3244Q>.
|
Thanks for understanding! I'm excited to hear that you're using it for your project, and definitely want to make it work for your needs! And yeah, that's right I'm working on the StaticHttp functionality right now, which is actually getting pretty close to production-ready! Here's some (already working!) code to give you a sense of what it will look like: elm-pages/examples/external-data/src/Main.elm Lines 119 to 179 in 4023bf8
I'm actually getting some help in a sort of closed beta round right now on it, and it's working really nicely. It skips GraphQL entirely, which I love because it reduces the number of extra abstractions... you just directly ask for the data in your Elm code, and it grabs it in the build step! I'm working on Thanks for your interest in the project! I appreciate the feedback, please keep it coming. I'll do my best to get out some of these features and fixes before I head out for the wedding 😄 |
Nice! I love Airtable and was definitely going to be using it for one of my sources. |
This is published now 👍 Be sure to update both the NPM and Elm packages to get the fix. https://github.com/dillonkearns/elm-pages/blob/master/CHANGELOG-NPM.md#1040---2019-11-04 https://github.com/dillonkearns/elm-pages/blob/master/CHANGELOG-ELM.md#101---2019-11-04 |
The problem is that currently the extension is hardcoded for
.md
files here:elm-pages/generator/src/elm-pages.js
Lines 46 to 65 in eb5b7b7
.emu
files need special treatment so they can remain separate. Removing the hardcoded.md
extension should fix the problem.The text was updated successfully, but these errors were encountered: