Skip to content

Instantly share code, notes, and snippets.

@sintaxi
Created January 10, 2014 04:50
Show Gist options
  • Save sintaxi/8347177 to your computer and use it in GitHub Desktop.
Save sintaxi/8347177 to your computer and use it in GitHub Desktop.
How to do navigation with Harp. Put the following files in a directory and start the server with `harp server`. Compile to html by running `harp compile`.
doctype
html
head
link(rel="stylesheet" href="/main.css")
body
ul
li(class="#{ current.source == 'index' ? 'active' : '' }")
a(href="/") Home
li(class="#{ current.source == 'about' ? 'active' : '' }")
a(href="/about") About
!= yield
h2 about
h3 this is my about page
h2 Welcome to My Site.
h3 This is the home page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment