clay | ||
drafts | ||
files | ||
fonts | ||
images | ||
images-src | ||
infra | ||
js | ||
lib | ||
pages | ||
posts | ||
src | ||
templates | ||
.drone.yml | ||
.gitignore | ||
blog-rekahsoft-ca.cabal | ||
channels.scm | ||
guix.scm | ||
LICENSE | ||
manifest.scm | ||
README.org | ||
robots.txt | ||
Setup.hs | ||
site |
Source Code for #! Lambda Slang
- Features
- Tools
- License
- Guix Development Environment
- Writing a Blog Post
- Deploying
- Known Issues
- Remove the use of application cache now that most major browsers are pulling support
- The image full screen features does not work on initial page loads and requires going to at least one other page
- Completely replace all references to stack
- Fix analytics (pywiki is no longer in use, find and use something else)
- Modernize javascript in js/default.js
- Allow posts (and pages?) to be written in org-mode
- Fix rendering of mathjax
- Use javascript/css sources from guix packages instead of vendoring them or using them from the internet
- Setup automated deployment from ci
- Use separate file for terraform backend
- Figure out fast workflow for modifying haskell sources without rebuilding guix package
- Allow external code files to be included in pages and blog entries
- Ensure blog-rekahsoft-ca.cabal is usable with cabal and has the correct dependencies
- Build the site as a guix package output of
blog-rekahsoft-ca
#! Lambda Slang is the personal technical blog of Collin Doering, built using software that respects our freedoms.
Features
- Single Page Application (SPA)
- Utilizes CSS 3
- Uses HTML5 Application Cache for offline viewing of website
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
- JQuery and JQuery-address are used for various DOM manipulations
- Inkscape and the Gimp were used to create various images/artwork
- 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.
TODO Guix Development Environment
Guix is used to manage dependencies for this project.
A simple wrapper script site
is provided that also takes care of building the static site
and offering access to hakyll commands.
Start Development Environment
The development environment is defined by the following files:
- channels.scm
- Specifically defines a set of available software, their versions and their build recipe.
- guix.scm
- Defines the package for this site,
blog-rekahsoft-ca
. - manifest.scm
- Defines packages required for development of this site.
guix time-machine -C channels.scm -- shell -CN -E LANG -E TERM -E PS1 -Df guix.scm -m manifest.scm
This uses the guix time-machine feature to ensure the development environment is reproducible
by supplying a set of guix channels, effectively pinning all software versions used. The guix
shell command is used within the time-machine to start a development environment in a
container (-C
), which shares the hosts network namespace (-N
). The environment variable
LANG
is passed into the container to ensure locales work as expected; without this, site
building will fail! Additionally, the environment variable TERM
is passed into the
container to ensure the development shell behaves correctly. Finally, -Df guix.scm
indicates that development dependencies of the blog-rekahsoft-ca
package should be included
in the environment and -m manifest.scm
ensures that extra tools for development are
included as well.
Build Site
./site build
Clean Site
./site clean
Watch
./site watch
Deploy Site
./site deploy
Test
./site test
Writing a Blog Post
guix time-machine -C channels.scm -- shell -CN -E LANG
Deploying
Terraform is used to deploy this site. Its configuration files are located in ./infra
. Three
workspaces are currently available, including:
- default (unused)
- staging
- production
For example, this is how to deploy the production version of the site:
cd infra
terraform workspace select production
terraform plan --var-file=production.tfvars --out local.plan
terraform apply local.plan
Known Issues
If you have an issue while browsing my blog please file a issue in the blog-rekahsoft-ca issue tracker.
DONE Remove the use of application cache now that most major browsers are pulling support
CLOSED: [2021-11-28 Sun 10:43]
- State "DONE" from "TODO" [2021-11-28 Sun 10:43]
TODO The image full screen features does not work on initial page loads and requires going to at least one other page bug
TODO Completely replace all references to stack
TODO Fix analytics (pywiki is no longer in use, find and use something else)
TODO Modernize javascript in js/default.js
TODO Allow posts (and pages?) to be written in org-mode
TODO Fix rendering of mathjax
TODO Use javascript/css sources from guix packages instead of vendoring them or using them from the internet
- jQuery
- mathjax
- skeleton
TODO Setup automated deployment from ci
TODO Use separate file for terraform backend
Used to be: Add missing terraform backend files to repository, however this was not true.
The backend is just embedded in infra/main.tf.