SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Downloaden Sie, um offline zu lesen
Mustdown
Simon Courtois - @happynoff
Mustache

               name:   Github
               slogan: Social Coding (for all)    Object
               url:    http://github.com




        <h1>The {{name}} company</h1>

        <p>Slogan: {{slogan}}</p>

        <p>Site: {{url}}</p>                     <h1>The Github company</h1>

                                                 <p>Slogan: Social Coding (for all)</p>
          Mustache                               <p>Site: http://github.com</p>

                                                     HTML


github: simonc/mustdown                           http://slidesha.re/mustdown
Mustache
               name:     Github
               slogan: Social Coding (for all)
               url:     http://github.com
               projects:
                 - title: Hubot
                    url:    https://github.com/github/hubot
                                                               Object
                 - title: Gollum
                    url:    https://github.com/github/gollum



   <h1>The {{name}} company</h1>

   <p>Slogan: {{slogan}}</p>         <h1>The Github company</h1>
   <p>Site: {{url}}</p>
                                     <p>Slogan: Social Coding (for all)</p>
   <ul>
     {{#projects}}                   <p>Site: http://github.com</p>
     <li>{{title}}: {{url}}</li>
     {{/projects}}                   <ul>
   </ul>                               <li>Hubot: https://github.com/github/hubot</li>
                                       <li>Gollum: https://github.com/github/gollum</li>
          Mustache                   </ul>

                                                 HTML
github: simonc/mustdown                              http://slidesha.re/mustdown
Mustache

                                                                 ActiveRecord

  company = Company.where(name: 'Github').first

  template = <<-END                    Ruby
   <h1>The {{name}} company</h1>

    <p>Slogan: {{slogan}}</p>
    <p>Site: {{url}}</p>
                                       <h1>The Github company</h1>
    <ul>
      {{#projects}}                    <p>Slogan: Social Coding (for all)</p>
      <li>{{title}}: {{url}}</li>
      {{/projects}}                    <p>Site: http://github.com</p>
    </ul>
                                       <ul>
  END                                    <li>Hubot: https://github.com/github/hubot</li>
                                         <li>Gollum: https://github.com/github/gollum</li>
  Mustache.render(template, company)   </ul>

                                                  HTML
github: simonc/mustdown                               http://slidesha.re/mustdown
Markdown

   # The Github company
                                       Markdown
   Slogan: Social Coding (for all)

   Site: [Github](http://github.com)

   * Hubot
   * Gollum



                                     <h1>The Github company</h1>

                                     <p>Slogan: Social Coding (for all)</p>

                                     <p>Site: <a href=”http://github.com”>Github</a></p>

                                     <ul>
                                       <li>Hubot</li>
                                       <li>Gollum</li>
                                     </ul>

                                                         HTML
github: simonc/mustdown                                  http://slidesha.re/mustdown
Mustdown
               name:     Github
               slogan: Social Coding (for all)
               url:     http://github.com
               projects:
                 - title: Hubot
                    url:    https://github.com/github/hubot
                                                               Object
                 - title: Gollum
                    url:    https://github.com/github/gollum



    # The {{name}} company

    Slogan: {{slogan}}
                                     <h1>The Github company</h1>
    Site: {{url}}
                                     <p>Slogan: Social Coding (for all)</p>
    {{#projects}}
                                     <p>Site: http://github.com</p>
    * {{title}}: {{url}}
    {{/projects}}
                                     <ul>
                                       <li>Hubot: https://github.com/github/hubot</li>
    Mustdown                           <li>Gollum: https://github.com/github/gollum</li>
                                     </ul>

                                                 HTML
github: simonc/mustdown                              http://slidesha.re/mustdown
Mustdown - helpers
 class CompaniesController < ApplicationController
   def show                                           Controller
     @company = Company.where(name: 'Github').first
     @template = <<-END
         # The {{name}} company

         Slogan: {{slogan}}

         Site: {{url}}

         {{#projects}}
         * {{title}}: {{url}}
         {{/projects}}                <h1>The Github company</h1>
     END
                                      <p>Slogan: Social Coding (for all)</p>
   end
 end                                  <p>Site: http://github.com</p>

                                      <ul>
                                        <li>Hubot: https://github.com/github/hubot</li>
# app/views/companies/show.html.erb     <li>Gollum: https://github.com/github/gollum</li>
<%= mustdown @template, @company %>   </ul>

     View                                        HTML
github: simonc/mustdown                               http://slidesha.re/mustdown
Mustdown - helpers
 class CompaniesController < ApplicationController
   def show                                           Controller
     @company = Company.where(name: 'Github').first
   end
 end
 en:
   companies:           en.yml
     show:
       text: |
        # The {{name}} company

        Slogan: {{slogan}}
                                       <h1>The Github company</h1>
        Site: {{url}}
                                       <p>Slogan: Social Coding (for all)</p>
        {{#projects}}
        * {{title}}: {{url}}           <p>Site: http://github.com</p>
        {{/projects}}
                                       <ul>
                                         <li>Hubot: https://github.com/github/hubot</li>
# app/views/companies/show.html.erb      <li>Gollum: https://github.com/github/gollum</li>
<%= mustdown t(‘.text’), @company %>   </ul>

     View                                        HTML
github: simonc/mustdown                               http://slidesha.re/mustdown
Mustdown - helpers


          <%= mustdown template, object %>

          <%= mustache template, object %>

          <%= markdown template %>




github: simonc/mustdown       http://slidesha.re/mustdown
Installation


                          gem 'mustdown'

                             redcarpet

                            mustache


           http://github.com/simonc/mustdown



github: simonc/mustdown                  http://slidesha.re/mustdown
Configuration

                     $ rails generate mustdown:install


                     # config/initializers/mustdown.rb
                     Mustdown.configure do |config|
                          config.markdown_extensions = {
                            no_intra_emphasis: true,
                            tables:             true,
                            fenced_code_blocks: true,
                            autolink:           true,
                            strikethrough:      true
                          }

                          config.renderer_options = {
                            no_styles:        true,
                            safe_links_only: true
                          }
                     end




github: simonc/mustdown                          http://slidesha.re/mustdown
Configuration



       <%= markdown template, { autolink: false }, { no_links: true } %>


       <%= mustdown template, object, { autolink: false }, { no_links: true } %>




github: simonc/mustdown                              http://slidesha.re/mustdown
Mustdown - TODO


                           Rails

                     Tests Tests Tests !




github: simonc/mustdown            http://slidesha.re/mustdown
Questions ?


github: simonc/mustdown       http://slidesha.re/mustdown
Merci !
                          @happynoff




github: simonc/mustdown               http://slidesha.re/mustdown

Weitere ähnliche Inhalte

Ähnlich wie Mustdown

introductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfintroductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdf
BruceLee275640
 

Ähnlich wie Mustdown (20)

Intro. to Git and Github
Intro. to Git and GithubIntro. to Git and Github
Intro. to Git and Github
 
introductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfintroductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdf
 
Mr.Crabs Git workflow
Mr.Crabs Git workflowMr.Crabs Git workflow
Mr.Crabs Git workflow
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and github
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentation
 
Open up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHubOpen up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHub
 
Git101
Git101Git101
Git101
 
Creating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with HugoCreating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with Hugo
 
Up GitLab Presentation 2015
Up GitLab Presentation 2015Up GitLab Presentation 2015
Up GitLab Presentation 2015
 
Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010
 
GDSC GIT AND GITHUB
GDSC GIT AND GITHUB GDSC GIT AND GITHUB
GDSC GIT AND GITHUB
 
SydJS.com
SydJS.comSydJS.com
SydJS.com
 
Open Source Web Charts
Open Source Web ChartsOpen Source Web Charts
Open Source Web Charts
 
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -EssentialsJAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
 
Fewd week1 slides
Fewd week1 slidesFewd week1 slides
Fewd week1 slides
 
14 oct Git & GitHub.pptx
14 oct Git & GitHub.pptx14 oct Git & GitHub.pptx
14 oct Git & GitHub.pptx
 
Atlanta Pm Git 101
Atlanta Pm Git 101Atlanta Pm Git 101
Atlanta Pm Git 101
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
 
Git Atlrug
Git AtlrugGit Atlrug
Git Atlrug
 

Mehr von Simon Courtois

Mehr von Simon Courtois (13)

Conseils pour un lancement Product Hunt réussi
Conseils pour un lancement Product Hunt réussiConseils pour un lancement Product Hunt réussi
Conseils pour un lancement Product Hunt réussi
 
Dependency sorting in Ruby with TSort
Dependency sorting in Ruby with TSortDependency sorting in Ruby with TSort
Dependency sorting in Ruby with TSort
 
How Unidecoder Transliterates UTF-8 to ASCII
How Unidecoder Transliterates UTF-8 to ASCIIHow Unidecoder Transliterates UTF-8 to ASCII
How Unidecoder Transliterates UTF-8 to ASCII
 
Get Slim!
Get Slim!Get Slim!
Get Slim!
 
Multi tenant/lang application with Ruby on Rails
Multi tenant/lang application with Ruby on RailsMulti tenant/lang application with Ruby on Rails
Multi tenant/lang application with Ruby on Rails
 
Fake your files - MemFs
Fake your files - MemFsFake your files - MemFs
Fake your files - MemFs
 
Rails is like Burger King
Rails is like Burger KingRails is like Burger King
Rails is like Burger King
 
REST with Her (and let Her take care of the REST)
REST with Her (and let Her take care of the REST)REST with Her (and let Her take care of the REST)
REST with Her (and let Her take care of the REST)
 
Ruby and DCI
Ruby and DCIRuby and DCI
Ruby and DCI
 
Cells
CellsCells
Cells
 
Ariane
ArianeAriane
Ariane
 
Pourquoi Ruby on Rails ça déchire ?
Pourquoi Ruby on Rails ça déchire ?Pourquoi Ruby on Rails ça déchire ?
Pourquoi Ruby on Rails ça déchire ?
 
Commander
CommanderCommander
Commander
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Mustdown

  • 2. Mustache name: Github slogan: Social Coding (for all) Object url: http://github.com <h1>The {{name}} company</h1> <p>Slogan: {{slogan}}</p> <p>Site: {{url}}</p> <h1>The Github company</h1> <p>Slogan: Social Coding (for all)</p> Mustache <p>Site: http://github.com</p> HTML github: simonc/mustdown http://slidesha.re/mustdown
  • 3. Mustache name: Github slogan: Social Coding (for all) url: http://github.com projects: - title: Hubot url: https://github.com/github/hubot Object - title: Gollum url: https://github.com/github/gollum <h1>The {{name}} company</h1> <p>Slogan: {{slogan}}</p> <h1>The Github company</h1> <p>Site: {{url}}</p> <p>Slogan: Social Coding (for all)</p> <ul> {{#projects}} <p>Site: http://github.com</p> <li>{{title}}: {{url}}</li> {{/projects}} <ul> </ul> <li>Hubot: https://github.com/github/hubot</li> <li>Gollum: https://github.com/github/gollum</li> Mustache </ul> HTML github: simonc/mustdown http://slidesha.re/mustdown
  • 4. Mustache ActiveRecord company = Company.where(name: 'Github').first template = <<-END Ruby <h1>The {{name}} company</h1> <p>Slogan: {{slogan}}</p> <p>Site: {{url}}</p> <h1>The Github company</h1> <ul> {{#projects}} <p>Slogan: Social Coding (for all)</p> <li>{{title}}: {{url}}</li> {{/projects}} <p>Site: http://github.com</p> </ul> <ul> END <li>Hubot: https://github.com/github/hubot</li> <li>Gollum: https://github.com/github/gollum</li> Mustache.render(template, company) </ul> HTML github: simonc/mustdown http://slidesha.re/mustdown
  • 5. Markdown # The Github company Markdown Slogan: Social Coding (for all) Site: [Github](http://github.com) * Hubot * Gollum <h1>The Github company</h1> <p>Slogan: Social Coding (for all)</p> <p>Site: <a href=”http://github.com”>Github</a></p> <ul> <li>Hubot</li> <li>Gollum</li> </ul> HTML github: simonc/mustdown http://slidesha.re/mustdown
  • 6. Mustdown name: Github slogan: Social Coding (for all) url: http://github.com projects: - title: Hubot url: https://github.com/github/hubot Object - title: Gollum url: https://github.com/github/gollum # The {{name}} company Slogan: {{slogan}} <h1>The Github company</h1> Site: {{url}} <p>Slogan: Social Coding (for all)</p> {{#projects}} <p>Site: http://github.com</p> * {{title}}: {{url}} {{/projects}} <ul> <li>Hubot: https://github.com/github/hubot</li> Mustdown <li>Gollum: https://github.com/github/gollum</li> </ul> HTML github: simonc/mustdown http://slidesha.re/mustdown
  • 7. Mustdown - helpers class CompaniesController < ApplicationController def show Controller @company = Company.where(name: 'Github').first @template = <<-END # The {{name}} company Slogan: {{slogan}} Site: {{url}} {{#projects}} * {{title}}: {{url}} {{/projects}} <h1>The Github company</h1> END <p>Slogan: Social Coding (for all)</p> end end <p>Site: http://github.com</p> <ul> <li>Hubot: https://github.com/github/hubot</li> # app/views/companies/show.html.erb <li>Gollum: https://github.com/github/gollum</li> <%= mustdown @template, @company %> </ul> View HTML github: simonc/mustdown http://slidesha.re/mustdown
  • 8. Mustdown - helpers class CompaniesController < ApplicationController def show Controller @company = Company.where(name: 'Github').first end end en: companies: en.yml show: text: | # The {{name}} company Slogan: {{slogan}} <h1>The Github company</h1> Site: {{url}} <p>Slogan: Social Coding (for all)</p> {{#projects}} * {{title}}: {{url}} <p>Site: http://github.com</p> {{/projects}} <ul> <li>Hubot: https://github.com/github/hubot</li> # app/views/companies/show.html.erb <li>Gollum: https://github.com/github/gollum</li> <%= mustdown t(‘.text’), @company %> </ul> View HTML github: simonc/mustdown http://slidesha.re/mustdown
  • 9. Mustdown - helpers <%= mustdown template, object %> <%= mustache template, object %> <%= markdown template %> github: simonc/mustdown http://slidesha.re/mustdown
  • 10. Installation gem 'mustdown' redcarpet mustache http://github.com/simonc/mustdown github: simonc/mustdown http://slidesha.re/mustdown
  • 11. Configuration $ rails generate mustdown:install # config/initializers/mustdown.rb Mustdown.configure do |config| config.markdown_extensions = { no_intra_emphasis: true, tables: true, fenced_code_blocks: true, autolink: true, strikethrough: true } config.renderer_options = { no_styles: true, safe_links_only: true } end github: simonc/mustdown http://slidesha.re/mustdown
  • 12. Configuration <%= markdown template, { autolink: false }, { no_links: true } %> <%= mustdown template, object, { autolink: false }, { no_links: true } %> github: simonc/mustdown http://slidesha.re/mustdown
  • 13. Mustdown - TODO Rails Tests Tests Tests ! github: simonc/mustdown http://slidesha.re/mustdown
  • 14. Questions ? github: simonc/mustdown http://slidesha.re/mustdown
  • 15. Merci ! @happynoff github: simonc/mustdown http://slidesha.re/mustdown