weavejester / hiccup

Fast library for rendering HTML in Clojure
http://weavejester.github.io/hiccup
Eclipse Public License 1.0
2.68k stars 174 forks source link

Please allow adding properties to the html element with html5 #70

Closed algernon closed 11 years ago

algernon commented 11 years ago

I was recently building a site with hiccup, and was suprised that when using the html5 macro, it is not possible to add properties to the <html> element itself other than lang. It would be very neat if I could add arbitrary properties, such as prefix (for ogp and similar things).

As far as I see, it would only mean something along these lines:

`(let [options# ~options]
  (html {:mode :html}
    (doctype :html5)
    [:html (merge {:lang (options# :lang)}
                         (options# :root-options)) ~@contents]))

I'll send a pull request later, that does this at every appropriate place within the macro.

algernon commented 11 years ago

This has been solved with #71.