diff options
-rw-r--r-- | LICENSE | 13 | ||||
-rw-r--r-- | README.md | 87 | ||||
-rw-r--r-- | compiler/cabal.project | 2 | ||||
-rw-r--r-- | compiler/default.nix | 96 | ||||
-rw-r--r-- | compiler/site/Main.hs | 86 | ||||
-rw-r--r-- | compiler/site/Rules.hs | 54 | ||||
-rw-r--r-- | compiler/site/site.cabal | 16 | ||||
-rw-r--r-- | default.nix | 25 | ||||
-rw-r--r-- | src/about.rst | 17 | ||||
-rw-r--r-- | src/contact.markdown | 6 | ||||
-rw-r--r-- | src/css/default.css | 141 | ||||
-rw-r--r-- | src/images/haskell-logo.png | bin | 0 -> 5674 bytes | |||
-rw-r--r-- | src/index.html | 16 | ||||
-rw-r--r-- | src/posts/2015-08-12-spqr.markdown | 59 | ||||
-rw-r--r-- | src/posts/2015-10-07-rosa-rosa-rosam.markdown | 46 | ||||
-rw-r--r-- | src/posts/2015-11-28-carpe-diem.markdown | 50 | ||||
-rw-r--r-- | src/posts/2015-12-07-tu-quoque.markdown | 58 | ||||
-rw-r--r-- | src/templates/archive.html | 2 | ||||
-rw-r--r-- | src/templates/default.html | 33 | ||||
-rw-r--r-- | src/templates/post-list.html | 7 | ||||
-rw-r--r-- | src/templates/post.html | 11 |
21 files changed, 825 insertions, 0 deletions
@@ -0,0 +1,13 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/README.md b/README.md new file mode 100644 index 0000000..fb8c4ed --- /dev/null +++ b/README.md @@ -0,0 +1,87 @@ +About +===== + +This is a template site for [Hakyll](https://jaspervdj.be/hakyll/). +It is meant to be more flexible and powerful then the default template created by Hakyll. + + +Structure +========= + +All inputs for Hakyll are under the [src](./src) directory. The +[compiler](./compiler) directory contains the [site builder](./compiler/site) +and may include any other Haskell dependencies. + + +Usage +===== + +With Nix +-------- + +Use the [Nix](https://nixos.org/nix/) package manager: +``` +$ nix build -f . -o www +``` + +This will build the site and put it into the `www` directory (a symbolic +link to a directory), ready to deploy. + + +Or: +``` +$ nix build -f compiler site -o site +$ ./site/bin/site build +``` + +Manually +-------- + +1. Build the site builder: `cd compiler && cabal v2-build site`. +2. Use the site builder from the top directory: + +``` +$ /path/to/site --help +Static site compiler + +Usage: site [-v|--verbose] [-o|--output DIR] [-s|--source DIR] [-c|--cache DIR] + COMMAND + +Available options: + -v,--verbose Run in verbose mode + -o,--output DIR Output directory (default: "_site") + -s,--source DIR Source directory (default: "./src") + -c,--cache DIR Cache directory (default: "_cache") + -h,--help Show this help text + +Available commands: + build Build the site + clean Clean + check Check links + + +$ /path/to/site build +Initialising... + Creating store... + Creating provider... + Running rules... +Checking for out-of-date items +Compiling + updated templates/default.html + updated about.rst + updated templates/post.html + updated posts/2015-08-12-spqr.markdown + updated posts/2015-10-07-rosa-rosa-rosam.markdown + updated posts/2015-11-28-carpe-diem.markdown + updated posts/2015-12-07-tu-quoque.markdown + updated templates/archive.html + updated templates/post-list.html + updated archive.html + updated contact.markdown + updated css/default.css + updated images/haskell-logo.png + updated index.html +Success + +``` + diff --git a/compiler/cabal.project b/compiler/cabal.project new file mode 100644 index 0000000..37b8053 --- /dev/null +++ b/compiler/cabal.project @@ -0,0 +1,2 @@ +packages: ./*/*.cabal + diff --git a/compiler/default.nix b/compiler/default.nix new file mode 100644 index 0000000..b9bd640 --- /dev/null +++ b/compiler/default.nix @@ -0,0 +1,96 @@ +{ boot ? import <nixpkgs> {} }: + +let + + filtFn = root: path: type: + let + name = baseNameOf path; + hidden = builtins.match "\\..+" name != null; + nix = builtins.match ".*\\.nix" name != null; + r = !hidden && !nix ; + in builtins.trace (path + ": " + (if r then "yes" else "no")) r; + + fltsrc = builtins.filterSource (filtFn (builtins.toPath ./. + "/")); + + nixpkgs = boot.pkgs.fetchFromGitHub { + owner = "NixOS"; + repo = "nixpkgs"; + rev = "897ec814c9c234f3ed9d60a1a713025d2f9fab2d"; + sha256 = "0alg5h5zmxdrnfdj94fa4yr5g7j7z3424k78aq44r0a0aqm20iy5"; + }; + + config = { + allowUnfree = true; # for local packages + allowBroken = true; # some nixpkgs' nonsense + }; + + inherit (import nixpkgs { inherit config; }) pkgs; + inherit (pkgs) lib; + + nixHaskellPackages = + let + isnix = n: _: null != builtins.match ".*\\.nix" n && n != "default.nix"; + files = lib.filterAttrs isnix (builtins.readDir ./.); + in lib.mapAttrs' (n: _: + { name = lib.removeSuffix ".nix" n; + value = ./. + "/${n}"; + }) files; + + localHaskellPackages = + let + islocal = n: t: !lib.hasPrefix "." n && t == "directory"; + files = lib.filterAttrs islocal (builtins.readDir ./.); + in lib.mapAttrs (n: _: fltsrc (./. + "/${n}")) files; + + haskellPackages = + let + + hlib = pkgs.haskell.lib; + + set0 = pkgs.haskell.packages.ghc865; + + set1 = set0.extend ( + self: super: + lib.mapAttrs (_: f: super.callPackage f {}) nixHaskellPackages + ); + + set2 = set1.extend ( + self: super: + lib.mapAttrs (n: d: super.callCabal2nix n d {}) localHaskellPackages + ); + + set3 = set2.extend ( + self: super: { + mkDerivation = drv: super.mkDerivation (drv // { + buildTools = (drv.buildTools or []); + + # XXX a lot of troubles are cause by tests which require fancy packages of features. + # XXX Enable tests for critical packages when unsure. + doCheck = false; + + doHaddock = false; + + enableExecutableProfiling = false; + enableLibraryProfiling = false; + }); + + primitive = self.primitive_0_7_0_0; + primitive-extras = self.primitive-extras_0_8; + + }); + + set = set3.extend ( + self: super: + lib.mapAttrs (n: _: + hlib.overrideCabal super.${n} (drv: + { + doCheck = true; + configureFlags = (drv.configureFlags or []) ++ [ + "--ghc-option=-Werror" + ]; + }) + ) localHaskellPackages); + + in set; + +in haskellPackages diff --git a/compiler/site/Main.hs b/compiler/site/Main.hs new file mode 100644 index 0000000..e7fb92f --- /dev/null +++ b/compiler/site/Main.hs @@ -0,0 +1,86 @@ +module Main + ( main + ) where + +import Control.Applicative ((<**>)) +import System.Exit (exitWith) + +import qualified Options.Applicative as O +import System.FilePath ((</>)) + +import qualified Hakyll.Commands as Cmd +import qualified Hakyll.Core.Configuration as Conf +import qualified Hakyll.Core.Logger as Logger + +import Rules (rules) + +data Command + = Build + | Clean + | Check Cmd.Check + +parseCheck :: O.Parser Cmd.Check +parseCheck = + O.flag + Cmd.InternalLinks + Cmd.All + (O.long "all" <> O.short 'a' <> O.help "Check external links as well") + +parseCommand :: O.Parser Command +parseCommand = + O.subparser $ + O.command "build" (O.info (pure Build) (O.progDesc "Build the site")) <> + O.command "clean" (O.info (pure Clean) (O.progDesc "Clean")) <> + O.command + "check" + (O.info ((Check <$> parseCheck) <**> O.helper) (O.progDesc "Check links")) + +data Options = Options + { verbose :: Bool + , outDir :: FilePath + , srcDir :: FilePath + , cacheDir :: FilePath + , command :: Command + } + +parseOptions :: O.Parser Options +parseOptions = + Options <$> + O.switch (O.long "verbose" <> O.short 'v' <> O.help "Run in verbose mode") <*> + O.strOption + (O.long "output" <> O.short 'o' <> O.metavar "DIR" <> O.showDefault <> + O.value (Conf.destinationDirectory Conf.defaultConfiguration) <> + O.help "Output directory") <*> + O.strOption + (O.long "source" <> O.short 's' <> O.metavar "DIR" <> O.showDefault <> + O.value ("." </> "src") <> + O.help "Source directory") <*> + O.strOption + (O.long "cache" <> O.short 'c' <> O.metavar "DIR" <> O.showDefault <> + O.value (Conf.storeDirectory Conf.defaultConfiguration) <> + O.help "Cache directory") <*> + parseCommand + +main :: IO () +main = do + opts <- + O.execParser + (O.info + (parseOptions <**> O.helper) + (O.fullDesc <> O.header "Static site compiler")) + let conf = + Conf.defaultConfiguration + { Conf.destinationDirectory = outDir opts + , Conf.providerDirectory = srcDir opts + , Conf.storeDirectory = cacheDir opts + , Conf.tmpDirectory = cacheDir opts </> "tmp" + } + log <- + Logger.new + (if verbose opts + then Logger.Debug + else Logger.Message) + case command opts of + Build -> Cmd.build conf log rules >>= exitWith + Clean -> Cmd.clean conf log + Check chk -> Cmd.check conf log chk >>= exitWith diff --git a/compiler/site/Rules.hs b/compiler/site/Rules.hs new file mode 100644 index 0000000..0cbf772 --- /dev/null +++ b/compiler/site/Rules.hs @@ -0,0 +1,54 @@ +{-# LANGUAGE OverloadedStrings #-} + +module Rules + ( rules + ) where + +import Hakyll + +postCtx :: Context String +postCtx = dateField "date" "%B %e, %Y" <> defaultContext + +rules :: Rules () +rules = do + match "images/*" $ do + route idRoute + compile copyFileCompiler + match "css/*" $ do + route idRoute + compile compressCssCompiler + match (fromList ["about.rst", "contact.markdown"]) $ do + route $ setExtension "html" + compile $ + pandocCompiler >>= + loadAndApplyTemplate "templates/default.html" defaultContext >>= + relativizeUrls + match "posts/*" $ do + route $ setExtension "html" + compile $ + pandocCompiler >>= loadAndApplyTemplate "templates/post.html" postCtx >>= + loadAndApplyTemplate "templates/default.html" postCtx >>= + relativizeUrls + create ["archive.html"] $ do + route idRoute + compile $ do + posts <- recentFirst =<< loadAll "posts/*" + let archiveCtx = + listField "posts" postCtx (return posts) <> + constField "title" "Archives" <> + defaultContext + makeItem "" >>= loadAndApplyTemplate "templates/archive.html" archiveCtx >>= + loadAndApplyTemplate "templates/default.html" archiveCtx >>= + relativizeUrls + match "index.html" $ do + route idRoute + compile $ do + posts <- recentFirst =<< loadAll "posts/*" + let indexCtx = + listField "posts" postCtx (return posts) <> + constField "title" "Home" <> + defaultContext + getResourceBody >>= applyAsTemplate indexCtx >>= + loadAndApplyTemplate "templates/default.html" indexCtx >>= + relativizeUrls + match "templates/*" $ compile templateBodyCompiler diff --git a/compiler/site/site.cabal b/compiler/site/site.cabal new file mode 100644 index 0000000..072e8f2 --- /dev/null +++ b/compiler/site/site.cabal @@ -0,0 +1,16 @@ +cabal-version: >=1.10 +name: site +version: 0.1.0.0 +build-type: Simple + +executable site + main-is: Main.hs + other-modules: + Rules + default-language: Haskell2010 + ghc-options: -threaded + build-depends: + base -any, + filepath -any, + hakyll >=4.10, + optparse-applicative -any diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..191d66a --- /dev/null +++ b/default.nix @@ -0,0 +1,25 @@ +{ pkgs ? import <nixpkgs> {}}: + +let + + filtFn = root: path: type: + let + name = baseNameOf path; + hidden = builtins.match "[._].+" name != null; + nix = builtins.match ".*\\.nix" name != null; + r = + !hidden && + !nix && + true; + in builtins.trace (path + ": " + (if r then "yes" else "no")) r; + + fltsrc = builtins.filterSource (filtFn (builtins.toPath ./. + "/")); + + site = (import ./compiler { boot = pkgs; }).site; + + src = fltsrc ./src; + +in pkgs.runCommand "site" { LANG = "C.UTF-8"; } '' + ${site}/bin/site --source ${src} --output $out build + ${site}/bin/site --source ${src} --output $out check +'' diff --git a/src/about.rst b/src/about.rst new file mode 100644 index 0000000..99af9e2 --- /dev/null +++ b/src/about.rst @@ -0,0 +1,17 @@ +--- +title: About +--- +Nullam imperdiet sodales orci vitae molestie. Nunc quam orci, pharetra a +rhoncus vitae, eleifend id felis. Suspendisse potenti. Etiam vitae urna orci. +Quisque pellentesque dignissim felis, egestas tempus urna luctus vitae. In hac +habitasse platea dictumst. Morbi fringilla mattis odio, et mattis tellus +accumsan vitae. + +1. Amamus Unicode 碁 +2. Interdum nex magna. + +Vivamus eget mauris sit amet nulla laoreet lobortis. Nulla in diam elementum +risus convallis commodo. Cras vehicula varius dui vitae facilisis. Proin +elementum libero eget leo aliquet quis euismod orci vestibulum. Duis rhoncus +lorem consequat tellus vestibulum aliquam. Quisque orci orci, malesuada porta +blandit et, interdum nec magna. diff --git a/src/contact.markdown b/src/contact.markdown new file mode 100644 index 0000000..78e8698 --- /dev/null +++ b/src/contact.markdown @@ -0,0 +1,6 @@ +--- +title: Contact +--- + +I live in a small hut in the mountains of Kumano Kodō on Kii Hantō and would not +like to be contacted. diff --git a/src/css/default.css b/src/css/default.css new file mode 100644 index 0000000..381ff73 --- /dev/null +++ b/src/css/default.css @@ -0,0 +1,141 @@ +html { + font-size: 62.5%; +} + +body { + font-size: 1.6rem; + color: #000; +} + +header { + border-bottom: 0.2rem solid #000; +} + +nav { + text-align: right; +} + +nav a { + font-size: 1.8rem; + font-weight: bold; + color: black; + text-decoration: none; + text-transform: uppercase; +} + +footer { + margin-top: 3rem; + padding: 1.2rem 0; + border-top: 0.2rem solid #000; + font-size: 1.2rem; + color: #555; +} + +h1 { + font-size: 2.4rem; +} + +h2 { + font-size: 2rem; +} + +article .header { + font-size: 1.4rem; + font-style: italic; + color: #555; +} + +.logo a { + font-weight: bold; + color: #000; + text-decoration: none; +} + +@media (max-width: 319px) { + body { + width: 90%; + margin: 0; + padding: 0 5%; + } + header { + margin: 4.2rem 0; + } + nav { + margin: 0 auto 3rem; + text-align: center; + } + footer { + text-align: center; + } + .logo { + text-align: center; + margin: 1rem auto 3rem; + } + .logo a { + font-size: 2.4rem; + } + nav a { + display: block; + line-height: 1.6; + } +} + +@media (min-width: 320px) { + body { + width: 90%; + margin: 0; + padding: 0 5%; + } + header { + margin: 4.2rem 0; + } + nav { + margin: 0 auto 3rem; + text-align: center; + } + footer { + text-align: center; + } + .logo { + text-align: center; + margin: 1rem auto 3rem; + } + .logo a { + font-size: 2.4rem; + } + nav a { + display: inline; + margin: 0 0.6rem; + } +} + +@media (min-width: 640px) { + body { + width: 60rem; + margin: 0 auto; + padding: 0; + } + header { + margin: 0 0 3rem; + padding: 1.2rem 0; + } + nav { + margin: 0; + text-align: right; + } + nav a { + margin: 0 0 0 1.2rem; + display: inline; + } + footer { + text-align: right; + } + .logo { + margin: 0; + text-align: left; + } + .logo a { + float: left; + font-size: 1.8rem; + } +} diff --git a/src/images/haskell-logo.png b/src/images/haskell-logo.png Binary files differnew file mode 100644 index 0000000..97c0937 --- /dev/null +++ b/src/images/haskell-logo.png diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..6dd191d --- /dev/null +++ b/src/index.html @@ -0,0 +1,16 @@ +--- +title: Home +--- + +<h2>Welcome</h2> + +<img src="/images/haskell-logo.png" style="float: right; margin: 10px;" /> + +<p>Welcome to my blog!</p> + +<p>I've reproduced a list of recent posts here for your reading pleasure:</p> + +<h2>Posts</h2> +$partial("templates/post-list.html")$ + +<p>…or you can find more in the <a href="/archive.html">archives</a>.</p> diff --git a/src/posts/2015-08-12-spqr.markdown b/src/posts/2015-08-12-spqr.markdown new file mode 100644 index 0000000..3704aa5 --- /dev/null +++ b/src/posts/2015-08-12-spqr.markdown @@ -0,0 +1,59 @@ +--- +title: S.P.Q.R. +--- + +Mauris in lorem nisl. Maecenas tempus facilisis ante, eget viverra nisl +tincidunt et. Donec turpis lectus, mattis ac malesuada a, accumsan eu libero. +Morbi condimentum, tortor et tincidunt ullamcorper, sem quam pretium nulla, id +convallis lectus libero nec turpis. Proin dapibus nisi id est sodales nec +ultrices tortor pellentesque. Vivamus vel nisi ac lacus sollicitudin vulputate +ac ut ligula. Nullam feugiat risus eget eros gravida in molestie sapien euismod. +Nunc sed hendrerit orci. Nulla mollis consequat lorem ac blandit. Ut et turpis +mauris. Nulla est odio, posuere id ullamcorper sit amet, tincidunt vel justo. +Curabitur placerat tincidunt varius. Nulla vulputate, ipsum eu consectetur +mollis, dui nibh aliquam neque, at ultricies leo ligula et arcu. Proin et mi +eget tellus sodales lobortis. Sed tempor, urna vel pulvinar faucibus, lectus +urna vehicula ante, at facilisis dolor odio at lorem. Morbi vehicula euismod +urna, et imperdiet urna ornare vitae. + +Sed tincidunt sollicitudin ultrices. In hac habitasse platea dictumst. Morbi +ligula lectus, egestas at ultricies nec, fringilla et tellus. Duis urna lorem, +bibendum a ornare sed, euismod sed nunc. Aliquam tempor massa at velit fringilla +fringilla. Praesent sit amet tempor felis. Maecenas id felis ac velit aliquam +tempor a sit amet orci. Nunc placerat nulla pellentesque sem commodo cursus. +Praesent quis sapien orci, quis ultricies augue. Nam vestibulum sem non augue +semper tincidunt pellentesque ipsum volutpat. Duis congue, nunc a aliquam +luctus, quam ante convallis nisi, ac pellentesque lacus orci vel turpis. Cum +sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus +mus. Suspendisse hendrerit nisl eu felis sagittis faucibus. Nunc eu congue +lorem. Quisque non nibh nisi, et ultrices massa. Sed vitae erat vitae nulla +pellentesque fermentum. + +Ut diam nunc, consectetur ut ultrices eu, iaculis sed felis. Sed lacinia, odio +et accumsan luctus, arcu ipsum accumsan erat, sit amet malesuada libero lacus et +velit. Donec accumsan tristique tristique. Proin a metus magna, vitae mattis +nisl. Integer a libero ipsum. Mauris faucibus eleifend metus id sodales. Morbi +ornare, nibh nec facilisis imperdiet, turpis sem commodo lorem, id commodo +mauris metus vitae justo. Etiam at pellentesque tortor. Proin mollis accumsan +ligula, nec tempus augue auctor quis. Nulla lacinia, mi quis lobortis auctor, +nisi diam posuere dui, pulvinar feugiat dui libero eget quam. Fusce eu risus +nunc, a consectetur orci. Class aptent taciti sociosqu ad litora torquent per +conubia nostra, per inceptos himenaeos. Maecenas venenatis aliquet orci, a +ultricies sem facilisis eu. Donec dolor purus, porta condimentum convallis nec, +dignissim nec libero. + +Etiam rutrum ultricies dui, et interdum metus elementum et. Nulla sapien nunc, +interdum tristique porttitor in, laoreet vitae mi. Ut vehicula auctor mauris sit +amet bibendum. Phasellus adipiscing mattis libero, eget adipiscing erat +dignissim at. Vivamus convallis malesuada metus nec cursus. Ut cursus, lorem +eleifend sollicitudin condimentum, felis tortor sodales augue, ac tempus lacus +ipsum vitae quam. Vestibulum vitae lacus non tortor vehicula iaculis faucibus +quis massa. + +Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus +mus. Duis malesuada neque nec ante porttitor accumsan. Suspendisse potenti. +Aliquam in lacus magna, imperdiet laoreet lectus. Praesent id diam nec ante +commodo rhoncus nec vel augue. Pellentesque tortor massa, dignissim ut sagittis +sed, hendrerit vitae nunc. Nam gravida, urna vitae hendrerit rutrum, felis augue +vulputate tortor, ut varius velit libero nec lectus. In adipiscing massa in est +scelerisque ullamcorper. Vivamus in nisi metus. diff --git a/src/posts/2015-10-07-rosa-rosa-rosam.markdown b/src/posts/2015-10-07-rosa-rosa-rosam.markdown new file mode 100644 index 0000000..bbda8fd --- /dev/null +++ b/src/posts/2015-10-07-rosa-rosa-rosam.markdown @@ -0,0 +1,46 @@ +--- +title: Rosa Rosa Rosam +author: Ovidius +--- + +Suspendisse pharetra ullamcorper sem et auctor. Suspendisse vitae tellus eu +turpis dignissim gravida ut ut tortor. Cum sociis natoque penatibus et magnis +dis parturient montes, nascetur ridiculus mus. Morbi aliquam sapien quis nisl +sodales non aliquet nisl iaculis. Curabitur fermentum orci vel sapien +pellentesque id condimentum metus vehicula. Curabitur turpis purus, scelerisque +at interdum quis, placerat sit amet tortor. Aliquam erat volutpat. + +Integer posuere felis non arcu suscipit ullamcorper. Nam tempus risus venenatis +orci sagittis eu aliquam ante tincidunt. Aenean vehicula ipsum id sapien +tincidunt commodo. Aliquam erat volutpat. Curabitur vehicula libero ac turpis +cursus consectetur. Praesent posuere egestas purus et dapibus. Mauris egestas, +lectus vitae scelerisque ultricies, metus lorem tempor nisi, sed vehicula tortor +mauris nec urna. Quisque urna tellus, facilisis at mollis eget, adipiscing in +nisl. Proin quam arcu, euismod et imperdiet sed, ultricies sed orci. + +Nulla malesuada sem eget lectus scelerisque nec rhoncus metus interdum. In dui +felis, rhoncus id scelerisque eget, vulputate id sem. Nulla facilisi. Vestibulum +eleifend, metus dignissim lacinia ornare, magna nulla vehicula nisi, sed +molestie mauris ipsum vel turpis. Class aptent taciti sociosqu ad litora +torquent per conubia nostra, per inceptos himenaeos. Nulla urna leo, vehicula +eget dignissim a, hendrerit ut risus. Fusce ultricies elementum placerat. Nam at +dolor sed nisi mollis sollicitudin vitae at urna. Vestibulum iaculis adipiscing +eros et mollis. + +Phasellus ultricies elit eu risus sagittis eu dictum ante ultrices. Nulla +congue, augue ac placerat tempor, orci mi luctus nisi, at varius ipsum sem sed +eros. Vivamus eget velit eget felis posuere ornare. In sed metus non est iaculis +facilisis dapibus sit amet enim. Aliquam viverra tortor eget neque volutpat in +auctor urna rutrum. Aliquam ligula augue, congue sit amet rutrum in, semper vel +nulla. Sed tempus porttitor faucibus. Donec cursus sodales nulla, quis lacinia +mi vehicula vel. Sed nec purus orci. Nam leo sapien, rutrum a ultrices quis, +placerat vel ligula. Donec massa quam, pellentesque et molestie nec, hendrerit +id mauris. In hac habitasse platea dictumst. Cras quis quam sem. Curabitur in +arcu diam, in interdum mauris. + +Proin lorem sapien, iaculis et faucibus nec, dictum sed nunc. Pellentesque in +purus justo. Vestibulum facilisis rutrum nisi, a egestas nunc suscipit sed. Ut +quis tortor a arcu bibendum placerat non sed ante. Praesent orci sem, posuere +sit amet cursus molestie, volutpat ut purus. Curabitur aliquam, purus in +pharetra viverra, lorem leo aliquam tellus, vel consequat felis neque et mauris. +Aliquam erat volutpat. diff --git a/src/posts/2015-11-28-carpe-diem.markdown b/src/posts/2015-11-28-carpe-diem.markdown new file mode 100644 index 0000000..bd115da --- /dev/null +++ b/src/posts/2015-11-28-carpe-diem.markdown @@ -0,0 +1,50 @@ +--- +title: Carpe Diem +--- + +Fusce tortor quam, egestas in posuere quis, porttitor vel turpis. Donec +vulputate porttitor augue at rhoncus. Proin iaculis consectetur sagittis. +Curabitur venenatis turpis sit amet purus tristique nec posuere risus laoreet. +Nullam nisi sem, dapibus id semper id, egestas vel arcu. Morbi porttitor ipsum +placerat erat consequat sed consequat purus feugiat. Donec auctor elit ut risus +mattis facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. + +Proin vulputate sapien facilisis leo ornare pulvinar. Fusce tempus massa a risus +semper iaculis. Suspendisse sollicitudin posuere nunc, sit amet rutrum leo +facilisis mattis. Sed ornare auctor dui, vitae rutrum neque auctor sit amet. +Proin ac dui magna. Mauris vehicula interdum augue, nec ultrices libero egestas +quis. Nunc convallis euismod ipsum, id sollicitudin orci consequat ac. Fusce +bibendum congue libero, in rutrum nulla congue non. Cras sit amet risus tortor, +eu pellentesque dui. Phasellus euismod enim non nibh sodales quis consectetur +lorem laoreet. Vivamus a egestas quam. Curabitur in tortor augue, vitae varius +tellus. Integer varius, elit ac gravida suscipit, eros erat pellentesque nisi, +et tristique augue odio id nulla. Aliquam sit amet nunc vel tellus hendrerit +tempus ac vel sem. + +Aenean tincidunt sollicitudin sapien ut porttitor. Curabitur molestie adipiscing +lorem vel scelerisque. Donec vitae interdum est. Proin rutrum vulputate +faucibus. Suspendisse sit amet felis odio, non volutpat ante. Sed eu lectus +quam. Curabitur tristique rhoncus est, vel commodo tortor suscipit semper. +Maecenas feugiat vestibulum nisi id facilisis. Nulla non tincidunt libero. +Praesent ultrices interdum commodo. Sed euismod nisl auctor leo ultrices rutrum. +Aliquam nibh felis, congue molestie blandit at, bibendum at eros. Aenean +tincidunt, tortor iaculis placerat sollicitudin, lorem justo tempor diam, et +posuere sapien leo et magna. Quisque vel aliquam mauris. + +Proin varius tempus fermentum. Cum sociis natoque penatibus et magnis dis +parturient montes, nascetur ridiculus mus. Sed tincidunt nunc id magna +adipiscing non sollicitudin turpis tempor. Etiam vel elit ipsum, quis euismod +velit. Quisque elementum magna vitae quam venenatis lacinia. Sed at arcu ipsum. +Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos +himenaeos. Donec ut lorem ac sapien cursus lacinia sit amet mollis dolor. +Vivamus tempus odio nec magna faucibus sed hendrerit lorem tempor. + +Vestibulum eu nisi arcu. Curabitur nisi risus, fermentum ut lacinia ut, interdum +nec magna. Nunc aliquet gravida massa, eu aliquam lorem faucibus at. Sed +sollicitudin volutpat velit id tempor. In nibh justo, pharetra et pretium +dignissim, tempus in turpis. Phasellus eget lobortis nisl. Phasellus sed +fermentum diam. Nam tempus pharetra odio, quis congue eros imperdiet eu. Aliquam +dui eros, hendrerit et vulputate vel, porta eu eros. Nullam nisi dui, commodo +eget pharetra ut, ornare sit amet nunc. Fusce vel neque urna. Maecenas nulla +ante, egestas at consequat quis, fermentum a enim. Aliquam id tristique urna. +Integer augue justo, scelerisque et consectetur id, rhoncus eget enim. diff --git a/src/posts/2015-12-07-tu-quoque.markdown b/src/posts/2015-12-07-tu-quoque.markdown new file mode 100644 index 0000000..bdf2ea4 --- /dev/null +++ b/src/posts/2015-12-07-tu-quoque.markdown @@ -0,0 +1,58 @@ +--- +title: Tu Quoque +author: Julius +--- + +Vestibulum leo turpis, dignissim quis ultrices sit amet, iaculis ac ligula. +Pellentesque tristique, velit eget scelerisque scelerisque, est dolor ultrices +arcu, quis ullamcorper justo arcu luctus mauris. Integer congue molestie nisi id +posuere. Fusce pellentesque gravida tempus. Integer viverra tortor nec eros +mollis quis convallis sem laoreet. Nulla id libero ac erat varius laoreet. Proin +sed est est. Curabitur lacinia fermentum lorem, elementum malesuada ipsum +malesuada ut. Donec suscipit elit id leo vehicula mattis non sed leo. Morbi +varius eleifend varius. Nulla vestibulum, neque vitae aliquam eleifend, nisi +tellus placerat nunc, quis suscipit elit turpis eu tortor. Etiam euismod +convallis lectus quis venenatis. Phasellus laoreet magna in nibh cursus eu +egestas nulla convallis. Aliquam vel ullamcorper risus. Fusce dictum, massa id +consequat viverra, nulla ante tristique est, a faucibus nisi enim nec dui. Donec +metus ligula, condimentum at porttitor eget, lobortis at quam. + +Aenean vel libero in magna ultricies congue in a odio. Donec faucibus rutrum +ornare. Fusce dictum eleifend fermentum. Vestibulum vel nibh a metus porttitor +rhoncus. Pellentesque id quam neque, eget molestie arcu. Integer in elit vel +neque viverra ultricies in eget massa. Nam ut convallis est. Pellentesque eros +eros, sodales non vehicula et, tincidunt ut odio. Cras suscipit ultrices metus +sit amet molestie. Fusce enim leo, vehicula sed sodales quis, adipiscing at +ipsum. + +Nunc tempor dignissim enim, sed tincidunt eros bibendum quis. Curabitur et dolor +augue, id laoreet mi. Nulla cursus felis id dui vehicula vitae ornare lorem +blandit. Cras eget dui nec odio volutpat pharetra. Fusce hendrerit justo justo, +vel imperdiet enim. Vivamus elit risus, interdum ultrices accumsan eleifend, +vestibulum vitae sapien. Integer bibendum ullamcorper tristique. Nulla quis odio +lectus, quis eleifend augue. Integer a ligula mauris. Aenean et tempus tortor. +Quisque at tortor mi. Vivamus accumsan feugiat est a blandit. Sed vitae enim ut +dolor semper sodales. Duis tristique, ante et placerat elementum, nulla tellus +pellentesque sapien, quis posuere velit mi eget nulla. Sed vestibulum nunc non +est porttitor ut rutrum nibh semper. Pellentesque habitant morbi tristique +senectus et netus et malesuada fames ac turpis egestas. + +Nulla adipiscing ultricies lobortis. Vivamus iaculis nisl vitae tellus laoreet +vitae aliquet lacus mollis. Phasellus ut lacus urna, sed sagittis ante. Etiam +consectetur pretium nisl sed dignissim. Pellentesque convallis, nisl eget +commodo mollis, sem magna consequat arcu, sed pretium ipsum arcu sit amet neque. +Aliquam erat volutpat. Morbi sed mi sed urna vestibulum placerat vitae vel +metus. Fusce ac ante at justo pharetra vehicula. Vivamus vel tortor eget augue +aliquet aliquet at vel odio. Nunc venenatis, magna quis facilisis fringilla, +augue tellus varius neque, in vulputate est eros ut tortor. Duis lorem neque, +aliquam congue posuere id, condimentum non dui. Phasellus ut dui massa, +porttitor suscipit augue. Praesent quis tellus quam, vel volutpat metus. Vivamus +enim est, aliquam in imperdiet et, sagittis eu ligula. Vestibulum hendrerit +placerat orci et aliquet. Cras pharetra, dolor placerat lobortis tempor, metus +odio cursus ligula, et posuere lacus ligula quis dui. + +Donec a lectus eu nibh malesuada aliquam. Proin at metus quam, et tincidunt leo. +Quisque lacus justo, scelerisque sodales pulvinar sed, dignissim ut sapien. +Vivamus diam felis, adipiscing sollicitudin ultricies id, accumsan ac felis. In +eu posuere ligula. Suspendisse potenti. Donec porttitor dictum dui id vehicula. +Integer ante velit, congue id dictum et, adipiscing a tortor. diff --git a/src/templates/archive.html b/src/templates/archive.html new file mode 100644 index 0000000..b43eeb2 --- /dev/null +++ b/src/templates/archive.html @@ -0,0 +1,2 @@ +Here you can find all my previous posts: +$partial("templates/post-list.html")$ diff --git a/src/templates/default.html b/src/templates/default.html new file mode 100644 index 0000000..e91badc --- /dev/null +++ b/src/templates/default.html @@ -0,0 +1,33 @@ +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta http-equiv="x-ua-compatible" content="ie=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>My Hakyll Blog - $title$</title> + <link rel="stylesheet" href="/css/default.css" /> + </head> + <body> + <header> + <div class="logo"> + <a href="/">My Hakyll Blog</a> + </div> + <nav> + <a href="/">Home</a> + <a href="/about.html">About</a> + <a href="/contact.html">Contact</a> + <a href="/archive.html">Archive</a> + </nav> + </header> + + <main role="main"> + <h1>$title$</h1> + $body$ + </main> + + <footer> + Site proudly generated by + <a href="http://jaspervdj.be/hakyll">Hakyll</a> + </footer> + </body> +</html> diff --git a/src/templates/post-list.html b/src/templates/post-list.html new file mode 100644 index 0000000..71cf1b9 --- /dev/null +++ b/src/templates/post-list.html @@ -0,0 +1,7 @@ +<ul> + $for(posts)$ + <li> + <a href="$url$">$title$</a> - $date$ + </li> + $endfor$ +</ul> diff --git a/src/templates/post.html b/src/templates/post.html new file mode 100644 index 0000000..732149b --- /dev/null +++ b/src/templates/post.html @@ -0,0 +1,11 @@ +<article> + <section class="header"> + Posted on $date$ + $if(author)$ + by $author$ + $endif$ + </section> + <section> + $body$ + </section> +</article> |