Rake task added to move History into site and update its formatting.
This commit is contained in:
parent
eb5a8a6358
commit
2c5807faad
20
Rakefile
20
Rakefile
|
@ -24,6 +24,10 @@ def date
|
||||||
Date.today.to_s
|
Date.today.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def file_date
|
||||||
|
Date.today.strftime("%F")
|
||||||
|
end
|
||||||
|
|
||||||
def rubyforge_project
|
def rubyforge_project
|
||||||
name
|
name
|
||||||
end
|
end
|
||||||
|
@ -143,6 +147,22 @@ namespace :site do
|
||||||
end
|
end
|
||||||
puts 'Done.'
|
puts 'Done.'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc "Move the changelist over to _posts directory and update its formatting."
|
||||||
|
task :changelist do
|
||||||
|
# First lets go ahead and format the file correctly (mainly bullet points)
|
||||||
|
if File.exist?("History.markdown")
|
||||||
|
file_time = File.read("History.markdown")
|
||||||
|
replaced = file_time.gsub(/\s{2}\*{1}/, "-")
|
||||||
|
# Now we need to copy the file into the _posts directory with the proper date
|
||||||
|
Dir.chdir('site/_posts') do
|
||||||
|
sh "rm -rf *-changelist.md"
|
||||||
|
File.open("#{file_date}-changelist.md", "w") {|file| file.write(replaced)}
|
||||||
|
end
|
||||||
|
else
|
||||||
|
puts "Uh Oh!"
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
---
|
## HEAD
|
||||||
layout: docs
|
### Major Enhancements
|
||||||
title: Changelist
|
### Minor Enhancements
|
||||||
prev_section: upgrading
|
### Bug Fixes
|
||||||
---
|
- Catching that Redcarpet gem isn't installed (#1059)
|
||||||
|
|
||||||
|
### Site Enhancements
|
||||||
|
### Development Fixes
|
||||||
|
|
||||||
## 1.0.1 / 2013-05-08
|
## 1.0.1 / 2013-05-08
|
||||||
|
|
||||||
|
@ -303,7 +306,7 @@ prev_section: upgrading
|
||||||
- Enhancements
|
- Enhancements
|
||||||
- Added --paginate option to the executable along with a paginator object
|
- Added --paginate option to the executable along with a paginator object
|
||||||
for the payload [github.com/calavera]
|
for the payload [github.com/calavera]
|
||||||
- Upgraded RedCloth to 4.2.1, which makes `<notextile>` tags work once
|
- Upgraded RedCloth to 4.2.1, which makes <notextile> tags work once
|
||||||
again.
|
again.
|
||||||
- Configuration options set in config.yml are now available through the
|
- Configuration options set in config.yml are now available through the
|
||||||
site payload [github.com/vilcans]
|
site payload [github.com/vilcans]
|
Loading…
Reference in New Issue