Skip to content

Commit 18b53e1

Browse files
committed
Merge branch 'migrate-about-to-hugo'
This topic branch migrates the pages in the "About" section of the sidebar. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents 1dd2dd9 + 6f727ad commit 18b53e1

File tree

12 files changed

+173
-150
lines changed

12 files changed

+173
-150
lines changed

app/views/about/index.html.erb

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

content/about/_index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
redirect_to: about/branching-and-merging
3+
url: /about.html
4+
aliases:
5+
- /about/index.html
6+
---

app/views/about/_branching_and_merging.html.erb renamed to content/about/branching-and-merging.html

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
<section class="about current" id="branching-and-merging" style="display: block;">
1+
---
2+
order: 1
3+
section: "about"
4+
subsection: "branching-and-merging"
5+
subtitle: "Branching and Merging"
6+
display_class: "three-line"
7+
url: /about/branching-and-merging.html
8+
aliases:
9+
- /about/branching-and-merging/index.html
10+
- /about.html
11+
- /about/index.html
12+
---
13+
<section class="about current" id="branching-and-merging">
214

315
<h2>Branching and Merging</h2>
416

@@ -42,7 +54,7 @@ <h2>Branching and Merging</h2>
4254
</p>
4355

4456
<div class="bottom-nav" style="display: block;">
45-
<a href="#small-and-fast" class="next" data-section-id="small-and-fast">Small and Fast →</a>
57+
<a href="/about/small-and-fast" class="next" data-section-id="small-and-fast">Small and Fast →</a>
4658
</div>
4759

4860
</section>
Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
<section class="about" id="info-assurance" style="display: none;">
1+
---
2+
order: 4
3+
section: "about"
4+
subsection: "data-assurance"
5+
subtitle: "Data Assurance"
6+
display_class: "two-line"
7+
aliases:
8+
- /about/data-assurance/index.html
9+
- /about/info-assurance.html
10+
- /about/info-assurance/index.html
11+
---
12+
<section class="about" id="data-assurance">
213
<h2>Data Assurance</h2>
314
<p>
415
The data model that Git uses ensures the cryptographic integrity of every bit
@@ -18,8 +29,8 @@ <h2>Data Assurance</h2>
1829
Most centralized version control systems provide no such integrity by default.
1930
</p>
2031
<div class="bottom-nav" style="display: block;">
21-
<a href="#distributed" class="previous" data-section-id="distributed">← Distributed</a>
22-
<a href="#staging-area" class="next" data-section-id="staging-area">Staging Area →</a>
32+
<a href="/about/distributed" class="previous" data-section-id="distributed">← Distributed</a>
33+
<a href="/about/staging-area" class="next" data-section-id="staging-area">Staging Area →</a>
2334
</div>
2435
</section>
25-
36+
Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1-
<section class="about" id="distributed" style="display: none;">
2-
1+
---
2+
order: 3
3+
section: "about"
4+
subsection: "distributed"
5+
subtitle: "Distributed"
6+
display_class: "one-line"
7+
aliases:
8+
- /about/distributed/index.html
9+
---
10+
<section class="about" id="distributed">
11+
312
<h2>Distributed</h2>
4-
13+
514
<p>
615
One of the nicest features of any Distributed SCM, Git included, is that it's distributed. This means that instead of doing a "checkout" of the current tip of the source code, you do a "clone" of the entire repository.
716
</p>
@@ -36,7 +45,7 @@ <h4>Dictator and Lieutenants Workflow</h4>
3645
<img src="/images/about/[email protected]" width="562" height="303" alt="Workflow C">
3746
</p>
3847
<div class="bottom-nav" style="display: block;">
39-
<a href="#small-and-fast" class="previous" data-section-id="small-and-fast">← Small and Fast</a>
40-
<a href="#info-assurance" class="next" data-section-id="info-assurance">Data Assurance →</a>
48+
<a href="/about/small-and-fast" class="previous" data-section-id="small-and-fast">← Small and Fast</a>
49+
<a href="/about/data-assurance" class="next" data-section-id="info-assurance">Data Assurance →</a>
4150
</div>
4251
</section>

app/views/about/_free_and_open_source.html.erb renamed to content/about/free-and-open-source.html

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
<section class="about" id="free-and-open-source" style="display: none;">
1+
---
2+
order: 6
3+
section: "about"
4+
subsection: "free-and-open-source"
5+
subtitle: "Free and Open Source"
6+
display_class: "three-line"
7+
aliases:
8+
- /about/free-and-open-source/index.html
9+
---
10+
<section class="about" id="free-and-open-source">
211
<h2>Free and Open Source</h2>
312
<p>Git is released under the <a href="https://opensource.org/licenses/GPL-2.0"
413
>GNU General Public License version 2.0</a>, which is an
@@ -13,7 +22,7 @@ <h2>Free and Open Source</h2>
1322
details.</p>
1423

1524
<div class="bottom-nav" style="display: block;">
16-
<a href="#staging-area" class="previous" data-section-id="staging-area">← Staging Area</a>
17-
<a href="#trademark" class="next" data-section-id="trademark">Trademark →</a>
25+
<a href="/about/staging-area" class="previous" data-section-id="staging-area">← Staging Area</a>
26+
<a href="/about/trademark" class="next" data-section-id="trademark">Trademark →</a>
1827
</div>
1928
</section>
Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
<section class="about" id="small-and-fast" style="display: none;">
1+
---
2+
order: 2
3+
section: "about"
4+
subsection: "small-and-fast"
5+
subtitle: "Small and Fast"
6+
display_class: "two-line"
7+
aliases:
8+
- /about/small-and-fast/index.html
9+
---
10+
<section class="about" id="small-and-fast">
211

312
<h2>Small and Fast</h2>
413

@@ -146,8 +155,8 @@ <h3>Benchmarks</h3>
146155
</p>
147156

148157
<div class="bottom-nav" style="display: block;">
149-
<a href="#branching-and-merging" class="previous" data-section-id="branching-and-merging">← Branching and Merging</a>
150-
<a href="#distributed" class="next" data-section-id="distributed">Distributed →</a>
158+
<a href="/about/branching-and-merging" class="previous" data-section-id="branching-and-merging">← Branching and Merging</a>
159+
<a href="/about/distributed" class="next" data-section-id="distributed">Distributed →</a>
151160
</div>
152161

153162
</section>
Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
<section class="about" id="staging-area" style="display: none;">
1+
---
2+
order: 5
3+
section: "about"
4+
subsection: "staging-area"
5+
subtitle: "Staging Area"
6+
display_class: "two-line"
7+
aliases:
8+
- /about/staging-area/index.html
9+
---
10+
<section class="about" id="staging-area">
211
<h2>Staging Area</h2>
312
<p>
413
Unlike the other systems, Git has something called the "staging area" or "index". This is an intermediate area where commits can be formatted and reviewed before completing the commit.
@@ -19,8 +28,8 @@ <h2>Staging Area</h2>
1928
<img src="/images/about/[email protected]" width="338" height="185" alt="Index 2">
2029
</p>
2130
<div class="bottom-nav" style="display: block;">
22-
<a href="#info-assurance" class="previous" data-section-id="info-assurance">← Data Assurance</a>
23-
<a href="#free-and-open-source" class="next" data-section-id="free-and-open-source">Free and Open Source →</a>
31+
<a href="/about/data-assurance" class="previous" data-section-id="info-assurance">← Data Assurance</a>
32+
<a href="/about/free-and-open-source" class="next" data-section-id="free-and-open-source">Free and Open Source →</a>
2433
</div>
2534
</section>
2635

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
<section class="about" id="trademark" style="display: none;">
1+
---
2+
order: 7
3+
section: "about"
4+
subsection: "trademark"
5+
subtitle: "Trademark"
6+
display_class: "one-line"
7+
aliases:
8+
- /trademark.html
9+
- /trademark/index.html
10+
- /about/trademark/index.html
11+
---
12+
<section class="about current" id="trademark">
213

314
<h2>GIT TRADEMARK POLICY</h2>
415

@@ -176,7 +187,7 @@ <h3>4 Questions</h3>
176187
Montague St. Ste 380, Brooklyn, NY 11201-3548.</p>
177188

178189
<div class="bottom-nav" style="display: block;">
179-
<a href="#free-and-open-source" class="previous" data-section-id="free-and-open-source">← Free and Open Source</a>
190+
<a href="/about/free-and-open-source" class="previous" data-section-id="free-and-open-source">← Free and Open Source</a>
180191
</div>
181192

182193
</section>

layouts/_default/baseof.html

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,44 @@
11
<!DOCTYPE html>
2+
{{ if isset .Params "redirect_to" }}
3+
<html lang="en-US">
4+
<head>
5+
<meta charset="utf-8">
6+
<title>Redirecting&hellip;</title>
7+
<link rel="canonical" href="{{ relURL .Params.redirect_to }}">
8+
<meta http-equiv="refresh" content="0; url={{ relURL .Params.redirect_to }}">
9+
<meta name="robots" content="noindex">
10+
</head>
11+
<body>
12+
<script>location="{{ relURL .Params.redirect_to }}"</script>
13+
<h1>Redirecting&hellip;</h1>
14+
<a href="{{ relURL .Params.redirect_to }}">Click here if you are not redirected.</a>
15+
</body>
16+
</html>
17+
{{ else }}
218
<html lang="en">
319

20+
{{ $section := "" }}
21+
{{ if isset .Params "section" }}
22+
{{ $section = .Params.section }}
23+
{{ else if (eq .Page.Path "/docs") }}
24+
{{ $section = "documentation" }}
25+
{{ else if (isset .Page "Section") }}
26+
{{ $section = .Page.Section }}
27+
{{ else if (or (eq .Page.Type "doc") (eq .Page.Type "docs") (eq .Page.Type "video")) }}
28+
{{ $section = "documentation" }}
29+
{{ else if (isset .Page "Type") }}
30+
{{ $section = .Page.Type }}
31+
{{ else }}
32+
{{ warnf "No section found in %s" (.Page.Path | jsonify) }}
33+
{{ end }}
34+
{{ .Scratch.Set "section" $section }}
35+
436
<head>
537
<meta charset='utf-8'>
638
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
739
<meta name="viewport" content="width=device-width, initial-scale=1">
840

9-
<title>{{ .Page.Title | default "Git" }}</title>
41+
<title>{{ .Page.Title | default "Git" }}{{ if (isset .Params "subtitle") }} - {{ .Params.subtitle }}{{ end }}</title>
1042

1143
<link href='/favicon.ico' rel='shortcut icon' type='image/x-icon'>
1244

@@ -20,7 +52,7 @@
2052

2153
</head>
2254

23-
<body id="{{ .Page.Section }}">
55+
<body id="{{ $section }}">
2456

2557
<div class="inner">
2658
{{ partial "header.html" . }}
@@ -41,6 +73,20 @@
4173
<div id="content">
4274
{{ if (eq .Page.Path "/docs") }}
4375
{{ partial "ref/index.html" . }}
76+
{{ else if eq $section "about" }}
77+
<div id="main">
78+
<h1 data-pagefind-meta="title">About{{ if (isset .Params "subtitle") }} - {{ .Params.subtitle }}{{ end }}</h1>
79+
80+
<ol id="about-nav">
81+
{{ $abouts := sort (where .Site.RegularPages "Params.section" "about") "Params.order" }}
82+
{{ range $about := $abouts }}
83+
<li>
84+
<a href="{{ relURL (strings.TrimSuffix ".html" $about.RelPermalink) }}" class="{{ $about.Params.display_class }}{{ if eq $.Params.subsection $about.Params.subsection }} current{{ end }}">{{ $about.Params.subtitle }}</a>
85+
</li>
86+
{{ end }}
87+
</ol>
88+
{{ .Content }}
89+
</div>
4490
{{ else }}
4591
{{ .Content }}
4692
{{ end }}
@@ -52,3 +98,4 @@
5298

5399
</body>
54100
</html>
101+
{{ end }}

0 commit comments

Comments
 (0)