Skip to content

Commit c761def

Browse files
committed
Merge branch 'migrate-docs-main-page-to-hugo'
This topic branch migrates the landing page of the "Documentation" section to the Hugo world. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents ce1cd81 + cc7a35f commit c761def

File tree

9 files changed

+143
-100
lines changed

9 files changed

+143
-100
lines changed

app/views/doc/index.html.erb

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

config/initializers/constants.rb

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

content/doc/_index.html

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
section: "documentation"
3+
title: "Git - Documentation"
4+
url: /doc.html
5+
aliases:
6+
- /doc/index.html
7+
---
8+
9+
<div id="main">
10+
11+
<h1> Documentation </h1>
12+
13+
<h2> Reference </h2>
14+
15+
<div class="callout ref-manual">
16+
<h3><a href="/docs">Reference Manual</a></h3>
17+
18+
<p>
19+
The official and comprehensive <strong>man pages</strong> that are included in the Git package itself.
20+
</p>
21+
</div>
22+
23+
<p class="quickref">
24+
Quick reference guides:
25+
26+
<a href="https://github.github.com/training-kit/">GitHub Cheat Sheet</a>
27+
|
28+
<a href="https://ndpsoftware.com/git-cheatsheet.html">Visual Git Cheat Sheet</a>
29+
30+
</p>
31+
32+
<h2> Book </h2>
33+
34+
<div class="callout ref-manual">
35+
<h3>Pro Git</h3>
36+
<p>The entire <strong><a href="/book">Pro Git book</a></strong> written
37+
by Scott Chacon and Ben Straub is available to <a href="/book">read online for free</a>.
38+
Dead tree versions are available on <a href="https://www.amazon.com/Pro-Git-Scott-Chacon/dp/1484200772?ie=UTF8&camp=1789&creative=9325&creativeASIN=1430218339&linkCode=as2&tag=git-sfconservancy-20">Amazon.com</a>.
39+
</p>
40+
</div>
41+
42+
<h2> Videos </h2>
43+
44+
<div>
45+
{{< videos >}}
46+
47+
<p>
48+
<a href="/videos">See all videos →</a>
49+
</p>
50+
51+
<h2> External Links </h2>
52+
<p>
53+
The <a href="/doc/ext">External Links section</a> is a curated, ever-evolving collection of tutorials, books, videos, and other Git resources.
54+
</p>
55+
56+
</div>
57+
58+
</div>

content/video/_index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
redirect_to: videos
3+
---

content/video/get-going.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
section: "documentation"
3+
video_title: "Get Going with Git"
4+
category: "Git Basics"
5+
length: "04:26"
6+
link: "get-going"
7+
ext_id: "41493906"
8+
episode: 3
9+
---

content/video/quick-wins.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
section: "documentation"
3+
video_title: "Quick Wins with Git"
4+
category: "Git Basics"
5+
length: "05:06"
6+
link: "quick-wins"
7+
ext_id: "41516942"
8+
episode: 4
9+
---

content/video/what-is-git.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
section: "documentation"
3+
video_title: "What is Git?"
4+
category: "Git Basics"
5+
length: "08:15"
6+
link: "what-is-git"
7+
ext_id: "41381741"
8+
episode: 2
9+
---
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
section: "documentation"
3+
video_title: "What is Version Control?"
4+
category: "Git Basics"
5+
length: "05:59"
6+
link: "what-is-version-control"
7+
ext_id: "41027679"
8+
episode: 1
9+
---

layouts/shortcodes/videos.html

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{{ $videos := sort (where .Site.RegularPages "Params.episode" "ne" nil) "Params.episode" }}
2+
{{ $img_suffix := "" }}
3+
{{ $dimensions := "" }}
4+
{{ if .IsNamedParams }}
5+
{{ $img_suffix = .Get "img_suffix" }}
6+
{{ $dimensions = .Get "dimensions" }}
7+
{{ end }}
8+
9+
<div class="two-column">
10+
<div class="column-left">
11+
<ul class="video-thumbnails">
12+
{{ range $i, $video := $videos }}
13+
{{ $group := mod $i 2 }}
14+
{{ if eq $group 1 }}
15+
<li>
16+
<a href="{{ relURL "video" }}/{{ $video.Params.link }}"><img src="{{ relURL "images/video" }}/ep{{ print $video.Params.episode $img_suffix }}.png" {{ $dimensions }}></a>
17+
<h4>
18+
<a href="{{ relURL "video" }}/{{ $video.Params.link }}">{{ $video.Params.video_title }}</a>
19+
</h4>
20+
<p class="description">
21+
<strong>Length:</strong> {{ $video.Params.length }}
22+
</p>
23+
</li>
24+
{{ end }}
25+
{{ end }}
26+
</ul>
27+
</div>
28+
<div class="column-right">
29+
<ul class="video-thumbnails">
30+
{{ range $i, $video := $videos }}
31+
{{ $group := mod $i 2 }}
32+
{{ if eq $group 0 }}
33+
<li>
34+
<a href="{{ relURL "video" }}/{{ $video.Params.link }}"><img src="{{ relURL "images/video" }}/ep{{ print $video.Params.episode $img_suffix }}.png" {{ $dimensions }}></a>
35+
<h4>
36+
<a href="{{ relURL "video" }}/{{ $video.Params.link }}">{{ $video.Params.video_title }}</a>
37+
</h4>
38+
<p class="description">
39+
<strong>Length:</strong> {{ $video.Params.length }}
40+
</p>
41+
</li>
42+
{{ end }}
43+
{{ end }}
44+
</ul>
45+
</div>
46+
</div>

0 commit comments

Comments
 (0)