Dynamically generate index from markdown

This commit is contained in:
Christine Dodrill 2015-02-13 11:29:00 -08:00
parent 8317ad7e3b
commit ed5a7be859
4 changed files with 35 additions and 3 deletions

View File

@ -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"

14
controllers/index.moon Normal file
View File

@ -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

18
static/markdown/index.md Normal file
View File

@ -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

View File

@ -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