GithubHelp home page GithubHelp logo

blorg's Introduction

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!

blorg's People

Contributors

jacobmoe avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.