Skip to content

Commit

Permalink
Merge pull request juusaw#14 from publicarray/master
Browse files Browse the repository at this point in the history
fixes juusaw#9
  • Loading branch information
juusaw committed Dec 5, 2016
2 parents 013139f + 6bf8c8d commit 01ced85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 4 additions & 1 deletion amp.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
layout: amp
---
<!doctype html>
<html amp lang="en">
<head>
Expand All @@ -18,7 +21,7 @@ <h1 class="post-title">
<span>
{{ page.date }} - {{ page.author }}
</span>
{{ page.body | markdownify | amp_images }}
{{ content | markdownify | amp_images }}
{% capture footer %}{% include footer.html %}{% endcapture %}
{{ footer | amp_images: false, 24, 24 }}
</body>
Expand Down
6 changes: 2 additions & 4 deletions amp_generate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ def initialize(site, base, dir, post)
@name = 'index.html'
self.process(@name)
self.read_yaml(File.join(base, '_layouts'), 'amp.html')
self.content = post.content
self.data['body'] = post.content
self.data['title'] = post.data['title']
self.data['date'] = post.data['date']
Expand All @@ -23,10 +24,7 @@ def generate(site)
dir = site.config['ampdir'] || 'amp'
site.posts.docs.each do |post|
next if post.data['skip_amp'] == true
index = AmpPost.new(site, site.source, File.join(dir, post.id), post)
index.render(site.layouts, site.site_payload)
index.write(site.dest)
site.pages << index
site.pages << AmpPost.new(site, site.source, File.join(dir, post.id), post)
end
end
end
Expand Down

0 comments on commit 01ced85

Please sign in to comment.