Skip to content

Commit 95ee8fc

Browse files
committed
Merge branch 'docs'
* docs: Context to_s replaced by render_in Collapsible TOC. Use just-the-docs theme. Add Jekyll just-the-docs theme
2 parents 573f112 + e50228b commit 95ee8fc

12 files changed

+30
-1231
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ benchmarks
88
.ruby-gemset
99
tags
1010
.DS_Store
11+
docs/.*
1112
docs/_site

docs/Gemfile

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
gem 'github-pages'
2+
gem 'jekyll-default-layout'
23
gem 'jekyll-redirect-from'
4+
gem 'just-the-docs'
5+
gem 'webrick'

docs/_config.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
plugins:
2+
- jekyll-default-layout
23
- jekyll-redirect-from
34

4-
defaults:
5-
-
6-
values:
7-
layout: "default"
5+
theme: just-the-docs
6+
title: Arbo | HTML Views in Ruby
7+
# Aux links for the upper right navigation
8+
aux_links:
9+
"Get the Code":
10+
- "//github.com/varyonic/arbo"

docs/_includes/footer.html

-8
This file was deleted.

docs/_includes/google-analytics.html

-16
This file was deleted.

docs/_includes/head.html

-7
This file was deleted.

docs/_includes/nav_footer_custom.html

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div class='site-footer'>
2+
Copyright &copy; 2011 <a href="http://gregbell.ca/">Greg Bell</a> and <a href="http://www.versapay.com/">VersaPay</a>
3+
</div>

docs/_includes/toc.html

-12
This file was deleted.

docs/_includes/top-menu.html

-8
This file was deleted.

docs/_layouts/default.html

-21
This file was deleted.

docs/index.md

+16-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ redirect_from: /docs/documentation.html
44
# Arbo
55
HTML Views in Ruby
66

7+
{: .no_toc }
8+
9+
<details open markdown="block">
10+
<summary>
11+
Table of contents
12+
</summary>
13+
{: .text-delta }
14+
- TOC
15+
{:toc}
16+
</details>
17+
18+
---
19+
720
### Introduction
821

922
Arbo is a alternate template system for [Ruby on Rails Action View](http://guides.rubyonrails.org/action_view_overview.html).
@@ -72,17 +85,17 @@ Several examples of Arbo components are [included in Active Admin](https://activ
7285

7386
### Contexts
7487

75-
An [Arbo::Context](http://www.rubydoc.info/gems/arbo/Arbo/Context) is an object in which Arbo DSL is interpreted, providing a root for the Ruby DOM that can be [searched and manipulated](http://www.rubydoc.info/gems/arbo/Arbo/Element). A context is automatically provided when a `.arb` template or partial is loaded. Contexts can be used when developing or testing a component. Contexts are rendered by calling to_s.
88+
An [Arbo::Context](http://www.rubydoc.info/gems/arbo/Arbo/Context) is an object in which Arbo DSL is interpreted, providing a root for the Ruby DOM that can be [searched and manipulated](http://www.rubydoc.info/gems/arbo/Arbo/Element). A context is automatically provided when a `.arb` template or partial is loaded. Contexts can be used when developing or testing a component. Contexts are rendered by calling render_in.
7689

7790
```ruby
7891
html = Arbo::Context.new do
79-
panel "Hello World", id: "my-panel" do
92+
div "Hello World", id: "my-panel" do
8093
span "Inside the panel"
8194
text_node "Plain text"
8295
end
8396
end
8497

85-
puts html.to_s # =>
98+
puts html.render_in # =>
8699
```
87100

88101
```html

0 commit comments

Comments
 (0)