No description
Find a file
2019-12-04 17:48:18 -08:00
bin Delete site before generating a new version 2019-12-01 22:47:07 -08:00
drafts Move posts and drafts to the top level 2019-12-03 23:17:13 -08:00
images new favicon 2014-03-02 15:58:36 -08:00
posts Move posts and drafts to the top level 2019-12-03 23:17:13 -08:00
public Change the default template name to "page" 2019-12-04 17:28:52 -08:00
SiteGenerator Fix rendering posts by month 2019-12-04 17:48:18 -08:00
templates Clean up post templates with "include" 2019-12-04 17:46:34 -08:00
Tests Change the default template name to "page" 2019-12-04 17:28:52 -08:00
wayback wat? 2014-04-06 22:14:56 -07:00
.gitignore Format the cv page correctly 2019-12-01 22:37:54 -08:00
.tm_properties Format the cv page correctly 2019-12-01 22:37:54 -08:00
Gemfile Exorcise harp and node.js, server, and add Swift plan 2019-12-01 10:59:05 -08:00
Gemfile.lock Exorcise harp and node.js, server, and add Swift plan 2019-12-01 10:59:05 -08:00
Makefile Fix compiling via Makefile and remove public/_data.json 🎉 2019-12-01 22:48:21 -08:00
projects.json Migrate projects to the new site generator 2019-12-03 08:45:56 -08:00
Readme.md Rearrange files and update the plan 2019-12-03 18:20:24 -08:00
site.json Change the default template name to "page" 2019-12-04 17:28:52 -08:00

samhuri.net

The source code for samhuri.net.

New version using Swift

The idea is to create a bespoke set of tools, not a general thing like Jekyll. If something can be factored out later that's a bonus, not a goal.

This is a plan for migrating from a mix of node.js (harp) and Ruby to Swift. Use Ink, John Sundell's Markdown parser, to render posts, and some other library for generating HTML. Will probably try generating HTML from code because I've never tried it and it seems fun. The pointfree.com guys have one already and Sundell is releasing one Real Soon(tm).

This version will go back to its roots and use headers at the top of markdown files. It was so much easier than indexing everything. Check out the old repo to see how nice it was back in the day. The code that renders it was separate and is available at 9af9d75.

Execution, trying TDD for the first time:

  • Replace harp with custom Swift code

    • Write a test harness that renders a site and then checks the output with diff -r

    • Write a site generator that renders www/index.html from site.json

    • Add support for site styles

    • Add support for page styles

    • Add support for site scripts

    • Add support for page scripts

    • Add support for CSS files

    • Transform LESS into CSS

    • Migrate static pages to the new site generator

      • About

      • 404 / missing (configure via .htaccess as well)

      • cv

      • check and delete _data.json

    • Migrate projects to the new site generator

      • Migrate projects page

      • Migrate project page

      • Check and delete _data.json

    • Migrate posts to markdown with headers somehow

      • Define the new format

      • Decide whether to migrate from 9af9d75 or the current harp format (probably easier to migrate the new format because posts may have been updated since then)

      • Migrate posts

      • Migrate year indexes

      • Migrate month indexes

      • Migrate index / recent posts

      • Migrate archive

      • Check and delete _data.json filse

    • Search for other _data.json files and eliminate any that are found

  • Consider using Swift for samhuri.net as well, and then making SiteGenerator a package that it uses ... then we can use Plot or pointfree.co's swift-html

  • Replace remaining Ruby with Swift

    • Generate RSS feed (ditch mustache templates)

    • Generate JSON feed

    • Munge HTML files to make them available without an extension (index.html hack, do it in the SiteGenerator)

    • Inline CSS?

    • Minify JS? Now that we're keeping node, why not ...

  • Add a server for local use and simple production setups (or use a file watcher + python -m SimpleHTTPServer?)

  • Figure out an iPad workflow with minimal code. Maybe a small app with some extensions and shortcuts?