Skip to content

Latest commit

 

History

History
42 lines (34 loc) · 541 Bytes

code-block.md

File metadata and controls

42 lines (34 loc) · 541 Bytes

Code block

Example without tabs

def greeting(name)
  puts "Hello #{name}"
end
greeting("Anna")

Example with tabs

{% tabs %} {% tab title="Ruby" %}

def greeting(name)
  puts "Hello #{name}"
end
greeting("Anna")

{% endtab %}

{% tab title="Elixir" %}

greeting = fn (name) -> "Hello, #{name}!" end
greeting.("Anna")

{% endtab %} {% endtabs %}

Example with filename

{% code title="greeting.rb" %}

def greeting(name)
  puts "Hello #{name}"
end
greeting("Anna")

{% endcode %}