The code, templates and content for my Hakyll powered blog at blog.rekahsoft.ca
Go to file
Collin J. Doering 1a26f68e09
Add published but uncommited Site updates post
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2017-11-04 22:28:01 -04:00
clay Remove unused class "loading-done" 2016-01-17 05:30:04 -05:00
drafts Worked on draft church-encoding-in-javascript 2015-08-10 16:55:28 -04:00
files Added files/images directory and modified drafts 2015-07-19 03:29:07 -04:00
fonts Remove unused fonts 2015-01-14 04:50:28 -05:00
images Removed unused image images/post-icon2.svg 2015-08-16 02:15:26 -04:00
images-src Added initial implementation of error messages 2015-01-14 04:50:29 -05:00
js Fixed active nav item issue 2016-02-08 19:39:10 -05:00
lib Removed jquery-address 2015-08-16 02:15:26 -04:00
pages Update copyright in LICENSE file and on home page 2016-02-08 17:15:32 -05:00
posts Add published but uncommited Site updates post 2017-11-04 22:28:01 -04:00
src Remove jsmin dependency from build process 2017-04-23 22:19:19 -04:00
templates Fixed copyright year in footer 2016-02-08 02:06:10 -05:00
test Update to newer base 2017-03-05 15:36:33 -05:00
.gitignore Added symbolic link for easy execution of site generator 2015-01-14 04:50:29 -05:00
.gitlab-ci.yml Initial implementation of gitlab-ci pipeline 2017-07-08 13:38:09 -04:00
blog-rekahsoft-ca.cabal Update to newer base 2017-03-05 15:36:33 -05:00
blog-rekahsoft.yaml Initial implementation of gitlab-ci pipeline 2017-07-08 13:38:09 -04:00
init-env.sh Initial implementation of gitlab-ci pipeline 2017-07-08 13:38:09 -04:00
LICENSE Update copyright in LICENSE file and on home page 2016-02-08 17:15:32 -05:00
README.md Initial implementation of gitlab-ci pipeline 2017-07-08 13:38:09 -04:00
robots.txt Add robots.txt for web robots 2015-08-05 02:42:12 -04:00
Setup.hs Initial cabalization of site 2015-01-14 04:50:28 -05:00
site Update deployment to use cloudfront and s3 2017-04-23 21:45:27 -04:00

Source Code for #! Lambda Slang

build status

#! Lambda Slang is the personal technical blog of Collin Doering, built using software that respects our freedoms.

Features

Tools

The creation of this website was made possible by the following open source tools and libraries:

  • Hakyll is used to generate site from static files
  • Clay is used for CSS pre-processing
  • Skeleton is used for CSS boilerplate
  • MathJax is used for rendering mathematics
  • Inkscape and the Gimp were used to create various images/artwork
  • Selenium is used for automated testing using real browsers
  • Gnu Free Fonts, specifically FreeMono is used as main font
  • Gnu Emacs, because there is no place like home; and no greater editor!

License

Simply put, you're welcome to use the code used to generate this site though there are a few restrictions:

  • Any images and artwork that embody the likeness of "#! Lambda Slang" are not to be distributed or used and are strictly copyright
  • The content of pages and posts can be used with attribution, providing you aren't making money off of it

Various licenses (GPLv3, Creative Commons BY-NC-SA License, and Creative Commons BY-NC-ND License) are deployed dependent on which part of the site is in question. Please see the LICENSE file for full details.

Building

All that is needed to build this site is cabal and a way to fetch required packages (whether directly via the internet or by using the fetch argument to cabal).

$ cabal sandbox init # optional but recommended
$ cabal configure
$ cabal install --only-dependencies
$ cabal build
$ ./site build  # build site
$ ./site server # view site at http://localhost:3000

Running Tests

To the run the tests that accompany this site, one must have Selenium installed and an instances running on port 4444. Then one must run the following:

$ cabal configure --enable-tests
$ cabal install --enable-tests --only-dependencies
$ ./site test -s

The -s or --run-selenium option to site test starts a selenium server before running the tests. Another way to run the tests is using cabal directly by running cabal test.

Deploying

To deploy the site, use the provided init-env.sh script. Its usage is as follows:

Usage: init_env.sh [create|update] <stack-name> <cf-bucket> <cnames>
       init_env.sh init <cf-bucket>
       init_env.sh info <stack-name>
       init_env.sh [help|--help|-h]

First create required initial resources, then create the projects stack, thereby deploying the project.

./init-env.sh init <cf-bucket-name>
./init-env.sh create <stack-name> <cf-bucket-name> <cnames>

Issues

Unfortunately, when trying to install the test-suite dependencies, webdriver 0.6.1 fails to install when using GHC 7.10 (Jun 24, 2015). This is due to a missing language pragma FlexibleContexts in src/Test/WebDriver/Commands.hs (see bug ticket. To get around this problem you can download webdriver from hackage using cabal get webdriver and then fix the problem yourself by adding the language pragma to the file src/Test/WebDriver/Commands.hs. This issue has also been fixed upstream so you can use git to get the latest sources. Once the working sources for webdriver-0.6.1 are in place, run the following:

$ cd webdriver-0.6.1
$ cabal sandbox init
$ cabal configure
$ cabal install --only-dependencies
$ cabal build
$ cabal install
$ cd ..
$ cabal sandbox init --sandbox webdriver-0.6.1/.cabal-sandbox

This will share the cabal sandbox which we used to build and install our fixed version of webdriver, with this project. Now the test-suite can be run once its dependencies are installed (see Running Tests).

If you have an issue while browsing my blog please file a bug using my flyspray powered bug tracker.

Road Map

There are still a few remaining rough edges to be fixed up. The ones I'm aware of are listed below, if you find an issue please report it to me via email so I can make this site better.

  • Include source files using some special syntax to avoid having to copy-paste source code into articles. An example of what this could look like:

    ``` {.haskell .lineNumber include="files/source/SomeFile.hs"} ```

  • Have a proper draft system instead of copying articles to and from drafts and posts.

  • Use LocalStorage API to save previously visited articles so they can be viewed offline (and saves on bandwidth). Note, this is already somewhat handled by the browsers cache, but the cache can be unreliable and also can't be controlled from javascript so a better solution is to use LocalStorage as mentioned.

  • Make tag specific RSS feeds available via links (on individual tag pages and perhaps somewhere on the home page).