SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
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

Más contenido relacionado

Similar a Mustdown

introductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfintroductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfBruceLee275640
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and githubAderemi Dadepo
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentationMack Hardy
 
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 GitHubScott Graham
 
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 HugoBrian Hogan
 
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 2010Matt Gauger
 
Open Source Web Charts
Open Source Web ChartsOpen Source Web Charts
Open Source Web ChartsHaNJiN Lee
 
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 -Essentialsjazoon13
 
Atlanta Pm Git 101
Atlanta Pm Git 101Atlanta Pm Git 101
Atlanta Pm Git 101Jason Noble
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub ActionsBo-Yi Wu
 
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 GitE Carter
 

Similar a 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
 

Más de Simon Courtois

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éussiSimon Courtois
 
Dependency sorting in Ruby with TSort
Dependency sorting in Ruby with TSortDependency sorting in Ruby with TSort
Dependency sorting in Ruby with TSortSimon Courtois
 
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 ASCIISimon Courtois
 
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 RailsSimon Courtois
 
Fake your files - MemFs
Fake your files - MemFsFake your files - MemFs
Fake your files - MemFsSimon Courtois
 
Rails is like Burger King
Rails is like Burger KingRails is like Burger King
Rails is like Burger KingSimon Courtois
 
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)Simon Courtois
 
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 ?Simon Courtois
 

Más de 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
 

Último

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Último (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

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