Lists

Use lists to implement <ol>, <ul> and <li>-tags.

Parameters

Both list definitions (<ol> and <ul>) and list elements (<li>) can take 2 optional configuration params. List elements (<li>) can also take a third param, text input.

id (optional)

Expects a string with all ids the element should have.

class (optional)

Expects a string with all classes the element should have.

text (optional)

Expects a string which will be rendered between the opening and closing <li>-tag

Example 1

Implementing a simple ordered list.

ol id: "foo" do
  li text: "bar"
end

returns

Example 2

Implementing a simple unordered list that shows both options you have to pass arguments to list elements

returns

Example 3

The real beauty comes into play when things get a little more complicated

returns

Last updated

Was this helpful?