Commit 6f72c66a authored by Paul Asmuth's avatar Paul Asmuth
Browse files

added examples

parent 12fb3fa6
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -15,11 +15,19 @@ require 'digest/md5'

def md_pre(text)
  text.gsub!(/`([^`]+)`/, '<code>\1</code>')

  text.gsub!(/( *){{{([^}]+)}}}/) do |m|
    IO.read(File.join(BASEDIR, $2)).split("\n").map do |l|
      "#{$1}#{l}"
    end.join("\n")
  end

  text
end

def md_post(html)
  html.gsub!('<pre><code>', '<pre class="prettyprint"><code>')
  html
end

class DocApp < Sinatra::Base
@@ -86,7 +94,9 @@ task :render do
  target = File.join(BASEDIR, "target")

  routes = %w{/ /documentation /documentation/support
    /documentation/license /documentation/downloads /screenshots}
    /documentation/license /documentation/downloads /screenshots
    /documentation/examples/fm_classic_simple_example
    /documentation/examples/fm_classic_full_example}

  CONFIG["sitemap"].values.flatten.each do |page|
    routes << "/documentation#{page["url"]}"
+9 −0
Original line number Diff line number Diff line
Full Example
------------

This demonstrates the ruby DSL. It has a data generator included so you
can just download and run it

*full_example.rb*

    {{{examples/full_example.rb}}}
+13 −0
Original line number Diff line number Diff line
Simple Example
--------------

This is a minimal configuration to start FnordMetric Classic and FnordMetric UI.

*simple_example.rb*

    {{{examples/simple_example.rb}}}


*simple_example.html*

    {{{examples/simple_example_jsapi.html}}}