Permalink
Browse files

docs for raw html

  • Loading branch information...
1 parent 4523886 commit dd1acf07cea8ea5e73840f15f3d69ea4acc96fb9 @tj tj committed Aug 25, 2011
Showing with 39 additions and 0 deletions.
  1. +39 −0 Readme.md
View
@@ -391,6 +391,45 @@ allowing you to pass an array such as `bodyClasses = ['user', 'authenticated']`
body(class=bodyClasses)
+### HTML
+
+ Inline html is fine, we can use the pipe syntax to
+ write arbitrary text, in this case some html:
+
+```
+html
+ body
+ | <h1>Title</h1>
+ | <p>foo bar baz</p>
+```
+
+ Or we can use the trailing `.` to indicate to Jade that we
+ only want text in this block, allowing us to omit the pipes:
+
+```
+html
+ body.
+ <h1>Title</h1>
+ <p>foo bar baz</p>
+```
+
+ Both of these examples yield the same result:
+
+```
+<html><body><h1>Title</h1>
+<p>foo bar baz</p>
+</body></html>
+```
+
+ The same rule applies for anywhere you can have text
+ in jade, raw html is fine:
+
+```
+html
+ body
+ h1 User <em>#{name}</em>
+```
+
### Doctypes
To add a doctype simply use `!!!`, or `doctype` followed by an optional value:

0 comments on commit dd1acf0

Please sign in to comment.