Nanowrimo Blog Kick Off
Table of Contents
1. Nanowrimo Blog Kick Off
I've wanted to blog about my learning experiences and thoughts for a while now, fortunate events of joining Fosstodon then being reminded about nanowrimo kick started this. In order to blog about learning, I need to learn (or at least attempt) something. For this endeavor, I've chosen to try learn haskell. The reasons for choosing haskell are the functional programming paradigm is one aspect of my fascination, another is with the xmonad tile windows manager, yet another is better at literate programming, and finally offensive security applications that could arrise from it.
Some of the learning projects and general order:
- I need to start up the blog first, I've decided to use hakyll as the static site generator wirtten in haskell.
- One of my first applications is going to be a word counter of my text files (so I can track my nanowrimo stats)
- And my end goal for the month is to have a basic web app that can connect to a database, serve a form to enter data, and compute something on that data. Probably the most basic of ledger web apps.
2. Setting up the static site
Without further ado, I'll set up the static site (if you are reading this I was probably mildly successfull), learning more about the functional programming paradigm, giving some thoughts on it, then doing enough crash courses to write a simple program.
For the hakyll static site installation and setup, I followed the hakyll creater's tutorial blog.
First thing I immediately noticed is that the main module, site.hs is all in haskell. It seems easy enough to read without know anything about the language and to find that the tutorial is pointing more toward (rather that I need to add something). This is great for my experiment since if I need to modify this I'll need to learn enough about Haskell to modify it. The tutorial went on relatively painless, it mentioned in the Deployment section that within a few seconds your hakyll site shoudl be visible, I now know this was not talking about the compile time in `stack build` but the pushing to github. After this, the site came right up with a very generic looking page. I definitely need to spruce it up some and will do so in the comming hours or days.
Don't do what I did and not read how to set up the github pages and just create any random repo name. If you did do this and need to change your origin name `git remote set-url origin <new ssh github name and link>` should do the trick.
In my attempt at publishing this blog (and may save some headaches down the road) I needed to change `.md` to `.markdown` as the file extension. This might be a way to contribute back in the future, but for now will be a constraint I follow for building the site.
Then browse to `posts/2022-11-01-blogkickoff.html`. This html extension looks like it is added in from the site.hs file. But also, the docs configuration doesn't seem to be created and I can use the `posts` directory with no problems.
3. Note on 2022-11-25
This was rewritten in org, then exported to html to maintain the consistent look. As part of that, hakyll is no longer used, and I never really got it working either. This is the webarchive link to view if anyone wants to compare.