Giter Club home page Giter Club logo

unmark's Introduction

image

What

Simple blogging using Clojure and Hiccup. Basically you just write Clojure expressions instead of Markdown, HTML, Textile, Org Mode, or somebody's JavaScript Web editor.

Why

Since 1994, I've tried many approaches for creating personal Web sites and blogs:

  • Hand-written HTML
  • Hand-rolled Perl scripts
  • Hand-rolled Python scripts
  • Hand-rolled Django app
  • Jekyll
  • tumblr
  • Emacs-powered site generator
  • Hand-rolled, Clojure- and Org-Mode-based app

Each approach has had its benefits and drawbacks, but none of them have quite hit the sweet spot in terms of power vs. simplicity.

Lately I've enjoyed working primarily with S-expressions (blame Paredit). My experience with extremely lightweight libraries such as HoneySQL and Hiccup that wrap clunky languages with elegant S-expression-based DSLs have been extremely positive.

To this end, unmark eschews markup when possible, to leverage the full power and interactivity of Clojure. Blog posts are just Clojure expressions, leveraging functions for common idioms (e.g. code, section, subsection, epigraph, blockquote, img, etc.):

(defpost "Introducing Unmark"
  (section "Introduction"
    "Unmark is a new blogging framework."
    ["Hiccup can be used " [:em "just about"] "everywhere."]
    "But undecorated paragraphs
     can just be strings..."
    ["(or vectors if you have "
      [:a {:href "https://en.wikipedia.org/wiki/Markup_language"}
           "markup"] " in the paragraph)."]
    (img "sample-img")  ;; JPG or PNG in img/ directory
    (code "(quote This is some sample code)"))
    ;; ...
    )

Right now this is optimized for my own blog. If it seems successful over time, I'll decouple the content generator from the content so that unmark can be useful for others.

How

The code is moving very fast; for now, have a look at posts.clj, impl.clj and core.clj.

unmark's People

Contributors

msszczep 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.