Skip to content

Commit c42b11e

Browse files
committed
Remove /doc landing page
This makes the reference docs immediately available for the sidebar. Make /doc an alias for /docs (the reference landing page), to avoid broken links.
1 parent a514d6e commit c42b11e

File tree

4 files changed

+4
-67
lines changed

4 files changed

+4
-67
lines changed

content/doc/_index.html

Lines changed: 0 additions & 58 deletions
This file was deleted.

layouts/partials/sidebar.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,7 @@
3737
</ul>
3838
</li>
3939
<li>
40-
<a href="{{ relURL "doc" }}"{{ if (eq $section "documentation") }} class="active"{{ end }}>Documentation</a>
41-
<ul {{ if (eq $section "documentation") }}class="expanded"{{ end }}>
42-
<li>
43-
<a href="{{ relURL "docs" }}"{{ if or (eq .Params.Subsection "reference") (eq .Params.Subsection "manual") }} class="active"{{ end }}>Reference</a>
44-
</li>
45-
</ul>
40+
<a href="{{ relURL "docs" }}"{{ if or (eq .Params.Subsection "reference") (eq .Params.Subsection "manual") }} class="active"{{ end }}>Reference</a>
4641
</li>
4742
<li>
4843
<a href="{{ relURL "downloads" }}"{{ if (eq $section "downloads") }} class="active"{{ end }}>Downloads</a>

layouts/partials/site-root.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h3>Learn</h3>
1919
<li id="nav-documentation">
2020
<a href="{{ relURL "docs" }}">
2121
<img src="{{ relURL "images/icons/[email protected]" }}" width="74" height="74" />
22-
<h3>Documentation</h3>
22+
<h3>Reference</h3>
2323
<p>Git's reference documentation</p>
2424
</a>
2525
</li>

script/update-docs.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def extract_glossary_from_html(content, lang = 'en')
140140
end
141141
end
142142
definition = definition_fragment.to_html
143-
143+
144144
term_names.each do |term|
145145
glossary[term] = definition
146146
end
@@ -764,7 +764,7 @@ def index_doc(filter_tags, doc_list, get_content)
764764
"subsection" => "reference",
765765
"title" => "Git - Reference",
766766
"url" => "/docs.html",
767-
"aliases" => ["/docs/index.html"]
767+
"aliases" => ["/docs/index.html", "/doc/index.html", "/doc", "/doc.html"]
768768
}
769769

770770
File.open(DOCS_INDEX_FILE, "w") do |out|

0 commit comments

Comments
 (0)