Let the front page redirect to the newest recipe
This commit is contained in:
parent
8b3af9e8f3
commit
2019e64ba2
|
@ -129,6 +129,10 @@ generateSite = do
|
|||
atomText <- generateAtom newest infos
|
||||
saveTextFile atomText (joinPaths outputDir (inject "atom.xml"))
|
||||
|
||||
redirectTemplate <- makeTemplate (readTextFile (inject "redirect.html")) (inject "URL")
|
||||
newestSlug <- onToken (T.pack . snd . head') infos
|
||||
saveTextFile (applyTemplate redirectTemplate newestSlug) (joinPaths outputDir indexName)
|
||||
|
||||
-- Handle about page
|
||||
outputAboutDir <- joinPaths outputDir (inject "om")
|
||||
makeDir outputAboutDir
|
||||
|
|
5
om.md
5
om.md
|
@ -18,6 +18,11 @@ Da jeg i 2012 flyttede hjemmefra for at studere i København, begyndte jeg også
|
|||
Klik på [Retter](/retter)-fanen i toppen af siden for at se alle mine madretter.
|
||||
|
||||
|
||||
## Atom-feed
|
||||
|
||||
i din læser
|
||||
|
||||
|
||||
## Licens
|
||||
|
||||
<p xmlns:cc="http://creativecommons.org/ns#" xmlns:dct="http://purl.org/dc/terms/"><span property="dct:title">Niels' mad</span> by <span property="cc:attributionName">Niels G. W. Serup</span> er licenseret under <a href="https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1" target="_blank" rel="license noopener noreferrer" style="display:inline-block;">CC BY-SA 4.0<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1" alt=""><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1" alt=""><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/sa.svg?ref=chooser-v1" alt=""></a></p>
|
||||
|
|
Loading…
Reference in New Issue