Skip to content

Commit

Permalink
Updated README example
Browse files Browse the repository at this point in the history
  • Loading branch information
faceleg committed Jul 6, 2013
1 parent 4a02110 commit 2c0213f
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ letting subviews add resources to the head or footer, for example.

## Example:

`layout.html`:
The layout - `/views/layouts/default.html`:

```HTML
<!DOCTYPE html>
Expand All @@ -24,7 +24,7 @@ letting subviews add resources to the head or footer, for example.
</html>
```

`index.html`:
The view - `/views/index.html`:

```HTML
{% extends "/layouts/default.html" %}
Expand All @@ -40,3 +40,23 @@ letting subviews add resources to the head or footer, for example.
</div>
{% endblock %}
```

The output:

```HTML
<html>
<head>
<title>The Title</title>
<link href="/stylesheets/style.css" rel="stylesheet">
<script src="/jquery.js"></script>
<!-- Will be output beneath jquery.js -->
<script src="/index-script.js"></script>
</head>

<body>
<div>
<p>The content</p>
</div>
</body>
</html>
```

0 comments on commit 2c0213f

Please sign in to comment.