-
Notifications
You must be signed in to change notification settings - Fork 409
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
Few changes to 05-snapshots... to complete the instructions. #941
Few changes to 05-snapshots... to complete the instructions. #941
Conversation
I think the tutorial is short and simple enough that the reader doesn't need all the code repeated at the end. Thanks for the work, sorry I won't merge this! |
Thanks, I think you didn't get an important point, which is that the tutorial is incomplete: following the tutorial will not get the user to build the target I am given to understand that you find the fixed tutorial too long. It's however quite trivial to fix. See #942. |
I followed the tutorial and got the .xml file:
Am I missing something here? |
Yup. Or better said: you're are adding an extra bit which is absent from the tutorial (I am referring to its web rendering): a call site for the (body of) the unamed function: create ["atom.xml"] $ do
route idRoute
compile $ do
let feedCtx = postCtx `mappend` bodyField "description"
posts <- fmap (take 10) . recentFirst =<<
loadAllSnapshots "posts/*" "content"
renderAtom myFeedConfiguration feedCtx posts Adding stuff that's not explicit in tutorials happens when you know what you're doing. But I think it's a nice move to new users to offer them explicitness when possible -- especially users who might not be very comfortable with Haskell. The PR is now closed, but see #942. |
Calling |
Can you show me exactly where you see the tutorial tell the user about the call site for Of course, here we are talking about https://jaspervdj.be/hakyll/tutorials/05-snapshots-feeds.html. If what you have in mind is https://jaspervdj.be/hakyll/tutorials/03-rules-routes-compilers.html, featuring indeed the sentence:
that's a completely different tutorial, and it would be more user friendly to not assume that they have read it before reading the tutorial about snapshots (unless there is a mention somewhere that tutorials should be read in order). |
Yes, I had the third part in mind. The fact that they should be read in order can be derived from how they're titled on the "Tutorials" page: "Tutorial series". |
@jaspervdj Sorry to ping you but I'd like to hear your opinion on this. To me all this sounds like making things unnecessarily complicated for new users, which may or may not be familiar with Haskell, and may be at various degree. I do not understand why making things explicit is worse than making them implicit. I also take note of the fact that https://jaspervdj.be/hakyll/tutorials/03-rules-routes-compilers.html does not really address the problem, as it does not make it explicit the call site for |
Fixed very small gaps in the instructions.