Created
January 2, 2012 00:30
-
-
Save tokkonopapa/1548796 to your computer and use it in GitHub Desktop.
SEOに効くOctopressの隠し機能
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% capture description %}{% if page.description %}{{ page.description }}{% else %}{{ content | raw_content }}{% endif %}{% endcapture %} | |
<meta name="description" content="{{ description | strip_html | condense_spaces | truncate:150 }}"> | |
{% if page.keywords %}<meta name="keywords" content="{{ page.keywords }}">{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts "Creating new post: #{filename}" | |
open(filename, 'w') do |post| | |
post.puts "---" | |
post.puts "layout: post" | |
post.puts "title: \"#{title.gsub(/&/,'&')}\"" | |
post.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}" | |
post.puts "comments: true" | |
post.puts "categories: " | |
post.puts "description: " | |
post.puts "keywords: " | |
post.puts "---" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SEOに効くOctopressの隠し機能