New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #9 #14

Merged
merged 1 commit into from Dec 5, 2016
Jump to file or symbol
Failed to load files and symbols.
+6 −5
Diff settings

Always

Just for now

View
@@ -1,3 +1,6 @@
---
layout: amp
---
<!doctype html>
<html amp lang="en">
<head>
@@ -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>
View
@@ -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']
@@ -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