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

Clean up and converting to markdown #230

Merged
merged 1 commit into from
Aug 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
# Any pages with names that conflict with files already at the top level will be skipped.
Dir.glob("./source/#{config[:current_version]}/**/*").select{ |f| !File.directory? f }.each do |file_path|
file_path = file_path[0..-6] if file_path[-5..-1] == '.haml'
file_path = file_path[0..-4] if file_path[-3..-1] == '.md'

page_path = file_path["./source/".length..-1]
proxy_path = file_path["./source/#{config[:current_version]}/".length..-1]
Expand Down Expand Up @@ -62,6 +63,7 @@
next unless man_page_name_matched

man_page_name = man_page_name_matched[1].gsub(/\.\d+$/, '').gsub('-', '_')
man_page_name = 'gemfile_man' if man_page_name == 'gemfile'

proxy "/#{version}/#{man_page_name}.html", page_path unless man_page_exists?(man_page_name, version)
end
Expand All @@ -70,12 +72,12 @@
page '/sponsors.html', layout: :compatibility_layout
page '/older_versions.html', layout: :guides_layout
page '/compatibility.html', layout: :guides_layout
page /\/v(\d+.\d+)\/(?!bundle_|commands|docs|man)(.*)/, layout: :guides_layout
page /\/v(\d+.\d+)\/(?!bundle_|commands|docs|man)(.*)/, layout: :md_guides_layout
page /\/v(.*)\/bundle_(.*)/, layout: :commands_layout
page /\/v(.*)\/man\/(.*)/, layout: :commands_layout
page /\/man\/(.*)/, layout: :commands_layout
page /\/v(.*)\/commands\.html/, layout: :commands_layout
page /\/v(.*)\/guides\/(.*)/, layout: :guides_layout
page /\/v(.*)\/guides\/(.*)/, layout: :md_guides_layout

page '/sitemap.xml', layout: false

Expand Down
Binary file removed source/images/bundler-shirt.png
Binary file not shown.
Binary file removed source/images/bundler-small.png
Binary file not shown.
Binary file removed source/images/emocow.png
Binary file not shown.
Binary file removed source/images/gembundler.png
Binary file not shown.
Binary file removed source/images/panda.jpg
Binary file not shown.
2 changes: 1 addition & 1 deletion source/layouts/guides_layout.haml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
:javascript
$(document).ready(function() {
anchors.add();
});
});
18 changes: 18 additions & 0 deletions source/layouts/md_guides_layout.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
- v = current_page.url.scan(/v\d\.\d+/).first || current_version

~ wrap_layout :base do
.row.bg-light-blue.header
= image_tag '/images/docs_header_transparent_bg.png',
srcset: '/images/docs_header_transparent_bg.png 1x, /images/[email protected] 2x, /images/[email protected] 3x',
class: 'img-responsive header-padding',
style: 'max-width: 400px;'
.row
#guide-container.container
.col-md-12
.container.guide.contents
~ yield

:javascript
$(document).ready(function() {
anchors.add();
});
27 changes: 0 additions & 27 deletions source/layouts/old_base.haml

This file was deleted.

10 changes: 0 additions & 10 deletions source/layouts/old_layout.haml

This file was deleted.

24 changes: 0 additions & 24 deletions source/partials/_footer.haml

This file was deleted.

3 changes: 0 additions & 3 deletions source/partials/_header.haml

This file was deleted.

Loading