## Welcome to Weaver 0.7.0

The following is a rough documentation intended to simply demonstrate and enumerate the facilities provided by weaver

This documentation page is written in Weaver too! See

https://github.com/davidsiaw/weaver-doc-source

##### Installing Weaver
`gem install weaver`
##### Getting Started
`weaver create my_site`

This will create a folder that looks like this:

```my_site/
├── Gemfile
├── Gemfile.lock
├── cache
├── js
├── css
├── images
└── source
└── index.weave

```

Go to your website directory and install its dependencies:

```cd my_site
bundle install
```

Weave files are where you describe websites. To preview your site, simply go

```bundle exec weaver
```

By default weaver binds to port 4567, but you can change that by going:

```PORT=8080 bundle exec weaver
```

Easy!

To build your website simply use the following command:

`bundle exec weaver build`

Your website will be generated and placed in the `build` directory

If your website is not a root website (it is in a subdirectory), then you can add the -r parameter, as we do for this documentation site:

`bundle exec weaver build -r http://davidsiaw.github.io/weaver-docs/`

This sets the root for images and other things such as links

##### Simple example Weave file

The most basic file takes one argument: the title, and a block that contains the contents of the page

See it in action
##### Weave files only contain Ruby code

This means that you can do whatever you can normally do in Ruby

See it in action
##### You can use all the HTML tags by simply calling them as if they are methods:

`This is Preformatted`
This is Emphasized
This is in a Blockquote

Paragraph text

##### You can also put attributes on a tag

This allows you to change styles, set more attributes on it, etc ...

Some text colored red
##### You can also wrap content in another tag

This is the same as doing it in HTML. Instead of passing it a string, you use a block

### Some text colored red

Like lists:

• Haruhi
• Kyon
• Itsuki
1. Nagato
2. Mikuru
3. Tsuruya
##### AsciiMath 2

There is support for AsciiMath

sum_(i=1)^n i^3=((n(n+1))/2)^2

Math is basically text

The formula is thus: x = 10 / y hence we can see that x = 5
##### Icons

There are icons available in here since the theme uses bootstrap

Github
User
##### CSS

Use the request_css function:

See it in action
##### JavaScript

Use the request_js function:

See it in action

We encourage putting your JavaScript in .js files so you don't clutter your presentation with code

##### There are different page templates to choose from

All page templates are responsive

### Structureless pages

Structureless pages allow you to directly write content

See it in action
See it in action
See it in action

### Structured pages

Structured pages require all content to be placed in headers/rows and columns

See it in action
See it in action
See it in action

You can also add a brand section to pages with navigation. The brand is just a link to home.

See it in action
See it in action
See it in action

Some content

Some content

Some content

Some content

Some content

Some content

Some content

## Jumbotron

gray

white

blue

lazur

yellow

red

black

Woof

Meow

Quack

##### There are two other possible orientations

There is `:left` and `:right`

Woof

Meow

Quack

Car

Subway

Bus

Woof

Meow

Quack

NameClass
Haruhi2-B
Kyon2-B
Mikuru3-A
##### Bordered style

You can mix and match styles

NameClass
Haruhi2-B
Kyon2-B
Mikuru3-A
NameClass
Haruhi2-B
Kyon2-B
Mikuru3-A
##### Striped style
NameClass
Haruhi2-B
Kyon2-B
Mikuru3-A
##### Data Table

Data table JQuery plugin

NameClass
Haruhi2-B
Kyon2-B
Mikuru3-A
##### Foo Table

Foo Table plugin

NameClassInfoPower
Haruhi2-BUninterested in humansReality change
Kyon2-BIs the real GodControl over Haruhi
Mikuru3-AClassified informationClassified information
##### You can make also tables easily from an array of Hashes
nameage
Haruhi17
Mikuru18
Kyon17
Nagato17
Itsuki17
Tsuruya18
##### You can also use the styles available to tables
nameageclass
Haruhi172-B
Mikuru183-A
Kyon172-B
Nagato172-A
Itsuki172-C
Tsuruya183-A
##### Describing multiple pages in one weave file

It is possible to describe multiple pages in one weave file. Simply pass it two arguments, the first being the path of the page, and the second the title of the page

See it in action

This is usually useful if you are generating a site with multiple pages generated from some data