Skip to content

jacobmoe/blorg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blorg

Blog + Org

A Go / Martini application that parses an emacs org-mode file and serves it as json to a Backbone front-end.

.org file

Structure

* page 1
** post 1
*** a date
the body of a post with a date.
** post 2
* page 2
** post 1
the body of a post without a date.
* page 3
the body of a page without post titles.

For now, content deeper than 3 asterisks is ignored.

The site title is taken from the .org filename.

Markdown

Standard markdown - implemented with blackfriday - can be used in a post's body. Some exceptions:

Code blocks

The org-mode code block is used rather than the usual markdown syntax. Code is nested between #+BEGIN_SRC and #+END_SRC.

#+BEGIN_SRC go

package example

import "fmt"

func saySomething() {
  fmt.Println("org-mode rulez!")
}
 
#+END_SRC

Tables

If the first character of a line is a pipe, it will be interpreted as a table, both by org-mode and blorg. Org-mode tables are super cool, FYI.

|   col1 |      col2 |  col3 |
|--------+-----------+-------+
|    111 |       111 |   111 |
|    111 |       111 |   111 |

Becomes:

col1 col2 col3
111 111 111
111 111 111

Bugs/Todo

  • When the org file contains one single-asterisk headline, pages come from the two-asterisk headlines nested under it. Could be a feature?
  • If the last line of the file is a table, that table is ignored. This is an issue in appendSections, which needs to be cleaned up anyway.
  • Each list item renders as a new list. This needs to be fixed in gorg.
  • Should do something with keywords like TODO. Needs to be added to gorg.
  • Figure out a publishing system. Maybe use Dropbox.
  • Cache parsed .org file in a .json file on publish.
  • Should generalize posts to allow deeper org-mode structures.
  • The Backbone Page view should be broken up into collections of Posts.
  • Cleanup error handling.
  • Test!
  • Styles!

About

Manage site content with an emacs org-mode file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published