Skip to content

Commit

Permalink
Merge branch 'release-0.9.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
thingsym committed Jun 14, 2020
2 parents 4685204 + 2290a2f commit e9cb767
Show file tree
Hide file tree
Showing 19 changed files with 117 additions and 10 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@ Small patches and bug reports can be submitted a issue tracker in Github. Forkin

## Changelog

* Version 0.9.2 - 2020.06.14
* add note and sample to document
* fix tableOfContents endLevel
* add chapter 'unlimited levels' to document
* add menu indentation up to 5 levels

* Version 0.9.1 - 2020.05.24
* fix config.toml
* fix url in rss meta link
Expand Down
4 changes: 2 additions & 2 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ enableMissingTranslationPlaceholders = false
# Source Code repository section
description = "put your description"
github_repository = "https://github.com/thingsym/hugo-theme-techdoc"
version = "0.9.1"
version = "0.9.2"

# Documentation repository section
# documentation repository (set edit link to documentation repository)
Expand Down Expand Up @@ -87,7 +87,7 @@ enableMissingTranslationPlaceholders = false
unsafe= true
[markup.tableOfContents]
startLevel = 2
endLevel = 4
endLevel = 6
ordered = false

[outputs]
Expand Down
7 changes: 7 additions & 0 deletions exampleSite/content/chapter2/5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "Chapter 2-0 (weight: no set)"
date: 2017-10-17T15:26:15Z
draft: false
---

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
11 changes: 11 additions & 0 deletions exampleSite/content/chapter2/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,15 @@ draft: false
weight: 30
---

{{% panel status="primary" title="Note" icon="far fa-lightbulb" %}}
The `weight` field with weight number in your content’s front matter will render a weighted menu.

```
weight: 30
```

Lower weight gets higher precedence. So content with lower weight will come first.

{{% /panel %}}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
4 changes: 4 additions & 0 deletions exampleSite/content/chapter3/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ draft: false
weight: 40
---

{{% panel status="primary" title="Note" icon="far fa-lightbulb" %}}
The document hierarchy is unlimite.
{{% /panel %}}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
16 changes: 16 additions & 0 deletions exampleSite/content/chapter4/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: "Chapter 4 (unlimited levels)"
date: 2017-10-17T15:26:15Z
draft: false
weight: 50
---

{{% panel status="primary" title="Note" icon="far fa-lightbulb" %}}
The document hierarchy is unlimite.
It also means that the menu levels is unlimited levels.

The menu levels has up to 5 levels of indentation. After that there is no indentation.
{{% /panel %}}


Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
7 changes: 7 additions & 0 deletions exampleSite/content/chapter4/chapter4-1/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "Chapter 4-1"
date: 2017-10-17T15:26:15Z
draft: false
---

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "Chapter 4-1-1"
date: 2017-10-17T15:26:15Z
draft: false
---

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "Chapter 4-1-1-1"
date: 2017-10-17T15:26:15Z
draft: false
---

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "Chapter 4-1-1-1-1"
date: 2017-10-17T15:26:15Z
draft: false
---

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "Chapter 4-1-1-1-1-1"
date: 2017-10-17T15:26:15Z
draft: false
---

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "Chapter 4-1-1-1-1-1-1"
date: 2017-10-17T15:26:15Z
draft: false
---

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
4 changes: 2 additions & 2 deletions exampleSite/content/getting-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ For an example of `config.toml`, see [config.toml](https://github.com/thingsym/h
# Source Code repository section
description = "put your description"
github_repository = "https://github.com/thingsym/hugo-theme-techdoc"
version = "0.9.1"
version = "0.9.2"

# Documentation repository section
# documentation repository (set edit link to documentation repository)
Expand Down Expand Up @@ -80,7 +80,7 @@ default: `https://github.com/thingsym/hugo-theme-techdoc`

The version of souce code

default: `0.9.1`
default: `0.9.2`

#### `github_doc_repository`

Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/sample/table-of-contents.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ TableOfContents: true
---

{{% panel status="primary" title="Note" icon="far fa-lightbulb" %}}
The `TableOfContents` field set to `true` in your content’s front matter will render a table of contents.
The `TableOfContents` field with `true` in your content’s front matter will render a table of contents.

```
TableOfContents: true
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hugo-theme-techdoc",
"version": "0.9.1",
"version": "0.9.2",
"description": "The Techdoc is a Hugo Theme for technical documentation.",
"main": "gulpfile.js",
"author": "Thingsym",
Expand Down
13 changes: 11 additions & 2 deletions src/scss/_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,19 @@ main {
}

nav > ul > li li a {
padding-left: 2rem;
padding-left: 1rem + 1rem * 1;
}
nav > ul ul > li li a {
padding-left: 2rem * 1 * 1.5;
padding-left: 1rem + 1rem * 2;
}
nav > ul ul ul > li li a {
padding-left: 1rem + 1rem * 3;
}
nav > ul ul ul ul > li li a {
padding-left: 1rem + 1rem * 4;
}
nav > ul ul ul ul ul > li li a {
padding-left: 1rem + 1rem * 5;
}

@media screen and (max-width: #{map-get($default-breakpoints, xs )} ) {
Expand Down
12 changes: 12 additions & 0 deletions static/css/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,18 @@ main {
padding-left: 3rem;
}

.sidebar nav > ul ul ul > li li a {
padding-left: 4rem;
}

.sidebar nav > ul ul ul ul > li li a {
padding-left: 5rem;
}

.sidebar nav > ul ul ul ul ul > li li a {
padding-left: 6rem;
}

@media screen and (max-width: 480px) {
.sidebar nav > ul > li:first-child a {
border-top: solid 1px #eee;
Expand Down
Loading

0 comments on commit e9cb767

Please sign in to comment.