From: Lucian Mogosanu Date: Sat, 5 Nov 2016 14:37:05 +0000 (+0200) Subject: Remove old site files X-Git-Tag: v0.9^2~9 X-Git-Url: https://git.mogosanu.ro/?a=commitdiff_plain;h=9c986c4fab213f15c22c8c04ca89986fbe8e380d;p=thetarpit.git Remove old site files --- diff --git a/Setup.hs b/Setup.hs deleted file mode 100644 index 9a994af..0000000 --- a/Setup.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Distribution.Simple -main = defaultMain diff --git a/about-2.markdown b/about-2.markdown deleted file mode 100644 index a3d1abf..0000000 --- a/about-2.markdown +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: On tar pits (or, the second about) -author: Lucian Mogoșanu -date: April 29, 2016 ---- - -Humans' understanding of the universe is terrifyingly limited. Yet from -thermodynamics we know (or we think we know) that by the arrow of -entropy nature tends to fall into a general state of disorder. This is -the zeroth tar pit. - -The first, second, third and so on up to the nth are most of the things, -beasts, people and phenomena surrounding us, from the actual sticky -thing to more metaphorical notions such as Kafka's perfect bureaucracy, -or just the fat lady standing in front of you at the queue in the post -office. - -In the same category lies a tar pit uniquely attributable to man, that -creature more widely (although more and more narrowly) known as Zōon -Politikon. It, like the Boltzmann constant itself, is also difficult to -grasp, but you might know it as that feeling which (naturally!) keeps -you from aspiring to become *more* human. It is laziness; it is -stagnation; it is tiredness, and it is ultimately death. - -This blog, my, Lucian Mogoșanu's blog, describes its author's struggle -through his own personal tar pit, as well as accounts and critiques of -some of his times'. I hope I will have at least captured some of the -more interesting ones, much to the amusement of future alien -anthropologists. - -The Tar Pit is an ever incomplete and thus necessarily flawed -publication. After all, tar pits might not even be enumerable. - -(Note: the previous [about page][about] was left online for historical -reasons.) - -[about]: /about.html diff --git a/contact.markdown b/contact.markdown deleted file mode 100644 index 96417c7..0000000 --- a/contact.markdown +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: Contact -author: Lucian Mogoșanu -date: July 24, 2013 ---- - -* [E-mail][1] -* IRC/Freenode: spyked - -I'm also on: - -* [GitHub][2] -* [Facebook][3] -* [Twitter][4] -* [Reddit][5] - - -[1]: /images/email.png -[2]: https://github.com/spyked -[3]: https://www.facebook.com/lucian.mogosanu -[4]: https://twitter.com/spyked -[5]: http://www.reddit.com/user/spyked diff --git a/index.html b/index.html deleted file mode 100644 index c2f281f..0000000 --- a/index.html +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: Home ---- - -"Tiger got to hunt, bird got to fly;
-Man got to sit and wonder 'why, why, why?'
-Tiger got to sleep, bird got to land;
-Man got to tell himself he understand."
--- Bokonon - - -

Recent posts

- -$partial("templates/post-list.html")$ - -See the archive for more. - -

Contact

