From fb8d9d7bde16ee877878ff0d396f321477fcda9c Mon Sep 17 00:00:00 2001
From: Scott Chacon
Date: Thu, 26 Apr 2012 14:41:31 -0700
Subject: [PATCH] change to docs/
---
app/helpers/doc_helper.rb | 2 +-
app/models/doc.rb | 2 +-
app/views/doc/_versions.html.erb | 2 +-
app/views/doc/ext.html.erb | 4 ++--
app/views/doc/index.html.haml | 2 +-
app/views/downloads/guis/index.html.haml | 4 ++--
app/views/shared/_related.html.erb | 2 +-
app/views/shared/_sidebar.html.erb | 24 ------------------------
config/routes.rb | 9 ++++++---
lib/tasks/related.rake | 6 +++---
10 files changed, 18 insertions(+), 39 deletions(-)
delete mode 100644 app/views/shared/_sidebar.html.erb
diff --git a/app/helpers/doc_helper.rb b/app/helpers/doc_helper.rb
index 894f395e77..20fe5a4b2f 100644
--- a/app/helpers/doc_helper.rb
+++ b/app/helpers/doc_helper.rb
@@ -1,6 +1,6 @@
module DocHelper
def man(name)
- "#{name.gsub('git-', '')}".html_safe
+ "#{name.gsub('git-', '')}".html_safe
end
def linkify(content, section)
next_page = section.next_slug
diff --git a/app/models/doc.rb b/app/models/doc.rb
index fc6f61d286..19e77c2bc1 100644
--- a/app/models/doc.rb
+++ b/app/models/doc.rb
@@ -39,7 +39,7 @@ def self.search(term, highlight = false)
:name => name,
:score => hit["_score"],
:highlight => highlight,
- :url => "/ref/#{name}"
+ :url => "/docs/#{name}"
}
end
diff --git a/app/views/doc/_versions.html.erb b/app/views/doc/_versions.html.erb
index ce2504a60f..aa910ae043 100644
--- a/app/views/doc/_versions.html.erb
+++ b/app/views/doc/_versions.html.erb
@@ -6,7 +6,7 @@
<% @versions.each do |v| %>
<% if v[:changed] %>
- <%= v[:name] %>
+ <%= v[:name] %>
<% v[:diff][0].times do %>
diff --git a/app/views/doc/ext.html.erb b/app/views/doc/ext.html.erb
index a8e94a49c4..617b3702a2 100644
--- a/app/views/doc/ext.html.erb
+++ b/app/views/doc/ext.html.erb
@@ -15,13 +15,13 @@
-
+
The official gittutorial man page is a good place to start.
-
+
Learn the basics with 20 of the most common commands.
diff --git a/app/views/doc/index.html.haml b/app/views/doc/index.html.haml
index dee010ffa2..de19da96fb 100644
--- a/app/views/doc/index.html.haml
+++ b/app/views/doc/index.html.haml
@@ -12,7 +12,7 @@
%h2 Reference
%div.callout.ref-manual
- %h3= link_to "Reference Manual", "/ref"
+ %h3= link_to "Reference Manual", "/docs"
%p
The official and comprehensive man pages that are included in the Git package itself.
diff --git a/app/views/downloads/guis/index.html.haml b/app/views/downloads/guis/index.html.haml
index 2e9fa4349b..9b3fc7abd8 100644
--- a/app/views/downloads/guis/index.html.haml
+++ b/app/views/downloads/guis/index.html.haml
@@ -4,13 +4,13 @@
- content_for :sidebar do
%div.callout
%p
- The entire Pro Git book written by Scott Chacon is available to read online for free. Dead tree versions are available on Amazon.com.
+ The entire Pro Git book written by Scott Chacon is available to read online for free. Dead tree versions are available on Amazon.com.
%div#main
%h1 GUI Clients
%p
- Git comes with built-in GUI tools for committing (git-gui) and browsing (gitk), but there are several third-party tools for users looking for platform-specific experience.
+ Git comes with built-in GUI tools for committing (git-gui) and browsing (gitk), but there are several third-party tools for users looking for platform-specific experience.
%p
=link_to "Only show GUIs for my OS (Windows)", "#", {:class => "subtle-button", :id => "gui-os-filter", 'data-os' => 'windows'}
diff --git a/app/views/shared/_related.html.erb b/app/views/shared/_related.html.erb
index 25be2bf37e..6bcf6c8a80 100644
--- a/app/views/shared/_related.html.erb
+++ b/app/views/shared/_related.html.erb
@@ -5,7 +5,7 @@
<%= rel.name %>
<% if rel.content_type == "reference" %>
- in Reference
+ in Reference
<% elsif rel.content_type == "book" %>
in Books
<% elsif rel.content_type == "video" %>
diff --git a/app/views/shared/_sidebar.html.erb b/app/views/shared/_sidebar.html.erb
deleted file mode 100644
index f89a1ac80e..0000000000
--- a/app/views/shared/_sidebar.html.erb
+++ /dev/null
@@ -1,24 +0,0 @@
-
diff --git a/config/routes.rb b/config/routes.rb
index cacf5cf992..7262d77b93 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -2,13 +2,16 @@
get "site/index"
match "/doc" => "doc#index"
- match "/ref" => "doc#ref"
- match "/ref/:file" => "doc#man"
- match "/ref/:file/:version" => "doc#man", :version => /[^\/]+/
+ match "/docs" => "doc#ref"
+ match "/docs/:file" => "doc#man"
+ match "/docs/:file/:version" => "doc#man", :version => /[^\/]+/
match "/test" => "doc#test"
match "/videos" => "doc#videos"
match "/doc/ext" => "doc#ext"
+ match "/ref/:file" => "doc#man"
+ match "/ref/:file/:version" => "doc#man", :version => /[^\/]+/
+
match "/book" => "doc#book"
match "/book/commands" => "doc#commands"
match "/book/ch:chapter-:section.html" => "doc#progit"
diff --git a/lib/tasks/related.rake b/lib/tasks/related.rake
index 7c65544849..5e0d5c2d2a 100644
--- a/lib/tasks/related.rake
+++ b/lib/tasks/related.rake
@@ -49,7 +49,7 @@ def find_book_links
if section = Section.find(id)
puts "linking #{section.title} with #{command}"
from = ['book', section.title, section.slug, "/book/en/#{section.slug}", score]
- to = ['reference', command, command, "/ref/#{command}", score]
+ to = ['reference', command, command, "/docs/#{command}", score]
create_related_item(from, to)
end
end
@@ -78,8 +78,8 @@ def find_reference_links
next if command == name
if rdv = DocVersion.latest_for(command)
puts "linking #{name} with #{command}"
- from = ['reference', name, name, "/ref/#{name}", score]
- to = ['reference', command, command, "/ref/#{command}", score]
+ from = ['reference', name, name, "/docs/#{name}", score]
+ to = ['reference', command, command, "/docs/#{command}", score]
create_related_item(from, to)
end
end