From ed5a7be859154bcb588935b1a2a929da7aae639c Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Fri, 13 Feb 2015 11:29:00 -0800 Subject: [PATCH] Dynamically generate index from markdown --- app.moon | 4 +--- controllers/index.moon | 14 ++++++++++++++ static/markdown/index.md | 18 ++++++++++++++++++ views/index.moon | 2 ++ 4 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 controllers/index.moon create mode 100644 static/markdown/index.md diff --git a/app.moon b/app.moon index 63ee329..8160f6d 100644 --- a/app.moon +++ b/app.moon @@ -7,9 +7,7 @@ class extends lapis.Application @include "controllers.projects" @include "controllers.go" @include "controllers.resume" - - [index: "/"]: => - render: true + @include "controllers.index" [contact: "/contact"]: => @title = "Contact" diff --git a/controllers/index.moon b/controllers/index.moon new file mode 100644 index 0000000..0b641a4 --- /dev/null +++ b/controllers/index.moon @@ -0,0 +1,14 @@ +discount = require "discount" +lapis = require "lapis" +oleg = require "lib/oleg" + +class Index extends lapis.Application + [index: "/"]: => + @doc = oleg.cache "caches", "index", -> + local data + with io.open "static/markdown/index.md", "r" + data = \read "*a" + + discount data, "toc", "nopants", "autolink" + + render: true diff --git a/static/markdown/index.md b/static/markdown/index.md new file mode 100644 index 0000000..3d633c0 --- /dev/null +++ b/static/markdown/index.md @@ -0,0 +1,18 @@ +Skills +------ + +- Go, Moonscript, Lua, Python, PHP, C +- Docker deployments +- `git`-centric project management +- Research and Development for new ways to do things + +Side Projects +------------- + +- Programming, administration and orchestration of complicated, multi-tenant +IRC networks. +- Mitigation of active attacks against IRC networks and creation of sane tools +to make future mitigation easier +- Design and implementation of next generation services and administrative +tools for IRC networks +- Research and development of new container-based scalable deployment systems diff --git a/views/index.moon b/views/index.moon index 4ee11d9..66019db 100644 --- a/views/index.moon +++ b/views/index.moon @@ -16,3 +16,5 @@ class About extends Widget h1 "Christine Dodrill" h4 "Rockstar Hacker, Freelance Programmer, Gopher, Cloud Architect" span "I am a GitHub power user. I am constantly learning new languages and tools. I strongly believe in knowing many languages and ways to do things so I can pick the right tool for the job." + + raw @doc