Sha256: 6a1a118063f2bbe04edb150ef04cf51c57856178bfe2774cf443c56dfc0d9314

Contents?: true

Size: 1.45 KB

Versions: 1

Compression:

Stored size: 1.45 KB

Contents

---
---
!!! XML

%feed{ 'xml:lang'=>'en-US', :xmlns=>'http://www.w3.org/2005/Atom' }
  %id= "#{page.content_url}/"
  %title= escape_once( page.title )
  - if ( defined?( site.author ) )
    %author
      - if ( defined?( site.author.name ) )
        %name= site.author.name
        - if ( site.author.email )
          %email= site.author.email
      - else
        %name= site.author
  - unless page.entries.empty?
    %updated= page.entries.first.input_mtime.xmlschema
    %link{:rel=>"self",      :type=>"application/atom+xml", :href=>"#{site.base_url}#{page.url}" }
    %link{:rel=>"alternate", :type=>"text/html",            :href=>"#{page.content_url}/" }
    - for entry in page.entries
      %entry
        %id #{site.base_url}#{entry.url}
        %title= escape_once( entry.title )
        %updated= entry.input_mtime.xmlschema
        %published= entry.date.xmlschema
        %link{:rel=>"alternate", :type=>"text/html", :href=>"#{site.base_url}#{entry.url}" }
        - if ( defined?( entry.author ) )
          %author
            - if ( defined?( entry.author.name ) )
              %name= entry.author.name
              - if ( entry.author.email )
                %email= entry.author.email
            - else
              %name= entry.author
        %summary
          #{summarize( html_to_text( entry.content ), 100 )}
        %content{:type=>'html'}
          = clean_html( html_escape( fully_qualify_urls( site.base_url, find_and_preserve( entry.content ) ) ) )
  

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
awestruct-0.4.7 lib/awestruct/extensions/template.atom.haml