Skip to content

Commit

Permalink
add more src files for examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschlinkert committed May 13, 2013
1 parent b93d95f commit 0b97be3
Show file tree
Hide file tree
Showing 19 changed files with 483 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/content/chapter-01-getting-started.md.hbs
@@ -0,0 +1,21 @@

## Getting Started

# h1 Heading
## h2 Heading
### h3 Heading
#### h4 Heading
##### h5 Heading
###### h6 Heading


Nunc vestibulum leo a lorem pulvinar ut convallis odio iaculis. Sed a sapien nec libero semper scelerisque at eget nisl. Vestibulum urna ligula, facilisis sed blandit nec, placerat eget augue. Nulla ultrices hendrerit mauris, quis hendrerit mi bibendum eget. Etiam quam justo, sollicitudin in tempus ac, tristique eget elit. Vivamus fermentum libero id magna mollis eleifend. Integer blandit libero in est hendrerit sollicitudin. Pellentesque ac orci id magna ullamcorper laoreet ut vitae nisl.

> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.

Aliquam erat volutpat. Ut imperdiet condimentum nisi non aliquet. Vivamus sit amet consectetur sapien. Phasellus varius interdum urna, eget mattis justo faucibus vel. Aliquam elementum, magna ut pretium molestie, erat orci eleifend tellus, sit amet rhoncus arcu odio eu sem. Proin lobortis mi ac ante luctus porta. Mauris sit amet vestibulum orci.

> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.
>> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam.

Aliquam ut augue turpis, eget mattis nibh. Suspendisse urna mauris, pharetra vitae laoreet non, tempor sit amet metus. Donec risus diam, tincidunt id elementum sed, ultrices id neque. Curabitur sed nisl non sem gravida malesuada et dapibus justo. Nullam in sagittis magna. Aliquam erat volutpat. Suspendisse potenti. Fusce id posuere orci. In sed vestibulum dolor. Phasellus volutpat eleifend purus sed vestibulum. Ut dolor massa, volutpat nec elementum vel, vestibulum in mi. Donec fringilla dignissim risus.
30 changes: 30 additions & 0 deletions src/content/chapter-02-language-features.md.hbs
@@ -0,0 +1,30 @@
## Language Features

### Images

Images have a similar syntax to links but include a preceding exclamation point.

``` md
![Minion](http://octodex.github.com/images/minion.png)
```
![Minion](http://octodex.github.com/images/minion.png)

or
``` md
![Alt text](http://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat")
```
![Alt text](http://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat")

Like links, Images also have a footnote style syntax

``` md
![Alt text][id]
```
![Alt text][id]

With a reference later in the document defining the URL location:

``` md

[id]: http://octodex.github.com/images/dojocat.jpg "The Dojocat"
```
14 changes: 14 additions & 0 deletions src/content/chapter-03-advanced-materials.md.hbs
@@ -0,0 +1,14 @@
## Advanced Materials

### Tables

| Heading 1 | Heading 2 | Heading 3 |
| ------------------ | ------------------ | ------------------ |
| **Lorem ipsum** | `lorem ipsum` | lorem ipsum |
| **Lorem ipsum** | `lorem ipsum` | lorem ipsum |
| **Lorem ipsum** | `lorem ipsum` | lorem ipsum |
| **Lorem ipsum** | `lorem ipsum` | lorem ipsum |
| **Lorem ipsum** | `lorem ipsum` | lorem ipsum |
| **Lorem ipsum** | `lorem ipsum` | lorem ipsum |
| **Lorem ipsum** | `lorem ipsum` | lorem ipsum |

38 changes: 38 additions & 0 deletions src/posts/2013_05_10.hbs
@@ -0,0 +1,38 @@
---
title: Post, in HTML format
description: Multiple ways to include content
posted: May 10th, 2013
---

{{#markdown}}
# {{ title }}

**{{ description }}**

Why use Grunt?
The Grunt ecosystem is huge and it's growing every day. With literally
hundreds of plugins to choose from, you can use Grunt to automate just
about anything with a minimum of effort. If someone hasn't already
built what you need, authoring and publishing your own Grunt plugin to
npm is a breeze.

---
## Partial
{{> chapter-01-getting-started.md }}
---

## `\{{md}}` helper
{{{md './src/content/code.md'}}}

---
## `\{{include}}` helper
A third way to "include" content.
{{{include './src/content/chapter-01-getting-started.md.hbs'}}}
{{/markdown}}
45 changes: 45 additions & 0 deletions src/posts/2013_05_10.md.hbs
@@ -0,0 +1,45 @@
---
title: Post, in markdown format
description: Multiple ways to include content
posted: May 10th, 2013
---

# {{ title }}

**{{ description }}**

**Why use Grunt?**
The Grunt ecosystem is huge and it's growing every day. With literally
hundreds of plugins to choose from, you can use Grunt to automate just
about anything with a minimum of effort. If someone hasn't already
built what you need, authoring and publishing your own Grunt plugin to
npm is a breeze.


## Table of Contents
An experimental TOC helper that finds headers in the given path, parses
them and turns them into links.

{{{toc './src/content/chapter-*.md.hbs'}}}

---
## Partial
This is a _Handlebars partial_. Notice we have to add the `.md` extension here because you don't normally need an extension in a partial, but we're referencing a file with the extension `.md.hbs`, so we need to tell the engine that this is correct.
{{> chapter-01-getting-started.md }}
---

## `\{{md}}` helper
This is a _markdown helper_.

{{{md './src/content/code.md'}}}

---
## `\{{include}}` helper
A third way to "include" content, using the _include_ helper.
{{{include './src/content/chapter-01-getting-started.md.hbs'}}}
11 changes: 11 additions & 0 deletions src/posts/2013_05_12.hbs
@@ -0,0 +1,11 @@
---
title: Post, in HTML format
posted: May 12th, 2013
---
{{#markdown}}

# {{title}}

Assemble makes it dead simple to build modular sites and components from reusable templates and data.

{{/markdown}}
9 changes: 9 additions & 0 deletions src/posts/2013_05_12.md.hbs
@@ -0,0 +1,9 @@
---
title: Post, in markdown format
posted: May 12th, 2013
---

# {{title}}

Assemble makes it dead simple to build modular sites and components from reusable templates and data.

24 changes: 24 additions & 0 deletions src/templates/layouts/post.hbs
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{{ title }}</title>
<link rel="stylesheet" href="{{assets}}/bootstrap.css">
</head>
<body>
<!-- nav partial -->
{{> nav }}
<div class="container">
<!-- pages -->
<div class="post">
<h2>{{title}}</h2>
<p>Posted on: {{posted}}
{{#markdown}}
{{> body }}
{{/markdown}}
</p>
</div>
<script src="{{assets}}/highlight.js"></script>
</div>
</body>
</html>
8 changes: 8 additions & 0 deletions src/templates/layouts/post.md.hbs
@@ -0,0 +1,8 @@
# Markdown Layout

## {{ title }}

Posted on: {{ posted }}

{{> body }}

14 changes: 14 additions & 0 deletions src/templates/pages/blog.hsb
@@ -0,0 +1,14 @@
---
title: Blog
posts: ['src/posts/2013_05_10', 'src/posts/2013_05_12']
---
<div class="page-header">
<h1>{{ title }}</h1>
</div>


<h1>This is a simple blog</h1>

{{#each posts}}
<h2>{{this}}</h2>
{{/each}}

0 comments on commit 0b97be3

Please sign in to comment.