Skip to content

colelawrence/jade

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jade.go - template engine for Go (golang)

Package jade (github.com/Joker/jade) implements Jade-lang templates for generating Go html/template output.

Jade syntax

example:

doctype html
html(lang="en")
  head
    title= pageTitle
    script(type='text/javascript').
      if (foo) {
         bar(1 + 5)
      }
  body
    h1 Jade - template engine
    #container.col
      if youAreUsingJade
        p You are amazing
      else
        p Get on it!
      p.
        Jade is a terse and simple
        templating language with a
        strong focus on performance
        and powerful features.

becomes

<!DOCTYPE html>                             
<html lang="en">                            
    <head>                                  
        <title>{{ pageTitle }}</title>      
        <script type='text/javascript'>     
            if (foo) {                      
                bar(1 + 5)                  
            }                               
        </script>                           
    </head>                                 
    <body>                                  
        <h1>Jade - template engine</h1>
        <div id="container" class="col">    
            {{ if youAreUsingJade }}        
                <p>You are amazing</p>      
            {{ else }}                      
                <p>Get on it!</p>           
            {{ end }}                       
            <p>                             
                Jade is a terse and simple  
                templating language with a  
                strong focus on performance 
                and powerful features.      
            </p>                            
        </div>                              
    </body>                                 
</html>

About

Jade.go - template engine for Go (golang)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 98.3%
  • HTML 1.7%