From 5d38e080101cd9618a3ac06a149af90fbf22aafe Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Mon, 10 Jun 2019 22:44:07 +0200 Subject: [PATCH] Exclude files for deployment Remove deprecated Hakyll files --- Makefile | 18 ++++++++--------- site.hs | 46 ------------------------------------------ templates/default.html | 30 --------------------------- 3 files changed, 8 insertions(+), 86 deletions(-) delete mode 100644 site.hs delete mode 100644 templates/default.html diff --git a/Makefile b/Makefile index 164183d..c8d1759 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,5 @@ -TARGET=site - -all: site.hs - ghc $< -o ${TARGET} - -build: all - ./${TARGET} build - tup: + rm -rf preview tup build preview: tup @@ -14,9 +7,14 @@ preview: tup cp -r build preview rm -f preview/tup.config +clean: + git nuke + graph: tup graph . | dot -Tpng > graph.png -deploy: tup - rsync --checksum -ave 'ssh -p 4242' \ +deploy: clean tup + rsync --checksum --copy-links -ave 'ssh -p 4242' \ + --exclude=templates \ + --exclude=tup* \ build/* fab@ffreling.com:public_html/ffreling.com/public/ diff --git a/site.hs b/site.hs deleted file mode 100644 index c7fdfba..0000000 --- a/site.hs +++ /dev/null @@ -1,46 +0,0 @@ ------------------------------------------------------------ -{-# LANGUAGE Arrows #-} -{-# LANGUAGE OverloadedStrings #-} -module Main where - ------------------------------------------------------------ -import Control.Applicative ((<$>)) -import Data.Monoid (mappend, mconcat) -import Prelude hiding (id) -import System.FilePath (replaceExtension, takeDirectory) -import qualified Text.Pandoc as Pandoc - - ------------------------------------------------------------ -import Hakyll - - ------------------------------------------------------------ --- | Entry point -main :: IO () -main = hakyllWith config $ do - - match ("images/*" .||. "favicon.png" .||. "files/*" .||. "font/**" - .||. "projects/*/*.html") $ do - route idRoute - compile copyFileCompiler - - match "css/*" $ do - route idRoute - compile compressCssCompiler - - match "templates/*" $ compile $ templateCompiler - - match ("*.md" .||. "projects/*/*.md") $ do - route $ setExtension "html" - compile $ pandocCompiler - >>= loadAndApplyTemplate "templates/default.html" defaultContext - >>= relativizeUrls - - --------------------------------------------------------------------------------- -config :: Configuration -config = defaultConfiguration - { deployCommand = "rsync --checksum -ave 'ssh -p 4242' \ - \_site/* fab@ffreling.com:public_html/ffreling.com/public/" - } diff --git a/templates/default.html b/templates/default.html deleted file mode 100644 index 7a31baf..0000000 --- a/templates/default.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Fabien Freling's website - - - - - - - - - - - - -

$title$

- - $body$ - - - -