- - - diff --git a/site.hs b/site.hs deleted file mode 100644 index 1a32a4f..0000000 --- a/site.hs +++ /dev/null @@ -1,162 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} -import Data.Monoid (mappend) -import Text.Pandoc -import Hakyll -import Hakyll.Core.Configuration - --- wrapping it up -main :: IO () -main = hakyllWith tarpitConfiguration $ do - let pages = ["about.markdown", "about-2.markdown", - "contact.markdown", "404.markdown", - "403.markdown"] - -- tags - tags <- buildTags "posts/**" $ fromCapture "tags/*.html" - - -- content - match "index.html" $ compileIndex tags - match "css/*" compileCss - match "posts/**" $ compilePosts tags - match "uploads/**" $ compileUploads - match "css/fonts/*" $ compileFonts - match (fromList pages) compilePages - create ["archive.html"] $ compileArchive tags - - -- tags rules - tagsRules tags $ compileTags tags - - -- rss feed - create ["rss.xml"] compileRss - - -- compile templates - match "templates/*" $ compile templateCompiler - --- compilers go here -compileIndex :: Tags -> Rules () -compileIndex tags = do - route idRoute -- TODO: make a "copy to root" route? - compile $ do - posts <- loadAll "posts/**" >>= fmap (take 5) . recentFirst - let indexCtx = - listField "posts" postCtx (return posts) `mappend` - defaultContext - - getResourceBody - >>= applyAsTemplate indexCtx - >>= loadAndApplyTemplate "templates/default.html" indexCtx - >>= relativizeUrls - -compileCss :: Rules () -compileCss = do - route idRoute - compile compressCssCompiler - -compilePosts :: Tags -> Rules () -compilePosts tags = do - route $ setExtension "html" - let ctx = tagsCtx tags - compile $ tarpitCompiler - >>= saveSnapshot "content" - >>= loadAndApplyTemplate "templates/post.html" ctx - >>= loadAndApplyTemplate "templates/default.html" ctx - >>= relativizeUrls - -compileUploads :: Rules () -compileUploads = do - route idRoute - compile copyFileCompiler - -compileFonts :: Rules () -compileFonts = compileUploads - -compilePages :: Rules () -compilePages = do - route $ setExtension "html" - compile $ tarpitCompiler - >>= loadAndApplyTemplate "templates/default.html" defaultContext - -- relative URLs break 404 pages, so don't do it here - -- >>= relativizeUrls - -compileArchive :: Tags -> Rules () -compileArchive tags = do - route idRoute - compile $ do - posts <- loadAll "posts/**" >>= recentFirst - let archiveCtx = - listField "posts" postCtx (return posts) `mappend` - field "taglist" (const $ renderTagList tags) `mappend` - constField "title" "Archive" `mappend` - defaultContext - makeItem "" - >>= loadAndApplyTemplate "templates/archive.html" archiveCtx - >>= loadAndApplyTemplate "templates/default.html" archiveCtx - >>= relativizeUrls - -compileTags :: Tags -> String -> Pattern -> Rules () -compileTags tags tag pattern = do - let title = "Posts tagged '" ++ tag ++ "'" - route idRoute - compile $ do - posts <- loadAll pattern >>= recentFirst - let tagCtx = - constField "title" title `mappend` - listField "posts" postCtx (return posts) `mappend` - tagsCtx tags - makeItem "" - >>= loadAndApplyTemplate "templates/post-list.html" tagCtx - >>= loadAndApplyTemplate "templates/default.html" tagCtx - >>= relativizeUrls - - -compileRss :: Rules () -compileRss = do - -- shamelessly stolen from - -- http://jaspervdj.be/hakyll/tutorials/05-snapshots-feeds.html - route idRoute - compile $ do - let feedCtx = - postCtx `mappend` - teaserField "teaser" "content" `mappend` - bodyField "description" - applyTeaser = loadAndApplyTemplate "templates/teaser.html" feedCtx - posts <- loadAllSnapshots "posts/**" "content" - >>= mapM applyTeaser - >>= fmap (take 7) . recentFirst - renderRss tarpitFeed feedCtx posts - --- post context -postCtx :: Context String -postCtx = dateField "date" "%B %e, %Y" `mappend` defaultContext - -tagsCtx :: Tags -> Context String -tagsCtx tags = tagsField "tags" tags `mappend` postCtx - --- hakyll configuration -tarpitConfiguration :: Configuration -tarpitConfiguration = defaultConfiguration - { deployCommand = commStr } - where - commStr = "rsync -avz -e 'ssh -p 2200' " - ++ "_site/* mogosanu.ro:/virtual/sites/thetarpit.org" - --- pandoc reader and writer options -tarpitReaderOptions :: ReaderOptions -tarpitReaderOptions = defaultHakyllReaderOptions - -tarpitWriterOptions :: WriterOptions -tarpitWriterOptions = defaultHakyllWriterOptions - { writerHTMLMathMethod = MathJax "" } - --- tarpit compiler -tarpitCompiler :: Compiler (Item String) -tarpitCompiler = pandocCompilerWith tarpitReaderOptions tarpitWriterOptions - --- support for RSS feeds -tarpitFeed :: FeedConfiguration -tarpitFeed = FeedConfiguration - { feedTitle = "The Tar Pit" - , feedDescription = "tarpit :: IO ()" - , feedAuthorName = "Lucian Mogoșanu" - , feedAuthorEmail = "" - , feedRoot = "http://thetarpit.org" - } diff --git a/templates/archive.html b/templates/archive.html deleted file mode 100644 index e7a1c1b..0000000 --- a/templates/archive.html +++ /dev/null @@ -1,7 +0,0 @@ -

Labels

- -

$taglist$

- -

Posts from The Tar Pit

- -$partial("templates/post-list.html")$ diff --git a/templates/default.html b/templates/default.html deleted file mode 100644 index 1ab9859..0000000 --- a/templates/default.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - The Tar Pit - $title$ - - - - - - - - - - - -
-

$title$

- $body$ -
- - - - - diff --git a/templates/post-list.html b/templates/post-list.html deleted file mode 100644 index 0d1f43a..0000000 --- a/templates/post-list.html +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/templates/post.html b/templates/post.html deleted file mode 100644 index 54b9e84..0000000 --- a/templates/post.html +++ /dev/null @@ -1,7 +0,0 @@ -
- $postid$ - $date$ -- - $tags$ -
- -$body$ diff --git a/templates/teaser.html b/templates/teaser.html deleted file mode 100644 index ad39f51..0000000 --- a/templates/teaser.html +++ /dev/null @@ -1,5 +0,0 @@ -$if(teaser)$ - $teaser$ -$else$ - $body$ -$endif$ diff --git a/thetarpit.cabal b/thetarpit.cabal deleted file mode 100644 index 7a215a7..0000000 --- a/thetarpit.cabal +++ /dev/null @@ -1,25 +0,0 @@ --- Initial thetarpit.cabal generated by cabal init. For further --- documentation, see http://haskell.org/cabal/users-guide/ - -name: thetarpit -version: 0.3.1 -synopsis: The Tar Pit Hakyll site --- description: -homepage: https://github.com/spyked/thetarpit.org -license: OtherLicense -license-file: LICENSE -author: Lucian Mogosanu -maintainer: lucian.mogosanu@gmail.com --- copyright: -category: Web -build-type: Simple --- extra-source-files: -cabal-version: >=1.10 - -executable thetarpit - main-is: site.hs - -- other-modules: - -- other-extensions: - build-depends: base >=4.8, hakyll, pandoc - -- hs-source-dirs: - default-language: Haskell2010