littlelogs

Keep a social journal of your work progress as you make and learn things.

#yaml

February 2017

rhitakorrr
rhitakorrr

Tonight I filled out the author-data.yaml config file, which is basically a #yaml representation of my resume. The goal is to eventually generate both a PDF and HTML page by just changing this one file, thus always keeping my site and my PDF resume in sync and up-to-date. The PDF generation looks like it will be tricky (and involve me learning #LaTeX), but I rigged up the new config data with my #hakyll Context and can now display any of that data on a web page. That finishes the last of the necessary features for a minimal release of my #hakyll_portfolio_blog. Not sure if I’ll be able to throw together a design and style the whole site before the MMP beta ends on Tuesday, but that remains the goal.

rhitakorrr
rhitakorrr

Did some more work on my #hakyll_portfolio_blog tonight. I made some progress on the design/css, made some custom routes (they convert default routes like /content/posts/a-blog-post.html to /posts/a-blog-post/index.html to get rid of parent directories and hide ugly .html extensions), added some functionality to direct all links to the “clean” routes instead of the index.html ones, and got started on a #yaml config file which I’m successfully reading in and parsing (turns out this is pretty easy in #Haskell with the right libraries). All in all, a pretty good start after the initial setup yesterday.

August 2016

rhitakorrr
rhitakorrr

After pushing a little further with the #JavaScript config file for the #midnightmurderparty #frontend, I decided it would be better to store the config as a #yaml file and inject it during the build process. This led to a massive build script upgrade.

  • Config is now a #yaml file parsed in the build step instead of bundled #JavaScript used at runtime. This circumvents issues such as:
    • Needing to dynamically create script tags on the page based on config (which leads to all sorts of script loading order mayhem)
    • Needing to pass static data around in the #Elm model
  • Build system upgrade
    • Now injects values from config file directly into the source
    • Appends unique number to #JavaScript and #CSS sources to force bypassing the cache after a code update
    • Allows specifying --dev in terminal to run in dev mode, prod otherwise
      • Dev and prod mode both have their own values in the config file
      • If running in prod, the build script will remove console logs, debuggers, alerts, etc.