@@ -0,0 +1,24 @@ | |||
dist | |||
dist-* | |||
cabal-dev | |||
*.o | |||
*.hi | |||
*.chi | |||
*.chs.h | |||
*.dyn_o | |||
*.dyn_hi | |||
.hpc | |||
.hsenv | |||
.cabal-sandbox/ | |||
cabal.sandbox.config | |||
*.prof | |||
*.aux | |||
*.hp | |||
*.eventlog | |||
.stack-work/ | |||
cabal.project.local | |||
cabal.project.local~ | |||
.HTF/ | |||
.ghc.environment.* | |||
_site/ | |||
_cache/ |
@@ -0,0 +1,5 @@ | |||
# Revision history for rf | |||
## 0.1.0.0 -- 2018-08-18 | |||
* First version, counting from when I got around to putting it on git. |
@@ -0,0 +1,30 @@ | |||
Copyright (c) 2018, Shaun Kerr | |||
All rights reserved. | |||
Redistribution and use in source and binary forms, with or without | |||
modification, are permitted provided that the following conditions are met: | |||
* Redistributions of source code must retain the above copyright | |||
notice, this list of conditions and the following disclaimer. | |||
* Redistributions in binary form must reproduce the above | |||
copyright notice, this list of conditions and the following | |||
disclaimer in the documentation and/or other materials provided | |||
with the distribution. | |||
* Neither the name of Shaun Kerr nor the names of other | |||
contributors may be used to endorse or promote products derived | |||
from this software without specific prior written permission. | |||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
@@ -0,0 +1,73 @@ | |||
# Regular Flolloping | |||
tA's Blog | |||
## Getting Started | |||
What you need to get the generator up and running. | |||
### Prerequisites | |||
Assumes you have Cabal and Nix. | |||
Nix can be installed with: | |||
``` | |||
curl https://nixos.org/nix/install | sh | |||
``` | |||
And Cabal can be installed with your package manager of choice. | |||
### Installing | |||
Enter the build environment | |||
``` | |||
nix-shell --attr env rf.nix | |||
``` | |||
Compile the generator | |||
``` | |||
cabal build | |||
``` | |||
Generate the site | |||
``` | |||
cabal run site clean | |||
cabal run site build | |||
``` | |||
And test it out | |||
``` | |||
cabal run site watch | |||
``` | |||
The site will now be avaliable at `localhost:8000` | |||
## Deployment | |||
Site will be completely static, so simply point your server to the `_site` directory | |||
## Built With | |||
* [Hakyll](https://jaspervdj.be) - The web framework used | |||
* [Nix](https://nixos.org) - Package Management | |||
* [Cabal](https://cabal.readthedocs.io) - Build System | |||
## Versioning | |||
Is very airy fairy and mainly based on what I think constitutes major / minor updates. | |||
## Authors | |||
* **Shaun Kerr** - [tA](https://github.com/techieAgnostic) | |||
## License | |||
This project is licensed under the BSD3 License - see the [LICENSE.md](LICENSE.md) file for details | |||
## Acknowledgments | |||
* Hakyll for having an incredible default, of which 90% was kept | |||
* Douglas Adam's for providing the name | |||
* You, for reading this :) |
@@ -0,0 +1,2 @@ | |||
import Distribution.Simple | |||
main = defaultMain |
@@ -0,0 +1,34 @@ | |||
--- | |||
title: About | |||
--- | |||
what is **Regular Flolloping**? | |||
# jokingly | |||
**Regular Flolloping** is: | |||
* my blog | |||
* filled with armchair psychology | |||
* filled with bad opinions on tech | |||
* something mattresses need to do | |||
# technically | |||
**Regular Flolloping** is: | |||
* powered by [Hakyll](https://jaspervdj.be/hakyll/) | |||
* running on [Digital Ocean](https://www.digitalocean.com/) | |||
* sourced from [GitHub](https://github.com) | |||
* probably badly written | |||
# pretensiously | |||
**Regular Flolloping** is **Layer 03** of the [Protocol Seven System](https://p7.co.nz) | |||
**Layer 03**, also known as **Psyche** | |||
the complexities of the human brain through the medium of text, | |||
a carefully and oft not-so-carefully curated mask for the identity that is **tA**, | |||
a slight variation of common knowledge, | |||
yet of more importance than the content, | |||
the characterisation of the reaction to said knowledge | |||
> If you use Psyche as a processor, you're missing the point. ~ *layer03::Psyche* |
@@ -0,0 +1,9 @@ | |||
you access archives and find: | |||
* An [SSL Endorsement](https://netrunnerdb.com/en/card/21038) | |||
* A [Degree Mill](https://netrunnerdb.com/en/card/21055) | |||
* A [15 Minutes](https://netrunnerdb.com/en/card/09004) | |||
and make me very sad. | |||
you also find all of this junk: |
@@ -0,0 +1,9 @@ | |||
--- | |||
title: Contact | |||
--- | |||
* email me at [s@p7.co.nz](mailto:s@p7.co.nz) | |||
* come chill at **#scoots** on [ServerChan](https://p7.co.nz/layer08/) | |||
* if you see a **tA**, **techieAgnostic** or anything in the form of **t\*A\*** on irc its probably me | |||
* i hang out on [Ocean Lounge](https://discord.gg/0oqynmoeGIUO49rW) a fair bit | |||
* if you're an [urbit](https://urbit.org) i'm occasionally on as **~bannum-magtus** |
@@ -0,0 +1,138 @@ | |||
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; | |||
font-size: 3.4rem; | |||
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 { | |||
} | |||
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 { | |||
} | |||
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 auto 3rem; | |||
text-align: center; | |||
} | |||
footer { | |||
text-align: center; | |||
} | |||
.logo { | |||
text-align: center; | |||
margin: 1rem auto 3rem; | |||
} | |||
.logo a { | |||
} | |||
nav a { | |||
display: inline; | |||
margin: 0 0.6rem; | |||
} | |||
} |
@@ -0,0 +1,12 @@ | |||
{ mkDerivation, base, filepath, hakyll, stdenv }: | |||
mkDerivation { | |||
pname = "rf"; | |||
version = "0.1.0.0"; | |||
src = ./.; | |||
isLibrary = false; | |||
isExecutable = true; | |||
executableHaskellDepends = [ base filepath hakyll ]; | |||
homepage = "regularflolloping.com"; | |||
description = "tA's blog"; | |||
license = stdenv.lib.licenses.bsd3; | |||
} |
@@ -0,0 +1,10 @@ | |||
== | |||
= humans.txt for regularflolloping.com | |||
== | |||
my name is shaun and i am a human | |||
i usually go by either tA, techieAgnostic, or some name of the form t*A* | |||
my email is s@p7.co.nz and it is functioning at least 30% of the time | |||
i made this site with help from the people who made hakyll | |||
i hope we can be friends |
@@ -0,0 +1,12 @@ | |||
--- | |||
title: Home | |||
--- | |||
<p>please don't laugh at me i really like swatch internet time</p> | |||
<p>here are some recent (for a very liberal definition of the word) posts:</p> | |||
<h2>"Recent" Posts</h2> | |||
$partial("templates/post-list.html")$ | |||
<p>…or for a chance to nab seven agenda points, check the <a href="/archive/index.html">archives</a>.</p> |
@@ -0,0 +1,42 @@ | |||
--- | |||
title: Things I Like | |||
published: 2018-08-17 | |||
--- | |||
howdy one and all, to my inaugural post. | |||
what follows is a list of potentially somewhat obscure feelings, that instill a subtle, non-zero amount of joy in me, without reaching levels for me to register them as good feelings. | |||
without further ado: | |||
## lowercase letters | |||
much, i imagine, to the disgust of my english teacher mother, i really enjoy writing entirely in lowercase when i can. i believe it started on irc as a homestuck style (yet subtle enough to not give away being trash) quirk for some sense of identity that was seperate to having an actual personality. | |||
## using the (y) emoji outside of facebook | |||
on facebook, using `(y)` will produce a thumbs up emoji that is different to the current readily and easily avaliable one, so already it's pretty nice. theres something completely different about using it outside of facebook. i once met someone on discord who did the same thing. i have not talked to them since, nor can i remember their name, but i consider them a friend in the same way i consider anyone who uses dvorak a friend | |||
## the jazzy bit in the middle of Fluff's Travels by Phish | |||
shouldn't really need an explanation, [Fluffhead // Fluff's Travels](https://www.youtube.com/watch?v=Q54O03orQ4s) is such a good two piece and the jazz bit is the best part. | |||
## the following dialog from "The Point (1971)" | |||
>"if everything has a point, then i must have one too" | |||
>"he's got a point there!" | |||
## swatch internet time in my shell prompt | |||
one day there'll be enough of us to make swatch beats a standard, until then i'll just await the day my pebble battery dies and i have to go back to a normal watch | |||
## people you know not noticing you in public | |||
all the upsides of being a social person and realising you know a lot more people than you think you do, but with none of the downsides of actually having to talk to people and take your headphones off | |||
## half-assed projects | |||
...of which this post is included. one day i'll finish something and maintain it, but until then theres something comfy about looking into `~/projects` and finding about seven variations on `ta_sdl_game_engine` dating back to highschool | |||
--- | |||
hopefully you enjoyed these half assed ramblings. until next time, peace out, ima' bounce, and carry on my dudes.xvid.h264.mkv |
@@ -0,0 +1,27 @@ | |||
-- Initial rf.cabal generated by cabal init. For further documentation, | |||
-- see http://haskell.org/cabal/users-guide/ | |||
name: rf | |||
version: 0.1.0.0 | |||
synopsis: tA's blog | |||
-- description: | |||
homepage: regularflolloping.com | |||
license: BSD3 | |||
license-file: LICENSE | |||
author: Shaun Kerr | |||
maintainer: s@p7.co.nz | |||
-- copyright: | |||
category: Web | |||
build-type: Simple | |||
extra-source-files: ChangeLog.md | |||
cabal-version: >=1.10 | |||
executable site | |||
main-is: site.hs | |||
-- other-modules: | |||
-- other-extensions: | |||
build-depends: base >=4.10 && <4.11 | |||
, hakyll | |||
, filepath | |||
-- hs-source-dirs: | |||
default-language: Haskell2010 |
@@ -0,0 +1,4 @@ | |||
let | |||
pkgs = import <nixpkgs> { }; | |||
in | |||
pkgs.haskellPackages.callPackage ./default.nix { } |
@@ -0,0 +1,106 @@ | |||
{-# LANGUAGE OverloadedStrings #-} | |||
import Hakyll | |||
import Data.Monoid (mappend) | |||
import Data.List (sortBy,isSuffixOf) | |||
import System.FilePath.Posix (takeBaseName,takeDirectory,(</>)) | |||
import GHC.IO.Encoding | |||
main :: IO () | |||
main = do | |||
setLocaleEncoding utf8 | |||
hakyll $ do | |||
match "humans.txt" $ do | |||
route idRoute | |||
compile copyFileCompiler | |||
match "images/*" $ do | |||
route idRoute | |||
compile copyFileCompiler | |||
match "css/*" $ do | |||
route idRoute | |||
compile compressCssCompiler | |||
match (fromList ["about.md", "contact.md"]) $ do | |||
route $ cleanRoute | |||
compile $ pandocCompiler | |||
>>= loadAndApplyTemplate "templates/default.html" defaultContext | |||
>>= relativizeUrls | |||
>>= cleanIndexUrls | |||
match "archive.md" $ do | |||
route $ cleanRoute | |||
compile $ pandocCompiler | |||
>>= loadAndApplyTemplate "templates/archive.html" defaultContext | |||
>>= relativizeUrls | |||
>>= cleanIndexUrls | |||
compile $ do | |||
posts <- recentFirst =<< loadAll "posts/*" | |||
let archiveCtx = | |||
listField "posts" postCtx (return posts) `mappend` | |||
constField "title" "Archives" `mappend` | |||
defaultContext | |||
pandocCompiler | |||
>>= loadAndApplyTemplate "templates/archive.html" archiveCtx | |||
>>= loadAndApplyTemplate "templates/default.html" archiveCtx | |||
>>= relativizeUrls | |||
>>= cleanIndexUrls | |||
match "posts/*" $ do | |||
route $ cleanRoute | |||
compile $ pandocCompiler | |||
>>= loadAndApplyTemplate "templates/post.html" postCtx | |||
>>= loadAndApplyTemplate "templates/default.html" postCtx | |||
>>= relativizeUrls | |||
>>= cleanIndexUrls | |||
>>= cleanIndexHtmls | |||
create ["archive/index.html"] $ do | |||
route idRoute | |||
match "index.html" $ do | |||
route idRoute | |||
compile $ do | |||
posts <- recentFirst =<< loadAll "posts/*" | |||
let indexCtx = | |||
listField "posts" postCtx (return posts) `mappend` | |||
constField "title" "Home" `mappend` | |||
defaultContext | |||
getResourceBody | |||
>>= applyAsTemplate indexCtx | |||
>>= loadAndApplyTemplate "templates/default.html" indexCtx | |||
>>= relativizeUrls | |||
>>= cleanIndexUrls | |||
>>= cleanIndexHtmls | |||
match "templates/*" $ compile templateBodyCompiler | |||
postCtx :: Context String | |||
postCtx = | |||
dateField "date" "%B %e, %Y" `mappend` | |||
defaultContext | |||
cleanRoute :: Routes | |||
cleanRoute = customRoute createIndexRoute | |||
where | |||
createIndexRoute ident = | |||
takeDirectory p </> takeBaseName p </> "index.html" | |||
where p = toFilePath ident | |||
cleanIndexUrls :: Item String -> Compiler (Item String) | |||
cleanIndexUrls = return . fmap (withUrls cleanIndex) | |||
cleanIndexHtmls :: Item String -> Compiler (Item String) | |||
cleanIndexHtmls = return . fmap (replaceAll pattern replacement) | |||
where | |||
pattern = "/index.html" | |||
replacement = const "/" | |||
cleanIndex :: String -> String | |||
cleanIndex url | |||
| idx `isSuffixOf` url = take (length url - length idx) url | |||
| otherwise = url | |||
where idx = "index.html" |
@@ -0,0 +1,2 @@ | |||
$body$ | |||
$partial("templates/post-list.html")$ |
@@ -0,0 +1,32 @@ | |||
<!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>rf - $title$</title> | |||
<link rel="stylesheet" href="/css/default.css" /> | |||
</head> | |||
<body> | |||
<header> | |||
<div class="logo"> | |||
<a href="/">Regular Flolloping</a> | |||
</div> | |||
<nav> | |||
<a href="/">Home</a> | |||
<a href="/about/">About</a> | |||
<a href="/contact/">Contact</a> | |||
<a href="/archive/">Archive</a> | |||
</nav> | |||
</header> | |||
<main role="main"> | |||
<h1>$title$</h1> | |||
$body$ | |||
</main> | |||
<footer> | |||
powered by <a href="http://jaspervdj.be/hakyll">Hakyll</a> | |||
</footer> | |||
</body> | |||
</html> |
@@ -0,0 +1 @@ | |||
<li><a href="$url$">$title$</a> ~ $published$</li> |
@@ -0,0 +1,7 @@ | |||
<ul> | |||
$for(posts)$ | |||
<li> | |||
<a href="$url$">$title$</a> - $date$ | |||
</li> | |||
$endfor$ | |||
</ul> |
@@ -0,0 +1,11 @@ | |||
<article> | |||
<section class="header"> | |||
Posted on $date$ | |||
$if(author)$ | |||
by $author$ | |||
$endif$ | |||
</section> | |||
<section> | |||
$body$ | |||
</section> | |||
</article> |