README
JILM
JILM renders your site by evaluating the code in your JILM file, making it pure JS.
Hello world in JILM:
jilm(
structure.head(
metadata.meta("", { charset: "utf-8" })
// Everything is JS. Since *everything* is a function, you need to
// put a plus for every tag after the first. No semicolons.
+metadata.title("Hello, world!")
)
+structure.body(
structure.p("Hello, world!")
)
);
There are a few notable classes and functions available to make your JILM experience better out of the box:
wrapper(tag, contents = "", options = {})
Returns the rendered HTML tag with contents. Options are HTML attributes.
Classes (note: all tags take a contents argument and an options argument):
structure
class:
- a
- article
- aside
- body
- br
- details
- div
- h1
- h2
- h3
- h4
- h5
- h6
- head
- header
- hgroup
- hr
- html
- footer
- nav
- p
- section
- span
- summary
metadata
class:
- base
- link
- meta
- style
- title
form
class:
- button
- datalist
- fieldset
- form
- input
- keygen
- label
- legend
- meter
- optgroup
- option
- select
- textarea
formatting
class:
- abbr
- acronym
- address
- b
- bdi
- bdo
- big
- blockquote
- center
- cite
- code
- del
- dfn
- em
- i
- ins
- kbd
- mark
- output
- pre
- progress
- q
- rp
- rt
- ruby
- s
- samp
- small
- strong
- sub
- sup
- tt
- u
- var
- wbr
list
class:
- dd
- dl
- dt
- li
- ol
- menu
- ul
table
class:
- caption
- col
- colgroup
- table
- tbody
- td
scripting
class:
- noscript
- script
content
class:
- area
- audio
- canvas
- embed
- figcaption
- figure
- frame
- frameset
- iframe
- img
- map
- noframes
- object
- param
- source
- time
- video