Updated rakefile to support new directory and parsing structure.
This commit is contained in:
parent
9ac69e3091
commit
16954daa19
22
Rakefile
22
Rakefile
|
@ -148,20 +148,28 @@ namespace :site do
|
|||
puts 'Done.'
|
||||
end
|
||||
|
||||
desc "Move the changelist over to _posts directory and update its formatting."
|
||||
task :changelist do
|
||||
desc "Move the History.markdown over to the /docs/history directory."
|
||||
task :history do
|
||||
# First lets go ahead and format the file correctly (mainly bullet points)
|
||||
puts "Generating the History doc!"
|
||||
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)}
|
||||
# Replacing the contents of the file for the markdown bullets
|
||||
rep_bullets = file_time.gsub(/\s{2}\*{1}/, "-")
|
||||
# Create a hash for the front matter that is to be included
|
||||
front_matter = {"layout" => "docs", "title" => "History",
|
||||
"permalink" => "/docs/history/"}
|
||||
# Finally we need to copy the file to the /history directory
|
||||
Dir.chdir('site/docs/history') do
|
||||
File.open("index.md", "w") do |file|
|
||||
file.write("#{front_matter.to_yaml}---\n\n")
|
||||
file.write(rep_bullets)
|
||||
end
|
||||
end
|
||||
else
|
||||
puts "Uh Oh!"
|
||||
end
|
||||
puts "Done!"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -80,8 +80,8 @@
|
|||
<li class="{% if page.title == "Upgrading" %}current{% endif %}">
|
||||
<a href="{{ site.url }}/docs/upgrading">Upgrading</a>
|
||||
</li>
|
||||
<li class="{% if page.title == "Changelist" %}current{% endif %}">
|
||||
<a href="{{ site.url }}/docs/changelist">Changelist</a>
|
||||
<li class="{% if page.title == "History" %}current{% endif %}">
|
||||
<a href="{{ site.url }}/docs/history">History</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
|
|
|
@ -1,9 +1,25 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Changelist
|
||||
prev_section: upgrading
|
||||
title: History
|
||||
permalink: /docs/history/
|
||||
---
|
||||
|
||||
## HEAD
|
||||
### Major Enhancements
|
||||
### Minor Enhancements
|
||||
- Update pygments.rb version to 0.5.0 (#1061)
|
||||
- Update Kramdown version to 1.0.2 (#1067)
|
||||
|
||||
### Bug Fixes
|
||||
- Catching that Redcarpet gem isn't installed (#1059)
|
||||
|
||||
### Site Enhancements
|
||||
- Remove pygments-installation instructions, as pygments.rb is bundled with it (#1079)
|
||||
- Move pages to be Pages for realz (#985)
|
||||
- Updated links to Liquid documentation (#1073)
|
||||
|
||||
### Development Fixes
|
||||
|
||||
## 1.0.1 / 2013-05-08
|
||||
|
||||
### Minor Enhancements
|
||||
|
|
Loading…
Reference in New Issue