-
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
order of fields in defaultContext
#1030
Comments
I don't know offhand how these fields are used internally, so can't comment on how dangerous it is to change them. However, I often find that something that can be done is done by someone, so taking it away breaks their setup. For Hakyll, I sometimes search for "site.hs" on GitHub (thus identifying Hakyll users), and then grep those repos for the bit I'm interested in (something like "^path: " in this case). I'm suggesting you do that to see if someone is (ab)using these meta-fields currently. |
If one does not want the URL to be the straightforward path-based URL, e.g., if one wants clean URLs, then changing the I don't know of any good reason to change the |
Thanks for the information! I'll close the issue because the current state seems good. |
The
defaultContext
makes several fields available in addition to the metadata fields. These extra fields arepath
,url
,title
, andbody
. Thebody
field is always its default definition, but the others can be replaced by the metadata fields of the same name.Replacing the default
title
makes sense, and the example site does that. However, I don't know any use cases for changing the value ofpath
orurl
, and I can easily imagine that accidentally replacing their value could cause broken links.Would it be an improvement to change the order of the fields in
defaultContext
so thatpath
andurl
are not replaceable in the metadata?The text was updated successfully, but these errors were encountered: