Skip to content

Commit 3ed5ce8

Browse files
committed
Overhaul documentation page with my own layout.
I needed to do this in order to apply `class="content"` to the paragraphs of text. This added padding which helped with readability. https://gohugo.io/templates/lists/#by-weight
1 parent 131b0fd commit 3ed5ce8

File tree

8 files changed

+73
-33
lines changed

8 files changed

+73
-33
lines changed

content/docs/_index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: Documentation
3+
description: How to use this site
4+
---

content/docs/add-project.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: How can I add my existing workflowr project to workflowr.io?
3+
weight: 2
4+
---
5+
6+
Install the workflowr.io GitHub App on any repository you would like to add to
7+
this site.

content/docs/gitlab.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Can I add a workflowr project hosted on GitLab?
3+
weight: 4
4+
---
5+
6+
Not yet, but we plan to support public repositories hosted on [GitLab][].
7+
8+
[GitLab]: https://about.gitlab.com/

content/docs/index.md

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

content/docs/new-project.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: How can I create my own workflowr project?
3+
weight: 1
4+
---
5+
6+
To start using workflowr, the best place to start is to go through the [Getting
7+
started vignette][getting-started]. This will take you from zero to deploying a
8+
website. Once you are comfortable with the basics of the workflowr framework,
9+
you can read through the other [vignettes][]. For example, if you already have
10+
an existing project that you would like to migrate to use workflowr, read
11+
[Migrating an existing project to use workflowr][migrating].
12+
13+
[getting-started]: https://jdblischak.github.io/workflowr/articles/wflow-01-getting-started.html
14+
[vignettes]: https://jdblischak.github.io/workflowr/articles/index.html
15+
[migrating]: https://jdblischak.github.io/workflowr/articles/wflow-03-migrating.html

content/docs/remove-project.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: How can I remove my workflowr project from workflowr.io?
3+
weight: 3
4+
---
5+
6+
Uninstall the workflowr.io GitHub App from the repository. Go to Settings and
7+
choose Installed GitHub Apps. From there, you can add and remove which
8+
repositories the workflowr.io GitHub App has access to.

layouts/docs/section.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
{{ define "hero" }}
3+
{{- partial "hero.html" . -}}
4+
{{ end }}
5+
6+
{{ define "main" }}
7+
<div class="columns">
8+
<div class="column is-one-quarter">
9+
<h4 class="title is-h4">Table of contents</h4>
10+
<div class="content">
11+
<ul>
12+
{{ range .Pages.ByWeight }}
13+
<li>
14+
<a href="#{{ .Title | urlize }}">{{ .Title }}</a>
15+
</li>
16+
{{ end }}
17+
</ul>
18+
</div>
19+
</div>
20+
<div class="column is-half">
21+
{{ range .Pages.ByWeight }}
22+
{{ .Render "summary" }}
23+
{{ end }}
24+
</div>
25+
</div>
26+
{{ end }}

layouts/docs/summary.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
<h2 class="title is-h2" id="{{ .Title | urlize }}">{{ .Title }}</h2>
3+
<div class="content">
4+
{{ .Content }}
5+
</div>

0 commit comments

Comments
 (0)