Basic Hakyll setup

This commit is contained in:
Tito Sacchi 2021-11-01 11:42:02 +01:00
parent 1ee85ebf0d
commit f6ea49b188
5 changed files with 48 additions and 17 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
.*.swp
_cache/
_site/

15
index.md Normal file
View File

@ -0,0 +1,15 @@
---
title: Home
---
# Hi! Welcome to my website.
I'm Tito Sacchi, an Italian guy trying to have fun while deciding which of my
interests I'm willing to spend more time on in the forecoming years. I like
maths, computers, classical piano, swimming, electric guitars, hiking, and a
lot of other things that I'd be glad to share with someone else.
Write me at <tito@tilde.team>. You can find some (hopefully) accurate contact
information on the [contact page](contact.html).
[comment]: # vim: ts=2:sts=2:sw=2:et:nojoinspaces

24
site.hs Normal file
View File

@ -0,0 +1,24 @@
{-# LANGUAGE OverloadedStrings #-}
import Hakyll
main :: IO ()
main = hakyll $ do
match "images/*" $ do
route idRoute
compile copyFileCompiler
match "css/style.scss" $ do
route $ setExtension "css"
compile $ getResourceString
>>= withItemBody (unixFilter "sass" ["--stdin"])
>>= return . fmap compressCss
match "*.md" $ do
route $ setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/default.html" defaultContext
>>= relativizeUrls
match "templates/*" $ compile templateBodyCompiler
-- vim: ts=4:sts=4:sw=4:et

View File

@ -9,8 +9,8 @@
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@300;400&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<link rel="stylesheet" href="style.css">
<title>~tito</title>
<link rel="stylesheet" href="css/style.css">
<title>~tito • $title$</title>
<meta name="description" content="tito's tilde page">
</head>
<body>
@ -22,9 +22,7 @@
<div class="container">
<header class="row">
<div class="title">
<!-- <span class="title">~tito</span> -->
<h1><a href=".">/home/tito</a></h1>
<!-- <a href=".">/home/tito</a> -->
</div>
</header>
<nav class="row">
@ -35,19 +33,10 @@
</ul>
</nav>
<main class="row">
<h2>Hi! I'm tito.</h2>
<p>
I'm Tito Sacchi, an Italian guy trying to have fun while deciding
which of my interests I'm willing to spend more time on in the
forecoming years. I like maths, computers, classical piano, swimming,
electric guitars, hiking, and a lot of other things that I'd be glad
to share with someone else.
<a href="about_me.html">More about me and my interests.</a>
</p>
<p>
Write me at <a href="mailto:tito@tilde.team">tito@tilde.team</a>.
You can find more accurate contact information on the <a href="contacts.html">contact page</a>.
</p>
$if(showtitle)$
<h1>$title$</h1>
$endif$
$body$
</main>
<footer class="row">
<p class="text-muted">