Permalink
Browse files

Add documentation/courses/tutorials layout

- Close #405
- See #681 (improve consistency after #571 Bootstrap 4 migration)
- Add `search_results` to language file
- example site: Add example `tutorial` folder
- example site: Set privacy page to hidden (draft)
  • Loading branch information...
gcushen committed Sep 9, 2018
1 parent f45e2c0 commit 674bb67364164f922759b11ce9083e83fdd77aa4
View
@@ -59,6 +59,10 @@
version = "2.9.0"
sri = "sha256-cJXigylnJlxvAdfFNHeS+IiMcKWS3Rf/cy3bl9bb0ng="
url = "https://cdnjs.cloudflare.com/ajax/libs/instantsearch.js/%s/instantsearch.min.js"
[js.anchor]
version = "4.1.1"
sri = "sha256-pB/deHc9CGfFpJRjC43imB29Rse8tak+5eXqntO94ck="
url = "https://cdnjs.cloudflare.com/ajax/libs/anchor-js/%s/anchor.min.js"
# CSS
View
@@ -280,8 +280,8 @@ enableGitInfo = false
weight = 4
[[menu.main]]
name = "Teaching"
url = "#teaching"
name = "Tutorials"
url = "/tutorial/"
weight = 5
[[menu.main]]
@@ -2,7 +2,7 @@
title = "Privacy Policy"
date = 2018-06-28T00:00:00
draft = false
draft = true
# [header]
# image = ""
@@ -0,0 +1,33 @@
+++
title = "Overview"
date = 2018-09-09T00:00:00
# lastmod = 2018-09-09T00:00:00
draft = false # Is this a draft? true/false
toc = true # Show table of contents? true/false
type = "docs" # Do not modify.
# Add menu entry to sidebar.
[menu.docs]
name = "Overview"
weight = 1
# Featured image.
# Uncomment below lines to use.
# [header]
# image = "headers/getting-started.png"
# caption = "Image credit: [**Academic**](https://github.com/gcushen/hugo-academic/)"
+++
This feature can be used for publishing content such as:
* **Project or software documentation**
* **Online courses**
* **Tutorials**
The parent folder may be renamed, for example, to `docs` for project documentation or `course` for creating an online course.
To disable this feature, either delete the parent folder, or set `draft = true` in the front matter of all its pages.
After renaming or deleting the parent folder, you may wish to update any `[[menu.main]]` menu links to it in the `config.toml`.
@@ -0,0 +1,32 @@
+++
title = "Example Page"
date = 2018-09-09T00:00:00
# lastmod = 2018-09-09T00:00:00
draft = false # Is this a draft? true/false
toc = true # Show table of contents? true/false
type = "docs" # Do not modify.
# Add menu entry to sidebar.
linktitle = "Example Page"
[menu.docs]
parent = "Example Topic"
weight = 1
# Featured image.
# Uncomment below lines to use.
# [header]
# image = "headers/getting-started.png"
# caption = "Image credit: [**Academic**](https://github.com/gcushen/hugo-academic/)"
+++
In this tutorial, I'll share my top 10 tips for getting started with Academic:
## Tip 1
...
## Tip 2
...
View
@@ -145,6 +145,9 @@
- id: search_placeholder
translation: Search...
- id: search_results
translation: Search Results
- id: search_no_results
translation: No results found
@@ -9,9 +9,8 @@
{{ partial "header_image.html" . }}
<div class="article-container">
{{ with .Title }}<h1 class="my-4">{{ . }}</h1>{{ end }}
<div class="universal-wrapper">
{{ with .Title }}<h1 class="pt-3">{{ . }}</h1>{{ end }}
{{ with .Content }}
<div class="article-style" itemprop="articleBody">{{ . }}</div>
@@ -34,7 +33,6 @@ <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
{{ end }}
{{ partial "pagination" . }}
</div>
{{ partial "footer_container.html" . }}
{{ partial "footer.html" . }}
View
@@ -0,0 +1 @@
{{ partial "docs_layout.html" . }}
View
@@ -0,0 +1 @@
{{ partial "docs_layout.html" . }}
Oops, something went wrong.

0 comments on commit 674bb67

Please sign in to comment.