Skip to content
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
Merged

fixes #9 #14

Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -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>
@@ -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
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.