on master help sign in
fixed: auto complete `published` overwrites user's context

I like following, has written a context to complement from the file name `published`. [www.ncaq.net/site.hs at d8b7eb3426eae36ee0ea5788f32306b9ffa6f9f2 · ncaq/www.ncaq.net](https://github.com/ncaq/www.ncaq.net/blob/d8b7eb3426eae36ee0ea5788f32306b9ffa6f9f2/site.hs#L120) Looking at feed today, I noticed that time is not reflected in `published`. This is because `getItemUTC` overwrites my `published`. Adding a format to `getItemUTC` was not a solution because I live with JST. Also, it is not realistic to write `published` in the yaml metadata of all files, and I think that you want to be delivered as JST as much as possible. Since `updated` does not overwrite the context, I tried to rewrite so that `published` does not overwrite the context. I have confirmed in the local environment that all things work well, is this the intended overwrite? If not, I think it is natural to prioritize the user's context.

commit5ac95e9b9b62baf417a69557f40078af1a5ad92a authorncaq <ncaq@ncaq.net> dateThu 20 Dec 2018, 00:07 (8 years ago) parent7783ec7
1 file changed+1−1
lib/Hakyll/Web/Feed.hs+1−1
lib/Hakyll/Web/Feed.hs+1−1
@@ -177,4 +177,4 @@ renderAtom = renderAtomWithTemplates atomTemplate atomItemTemplate
177177-- | Copies @$updated$@ from @$published$@ if it is not already set.
178178makeItemContext :: String -> Context a -> Context a
179179makeItemContext fmt context = mconcat
180− [dateField "published" fmt, context, dateField "updated" fmt]
180+ [context, dateField "published" fmt, dateField "updated" fmt]