Skip to content

Commit 76383e7

Browse files
committed
add blogdown theme
1 parent e9436f6 commit 76383e7

File tree

375 files changed

+42676
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

375 files changed

+42676
-3
lines changed

.gitignore

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
.DS_Store
2-
32
# R
43
.Rproj.user
54
.Rhistory
65
.RData
76
.Ruserdata
87
*.Rproj
98
*R_cache/
10-
119
# Ignore tokens
1210
*.rds
1311
.httr-oauth
1412
token
15-
1613
# ignore temporary download files
1714
2016-04-20-processed-logs*
15+
public

config.toml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
baseURL = "/"
2+
languageCode = "en-us"
3+
DefaultContentLanguage = "en"
4+
5+
title = "INBO tutorials"
6+
theme = "hugo-theme-docdock"
7+
ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown$", "_files$", "_cache$"]
8+
9+
[params]
10+
editURL = "https://github.com/inbo/tutorials/edit/master/content/"
11+
showVisitedLinks = true # default is false
12+
themeStyle = "theme" # overide base css
13+
themeVariant = "" # choose theme variant "green", "gold" , "gray", "blue" (default)
14+
ordersectionsby = "weight" # ordersectionsby = "title"
15+
disableHomeIcon = false # default is false
16+
disableSearch = false # default is false
17+
disableNavChevron = false # set true to hide next/prev chevron, default is false
18+
19+
[outputs]
20+
home = [ "HTML", "RSS", "JSON"]
21+
22+
23+
[[menu.shortcuts]]
24+
pre = "<h3>More</h3>"
25+
name = "<i class='fa fa-github'></i> Github repo"
26+
identifier = "ds"
27+
url = "https://github.com/inbo/tutorials"
28+
weight = 10

content/_header.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
+++
2+
title = "header"
3+
description = ""
4+
date = "2017-04-24T18:36:24+02:00"
5+
+++
6+
DocDock Documentation

