arturadib/strapdown — pull request #21 by didiercrunch (2013-07-04 15:00:42+00:00)
Title: Added possibility to put the markdown in a separate file

Using the html5 data-* attributes, I added the possibility to put the markdown in a separate file.

For example, the two following snippets render the same thing. The only difference is that the markdown of the first snippet is in the file *hello_strapdown.js*

```

Hello Strapdown

```

```

Hello Strapdown

# Markdown text goes in here

## Chapter 1

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore
et dolore magna aliqua.

## Chapter 2

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.

```

The markdown source needs to be specified by a *data-src* attribute of the script tag. All other attributes of the script tag that starts with "data-" will be set to the xmp tag without the "data-".

I have not update the index.html. I am aware of cross origin problem when only using files.