diff --git a/css/default.css b/css/default.css index f56c351..fba59de 100644 --- a/css/default.css +++ b/css/default.css @@ -176,7 +176,7 @@ h4:before { #last_messages h3 { background: url("/images/envelope.png") no-repeat; background-size: contain; - padding-left: 50px; + padding-left: 60px; } .recent_article, .article { diff --git a/favicon.gif b/favicon.gif new file mode 100644 index 0000000..8118268 Binary files /dev/null and b/favicon.gif differ diff --git a/messages/2014-12-19-nschoes_labs_opening.md b/messages/2014-12-19-nschoes_labs_opening.md new file mode 100644 index 0000000..b84980a --- /dev/null +++ b/messages/2014-12-19-nschoes_labs_opening.md @@ -0,0 +1,7 @@ +--- +title: nschoe's labs opening! +--- + +Just to tell you that I finally have my own place on the Internet. I will try to share and explain as much as I can. +I will be talking primarily about Haskell, Artificial Intelligence and WebRTC. +Thanks for coming by! \ No newline at end of file diff --git a/site.hs b/site.hs index 7ff925f..de77c78 100644 --- a/site.hs +++ b/site.hs @@ -15,7 +15,11 @@ main = hakyll $ do route idRoute compile compressCssCompiler - match (fromList ["about.md", "contact.markdown", "haskell.md", "ai.md", "webrtc.md"]) $ do + match "favicon.gif" $ do + route idRoute + compile copyFileCompiler + + match (fromList ["about.md", "haskell.md", "ai.md", "webrtc.md"]) $ do route $ setExtension "html" compile $ pandocCompiler >>= loadAndApplyTemplate "templates/default.html" defaultContext @@ -25,6 +29,7 @@ main = hakyll $ do route $ setExtension "html" compile $ pandocCompiler >>= loadAndApplyTemplate "templates/article.html" articleCtx + >>= saveSnapshot "renderedArticles" >>= loadAndApplyTemplate "templates/default.html" articleCtx >>= relativizeUrls @@ -51,21 +56,6 @@ main = hakyll $ do compile $ getResourceBody >>= relativizeUrls - -- create ["archive.html"] $ do - -- route idRoute - -- compile $ do - -- articles <- recentFirst =<< loadAll "articles/*" - -- let archiveCtx = - -- listField "articles" articlesCtx (return articles) `mappend` - -- constField "title" "Archives" `mappend` - -- defaultContext - - -- makeItem "" - -- >>= loadAndApplyTemplate "templates/archive.html" archiveCtx - -- >>= loadAndApplyTemplate "templates/default.html" archiveCtx - -- >>= relativizeUrls - - match "index.html" $ do route idRoute compile $ do @@ -80,6 +70,14 @@ main = hakyll $ do >>= loadAndApplyTemplate "templates/default.html" indexCtx >>= relativizeUrls + create ["rss.xml"] $ do + route idRoute + compile $ do + let feedCtx = articleCtx `mappend` bodyField "description" + articles <- fmap (take 10) . recentFirst =<< + loadAllSnapshots "articles/*" "renderedArticles" + renderRss nschoeslabsRSSConfig feedCtx articles + match "templates/*" $ compile templateCompiler @@ -89,12 +87,13 @@ articleCtx = dateField "date" "%B %e, %Y" `mappend` defaultContext --- lastTwoArticlesCtx :: Context String --- lastTwoArticlesCtx = --- dateField "date" "%b %e, %Y" `mappend` --- defaultContext +-------------------------------------------------------------------------------- --- lastMessagesCtx :: Context String --- lastMessagesCtx = --- dateField "date" "%b %e, %Y" `mappend` --- defaultContext \ No newline at end of file +nschoeslabsRSSConfig :: FeedConfiguration +nschoeslabsRSSConfig = FeedConfiguration + { feedTitle = "nschoe's labs" + , feedDescription = "Haskell, Artificial Intelligence and WebRTC." + , feedAuthorName = "Nicolas SCHOEMAEKER" + , feedAuthorEmail = "ns.schoe@gmail.com" + , feedRoot = "http://www.nschoeslabs.com" + } \ No newline at end of file diff --git a/templates/default.html b/templates/default.html index 62bf5e5..cedae10 100644 --- a/templates/default.html +++ b/templates/default.html @@ -5,6 +5,8 @@ + +