Skip to content

Commit deabeec

Browse files
committed
Add Learn section to sidebar
Move videos, Pro Git book, and external links to Learn section. Will require the book CI to rerun to update the section of the site the book is in.
1 parent 977f8fd commit deabeec

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

content/doc/ext/_index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
section: "documentation"
2+
section: "learn"
33
subsection: "external-links"
44
title: "Git - External Links"
55
url: /doc/ext.html

content/videos/_index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
section: "documentation"
2+
section: "learn"
33
subsection: "videos"
44
title: "Git - Videos"
55
url: /videos.html

layouts/partials/sidebar.html

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@
1717
{{ end }}
1818
</ul>
1919
</li>
20+
2021
<li>
21-
<a href="{{ relURL "doc" }}"{{ if (eq $section "documentation") }} class="active"{{ end }}>Documentation</a>
22-
<ul {{ if (eq $section "documentation") }}class="expanded"{{ end }}>
23-
<li>
24-
<a href="{{ relURL "docs" }}"{{ if or (eq .Params.Subsection "reference") (eq .Params.Subsection "manual") }} class="active"{{ end }}>Reference</a>
25-
</li>
22+
<a href="{{ relURL "learn" }}"{{ if (eq $section "learn") }} class="active"{{ end }}>Learn</a>
23+
<ul {{ if (eq $section "learn") }}class="expanded"{{ end }}>
2624
<li>
2725
<a href="{{ relURL "cheat-sheet" }}"{{ if (eq .Params.Subsection "cheat-sheet") }} class="active"{{ end }}>Cheat Sheet</a>
2826
</li>
2927
<li>
3028
<a href="{{ relURL "book" }}"{{ if (eq .Params.Subsection "book") }} class="active"{{ end }}>Book</a>
3129
</li>
30+
31+
<li>
32+
<a href="{{ relURL "cheat-sheet" }}"{{ if (eq .Params.Subsection "cheat-sheet") }} class="active"{{ end }}>Cheat Sheet</a>
33+
</li>
3234
<li>
3335
<a href="{{ relURL "videos" }}"{{ if (eq .Params.Subsection "videos") }} class="active"{{ end }}>Videos</a>
3436
</li>
@@ -37,6 +39,14 @@
3739
</li>
3840
</ul>
3941
</li>
42+
<li>
43+
<a href="{{ relURL "doc" }}"{{ if (eq $section "documentation") }} class="active"{{ end }}>Documentation</a>
44+
<ul {{ if (eq $section "documentation") }}class="expanded"{{ end }}>
45+
<li>
46+
<a href="{{ relURL "docs" }}"{{ if or (eq .Params.Subsection "reference") (eq .Params.Subsection "manual") }} class="active"{{ end }}>Reference</a>
47+
</li>
48+
</ul>
49+
</li>
4050
<li>
4151
<a href="{{ relURL "downloads" }}"{{ if (eq $section "downloads") }} class="active"{{ end }}>Downloads</a>
4252
<ul {{ if (eq $section "downloads") }}class="expanded"{{ end }}>

script/book.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def initialize(edition, language_code)
5858
def front_matter
5959
front_matter = {
6060
"category" => "book",
61-
"section" => "documentation",
61+
"section" => "learn",
6262
"subsection" => "book",
6363
"sidebar" => "book",
6464
"book" => {

0 commit comments

Comments
 (0)