Code Monkey home page Code Monkey logo

timput.com's Introduction

My goal when building this website was a simple, fast, long-term maintainable (which entails only open standards, and open source software), portable, static site. To that end I've chosen to use Hakyll, Nix and Emacs Org-Mode. This readme is intended to help with a couple sticking points in such a setup.

I'm fond of the Hack typeface. To include it in your website follow the instructions here and take a look at ./css/{default,hack-subset}.css and ./fonts/ in the source.

The website is just a bit more than what hakyll-init gives you, modified to build with Nix following utdemir. Nix is fantastic in that it means this site will build identically on any system with Nix installed, with no other dependencies. Nix will fetch the dependcies required, even compiling them if they are not available in a binary cache. Note that the nix-build command hashes the entire source folder to determine if and when it needs to rebuild, so in order to avoid unecessary rebuilds every time the content of the site changes, we need to keep the hakyll/haskell source for the site in a separate folder from the source for the content of the site, unlike the default hakyll project layout.

If you run into "commitBuffer: invalid argument (invalid character)" errors, you've got encoding problems: $ grep -riI utf in the repo for this site to see where encoding needs to be set.

To add new posts:

Simply place a file with appropriate metadata in the first few lines in site/posts. Any filetype which pandoc can convert, which is most text formats, will work. See the source of any of my posts for examples of the metadata formatting.

To build:

   $ nix-build

in the repo root. The build products will be in a symlinked folder named result/

n.b. this failed on me once when Pandoc was broken in the unstable Nix channel that I follow. To solve this, simply build against a different version of nixpkgs. There are multiple approaches to this. I simply build with $ nix-build -I nixpkgs=$(path to checked-out nixpkgs repo on stable branch)

To publish:

With my setup, publishing is as simple as rsyncing the result folder to my host, nearlyfreespeech.net, over ssh.

timput.com's People

Contributors

timput avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.