mirror of
https://github.com/WatchOutNewsAgency/wona.github.com.git
synced 2026-01-01 01:16:26 +00:00
major refactoring, improved file watching, changed site to public to support rack via pow (http://pow.cx) also implemented the basics of a 320 and up design refresh on the classic theme. This should make it great for mobile reading
This commit is contained in:
@ -15,6 +15,11 @@ module OctopressFilters
|
||||
$1+url+$3
|
||||
end
|
||||
end
|
||||
def search_url(input)
|
||||
input.gsub /(http:\/\/)(\S+)/ do
|
||||
$2
|
||||
end
|
||||
end
|
||||
def smart_quotes(input)
|
||||
require 'rubypants'
|
||||
RubyPants.new(input).to_html
|
||||
@ -23,10 +28,14 @@ module OctopressFilters
|
||||
require 'titlecase'
|
||||
input.titlecase
|
||||
end
|
||||
def ordinalize(date)
|
||||
def datetime(date)
|
||||
if date.class == String
|
||||
date = Time.parse(date)
|
||||
end
|
||||
date
|
||||
end
|
||||
def ordinalize(date)
|
||||
date = datetime(date)
|
||||
"#{date.strftime('%B')} #{ordinal(date.strftime('%e').to_i)}, #{date.strftime('%Y')}"
|
||||
end
|
||||
def ordinal(number)
|
||||
|
||||
@ -44,7 +44,6 @@ module Jekyll
|
||||
priority :low
|
||||
|
||||
# Domain that you are generating the sitemap for - update this to match your site.
|
||||
BASE_URL = 'http://recursive-design.com'
|
||||
|
||||
# Generates the sitemap.xml file.
|
||||
#
|
||||
@ -82,6 +81,8 @@ module Jekyll
|
||||
def generate_content(site)
|
||||
result = ''
|
||||
|
||||
base_url = site.config['url']
|
||||
|
||||
# First, try to find any stand-alone pages.
|
||||
site.pages.each{ |page|
|
||||
path = page.subfolder + '/' + page.name
|
||||
@ -93,14 +94,14 @@ module Jekyll
|
||||
end
|
||||
|
||||
unless path =~/error/
|
||||
result += entry(path, mod_date)
|
||||
result += entry(base_url, path, mod_date)
|
||||
end
|
||||
}
|
||||
|
||||
# Next, find all the posts.
|
||||
posts = site.site_payload['site']['posts']
|
||||
for post in posts do
|
||||
result += entry(post.id, post.date)
|
||||
result += entry(base_url, post.id, post.date)
|
||||
end
|
||||
|
||||
result
|
||||
@ -115,12 +116,12 @@ module Jekyll
|
||||
#
|
||||
# +path+ is the URL path to the page.
|
||||
# +date+ is the date the file was modified (in the case of regular pages), or published (for blog posts).
|
||||
def entry(path, date)
|
||||
def entry(base_url, path, date)
|
||||
# Force extensions to .html from markdown, textile.
|
||||
path = path.gsub(/\.(markdown|textile)$/i, '.html')
|
||||
"
|
||||
<url>
|
||||
<loc>#{BASE_URL}#{path}</loc>
|
||||
<loc>#{base_url}#{path}</loc>
|
||||
<lastmod>#{date.strftime("%Y-%m-%d")}</lastmod>
|
||||
</url>"
|
||||
end
|
||||
|
||||
1
_plugins/generate_styles.rb
Normal file
1
_plugins/generate_styles.rb
Normal file
@ -0,0 +1 @@
|
||||
system "sleep 0.5; compass compile --css-dir source/stylesheets"
|
||||
Reference in New Issue
Block a user