content/_index.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
+++
2+
title = "DocDock Theme for Hugo"
3+
description = ""
4+
date = "2017-04-24T18:36:24+02:00"
5+
6+
+++
7+
8+
# Hugo docDock theme
9+
[Hugo-theme-docdock {{%icon fa-github%}}](https://github.com/vjeantet/hugo-theme-docdock) is a theme for Hugo, a fast and modern static website engine written in Go. Hugo is often used for blogs, **this theme is fully designed for documentation.**
10+
11+
This theme is a partial porting of the [Learn theme of matcornic {{%icon fa-github%}}](https://github.com/matcornic/hugo-theme-learn).
12+
13+
{{%panel%}}docDock works with a "page tree structure" to organize content : All contents are pages, which belong to other pages. [read more about this]({{%relref "content-organisation/_index.md"%}}) {{%/panel%}}
14+
15+
## Main features
16+
17+
* [Search]({{%relref "search/_index.md" %}})
18+
* **Unlimited menu levels**
19+
* [Generate RevealJS presentation]({{%relref "page-slide.md"%}}) from markdown (embededed or fullscreen page)
20+
* Automatic next/prev buttons to navigate through menu entries
21+
* [Image resizing, shadow...]({{%relref "create-page/page-images.md" %}})
22+
* [Attachments files]({{%relref "shortcodes/attachments.md" %}})
23+
* [List child pages]({{%relref "shortcodes/children/_index.md" %}})
24+
* [Excerpt]({{%relref "shortcodes/excerpt.md"%}}) ! Include segment of content from one page in another
25+
* [Mermaid diagram]({{%relref "shortcodes/mermaid.md" %}}) (flowchart, sequence, gantt)
26+
* [Icons]({{%relref "shortcodes/icon.md" %}}), [Buttons]({{%relref "shortcodes/button.md" %}}), [Alerts]({{%relref "shortcodes/alert.md" %}}), [Panels]({{%relref "shortcodes/panel.md" %}}), [Tip/Note/Info/Warning boxes]({{%relref "shortcodes/notice.md" %}}), [Expand]({{%relref "shortcodes/expand.md" %}})
27+
* [customizable look and feel]({{%relref "content-organisation/customize-style/_index.md"%}}), [theme variants]({{%relref "content-organisation/customize-style/theme-variants.md"%}})
28+
29+
30+
31+
32+
![](https://raw.githubusercontent.com/vjeantet/hugo-theme-docdock/master/images/tn.png?width=33pc&classes=border,shadow)
33+
34+
## Contribute to this documentation
35+
Feel free to update this content, just click the **Edit this page** link displayed on top right of each page, and pullrequest it
36+
{{%alert%}}Your modification will be deployed automatically when merged.{{%/alert%}}
37+
38+
39+
## Documentation website
40+
This current documentation has been statically generated with Hugo with a simple command : `hugo -t docdock` -- source code is [available here at GitHub {{%icon fa-github%}}](https://github.com/vjeantet/hugo-theme-docDock)
41+
42+
{{% panel theme="success" header="Automated deployments" footer="Netlify builds, deploys, and hosts frontends." %}}
43+
Automatically published and hosted thanks to [Netlify](https://www.netlify.com/).
44+
45+
Read more about [Automated HUGO deployments with Netlify](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/)
46+
{{% /panel %}}
47+
+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
+++
2+
title = "Content Organisation"
3+
description = ""
4+
weight = 20
5+
+++
6+
7+
With **Hugo**, pages are the core of your site. Organize your site like any other Hugo project. **Magic occurs with the nested sections implemention done in v0.22 of hugo (congrats @bep)**.
8+
9+
With docdock, **Each content page composes the menu**, they shape the structure of your website.
10+
11+
To link pages to each other, place them in a folders hierarchy
12+
13+
```
14+
content
15+
├── level-one
16+
│ ├── level-two
17+
│ │ ├── level-three
18+
│ │ │ ├── level-four
19+
│ │ │ │ ├── _index.md
20+
│ │ │ │ ├── page-4-a.md
21+
│ │ │ │ ├── page-4-b.md
22+
│ │ │ │ └── page-4-c.md
23+
│ │ │ ├── _index.md
24+
│ │ │ ├── page-3-a.md
25+
│ │ │ ├── page-3-b.md
26+
│ │ │ └── page-3-c.md
27+
│ │ ├── _index.md
28+
│ │ ├── page-2-a.md
29+
│ │ ├── page-2-b.md
30+
│ │ └── page-2-c.md
31+
│ ├── _index.md
32+
│ ├── page-1-a.md
33+
│ ├── page-1-b.md
34+
│ └── page-1-c.md
35+
├── _index.md
36+
└── page-top.md
37+
```
38+
39+
40+
{{%alert info %}} **_index.md** is required in each folder, it's your "folder home page"{{%/alert%}}
41+
42+
### Add header to a menu entry
43+
44+
in the page frontmatter, add a `head` param to insert any HTML code before the menu entry:
45+
46+
example to display a "Hello"
47+
48+
+++
49+
title = "Github repo"
50+
head ="<label>Hello</label> "
51+
+++
52+
53+
54+
55+
### Add icon to a menu entry
56+
57+
in the page frontmatter, add a `pre` param to insert any HTML code before the menu label:
58+
59+
example to display a github icon
60+
61+
+++
62+
title = "Github repo"
63+
pre ="<i class='fa fa-github'></i> "
64+
+++
65+
66+
![dsf](/menu-entry-icon.png?height=40px&classes=shadow)
67+
68+
<!-- ### Customize menu entry label
69+
70+
Add a `name` param next to `[menu.main]`
71+
72+
+++
73+
[menu.main]
74+
parent = ""
75+
identifier = "repo"
76+
pre ="<i class='fa fa-github'></i> "
77+
name = "Github repo"
78+
+++ -->
79+
80+
<!-- ### Create a page redirector
81+
Add a `url` param next to `[menu.main]`
82+
83+
+++
84+
[menu.main]
85+
parent = "page"
86+
identifier = "page-images"
87+
weight = 23
88+
url = "/shortcode/image/"
89+
+++
90+
91+
{{%alert info%}}Look at the menu "Create Page/About images" which redirects to "Shortcodes/image{{%/alert%}}
92+
-->
93+
### Order sibling menu/page entries
94+
95+
in your frontmatter add `weight` param with a number to order.
96+
97+
+++
98+
title="My page"
99+
weight = 4
100+
+++
101+
102+
{{%info%}}add `ordersectionsby = "title"` in your config.toml to order menu entries by title{{%/info%}}
103+
104+
105+
### Hide a menu entry
106+
107+
in your frontmatter add `hidden=true` param.
108+
109+
+++
110+
title="My page"
111+
hidden = true
112+
+++
113+
114+
115+
### Unfolded menu entry by default
116+
117+
One or more menuentries can be displayed unfolded by default. (like the "Getting start" menu entry in this website)
118+
119+
in your frontmatter add `alwaysopen=true` param.
120+
example :
121+
122+
```
123+
title = "Getting start"
124+
description = ""
125+
weight = 1
126+
alwaysopen = true
127+
```
128+
129+
### Folder structure and file name
130+
131+
Content organization **is** your `content` folder structure.
132+
133+
### Homepage
134+
135+
Find out how to [customize homepage]({{%relref "homepage.md"%}})
136+
137+
138+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
+++
2+
title = "Customize website look and feel"
3+
Weight=3
4+
+++
5+
6+
You can change the style and behavior of the theme without touching it.
7+
8+
* inject your own html, css or js into the page
9+
* overide existing css or js with your own files
10+
11+
## Inject your HTML
12+
13+
### into the \<head\> part of each page :
14+
15+
Create a `custom-head.html` into a `layouts/partials` folder next to the content folder
16+
17+
> * content/
18+
> * layouts/
19+
> * partials/
20+
> * custom-head.html
21+
22+
now feel free to add the JS, CSS, HTML code you want :)
23+
24+
### at the end of the body part of each page :
25+
26+
Create a `custom-footer.html` into a `layouts/partials` folder next to the content folder
27+
28+
> * content/
29+
> * layouts/
30+
> * partials/
31+
> * custom-footer.html
32+
33+
now feel free to add the JS, CSS, HTML code you want :)
34+
35+
## overide existing CSS or JS
36+
37+
Create the matching file in your static folder, hugo will use yours instead of the theme's one.
38+
Example :
39+
40+
create a theme.css and place it into `static/css/` to fully overide docdock's theme.css
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
+++
2+
title = "Disable features"
3+
+++
4+
5+
You can disable feature in docdock by changing some params in `config.toml`
6+
7+
8+
## hide Next / Prev Chevrons
9+
```
10+
[params]
11+
disableNavChevron = true
12+
```
13+
14+
## hide Search box in side menu
15+
```
16+
[params]
17+
disableSearch = true
18+
```
19+
20+
## hide the {{%icon fa-home%}} icon in side bar
21+
```
22+
[params]
23+
disableHomeIcon = true
24+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
+++
2+
title = "Theme variants"
3+
description = "change theme style/colors"
4+
+++
5+
6+
In site configuration file, you can set a variant name of this theme to load a specific css, with different color specifications.
7+
8+
add a param `themeVariant = "VARIANT_NAME"` in the `[params]` part of config.toml file.
9+
10+
{{%info%}}Available variants change only colors at this moment{{%/info%}}
11+
12+
13+
## Variant "gray"
14+
```
15+
[params]
16+
themeVariant = "gray"
17+
```
18+
19+
![green docdock](/variant-gray.png)
20+
21+
## Variant "gold"
22+
```
23+
[params]
24+
themeVariant = "gold"
25+
```
26+
27+
![gold docdock](/variant-gold.png)
28+
29+
## Variant "green"
30+
```
31+
[params]
32+
themeVariant = "green"`
33+
```
34+
35+
![green docdock](/variant-green.png)
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
+++
2+
title = "Extra menu entries"
3+
date = "2017-04-29T18:36:24+02:00"
4+
Weight=2
5+
+++
6+
7+
You can define additional menu entries in the navigation menu without any link to content.
8+
9+
Edit the website configuration `config.toml` and add a `[[menu.shortcuts]]` entry for each link your want to add.
10+
11+
12+
Example from the current website, **note the `pre` param** which allows you to insert HTML code and used here to separate content's menu from this "static" menu
13+
14+
[[menu.shortcuts]]
15+
pre = "<h3>More</h3>"
16+
name = "<i class='fa fa-github'></i> Github repo"
17+
identifier = "ds"
18+
url = "https://github.com/vjeantet/hugo-theme-docdock"
19+
weight = 1
20+
21+
[[menu.shortcuts]]
22+
name = "<i class='fa fa-bookmark'></i> Hugo Documentation"
23+
identifier = "hugodoc"
24+
url = "https://gohugo.io/"
25+
weight = 2
26+
27+
28+
[{{%icon circle-arrow-right%}} Read more about hugo and menu here](https://gohugo.io/extras/menus/)

content/content-organisation/logo.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
+++
2+
title = "Logo placeholder"
3+
description = ""
4+
date = "2017-04-24T18:36:24+02:00"
5+
Weight=1
6+
+++
7+
8+
Create a `_header.md` page in content folder. Its content is what you get in the logo placeholder (top left of the screen).
9+
10+
{{%alert info%}}**Tip :** you can add a image, a combobox with links to other documentation....{{%/alert%}}
11+
12+
{{%alert info%}}**Tip 2 :** look at [ extra static menu]({{%relref "extramenu.md"%}}) if you want to add links to other website in this sidebar{{%/alert%}}

0 commit comments

Comments
 (0)