Skip to content

Commit

Permalink
flex is now default the style for this hugo theme
Browse files Browse the repository at this point in the history
  • Loading branch information
vjeantet committed Jan 20, 2018
1 parent 5f4eab7 commit 14c8cf0
Show file tree
Hide file tree
Showing 51 changed files with 1,857 additions and 1,834 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Hugo docDock Theme

This repository contains a theme for [Hugo](https://gohugo.io/), based on great [Matcornic Learn theme](https://github.com/matcornic/hugo-theme-learn/).
This repository contains a theme for [Hugo](https://gohugo.io/), based on

* [Matcornic Learn theme](https://github.com/matcornic/hugo-theme-learn/).
* [facette.io](https://facette.io/)'s documentation style css (Facette is a great time series data visualization software)

Visit the [theme documentation](http://docdock.netlify.com/) to see what is going on. It is actually built with this theme.

Expand Down
37 changes: 28 additions & 9 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
@@ -1,48 +1,67 @@
baseURL = "/"

languageCode = "en-us"
DefaultContentLanguage = "en"

title = "Docdock"
title = "DocDock Documentation"
theme = "hugo-theme-docdock"
themesdir = "../.."
pygmentsCodeFences = true
pygmentsStyle = "monokailight"

defaultContentLanguage = "en"
defaultContentLanguageInSubdir= false
enableMissingTranslationPlaceholders = false


# [Languages]
# [Languages.en]
# title = "Documentation for Hugo docDock"
# weight = 1
# languageName = "English"
#
# [Languages.fr]
# title = "Documentation du thème docDock"
# weight = 2
# languageName = "Français"




[params]
editURL = "https://github.com/vjeantet/hugo-theme-docdock/edit/master/exampleSite/content/"
showVisitedLinks = true # default is false
themeStyle = "original" # "original" or "flex" # default "original"
themeStyle = "flex" # "original" or "flex" # default "flex"
themeVariant = "" # choose theme variant "green", "gold" , "gray", "blue" (default)
ordersectionsby = "weight" # ordersectionsby = "title"
disableHomeIcon = false # default is false
disableSearch = false # default is false
disableNavChevron = false # set true to hide next/prev chevron, default is false
highlightClientSide = false # set true to use highlight.pack.js instead of the default hugo chroma highlighter

menushortcutsnewtab = false # set true to open shortcuts links to a new tab/window

[outputs]
home = [ "HTML", "RSS", "JSON"]


[[menu.shortcuts]]
pre = "<h3>More</h3>"
name = "<i class='fa fa-github'></i> Github repo"
name = "<i class='fa fa-github'></i> <label>Github repo</label>"
identifier = "ds"
url = "https://github.com/vjeantet/hugo-theme-docdock"
weight = 10

[[menu.shortcuts]]
name = "<i class='fa fa-camera'></i> Showcases"
url = "/showcase"
name = "<i class='fa fa-cloud-download'></i> <label>Download</label>"
url = "https://github.com/vjeantet/hugo-theme-docdock/archive/master.zip"
weight = 11

[[menu.shortcuts]]
name = "<i class='fa fa-bookmark'></i> Hugo Documentation"
name = "<i class='fa fa-bookmark'></i> <label>Hugo Documentation</label>"
identifier = "hugodoc"
url = "https://gohugo.io/"
weight = 20

[[menu.shortcuts]]
name = "<i class='fa fa-bullhorn'></i> Credits"
name = "<i class='fa fa-bullhorn'></i> <label>Credits</label>"
url = "/credits"
weight = 30
11 changes: 0 additions & 11 deletions exampleSite/content/_footer.md

This file was deleted.

6 changes: 0 additions & 6 deletions exampleSite/content/_header.md

This file was deleted.

12 changes: 6 additions & 6 deletions exampleSite/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ date = "2017-04-24T18:36:24+02:00"
# Hugo docDock theme
[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.**

This theme is a partial porting of the [Learn theme of matcornic {{%icon fa-github%}}](https://github.com/matcornic/hugo-theme-learn).
This theme is a partial porting of the [Learn theme of matcornic {{%icon fa-github%}}](https://github.com/matcornic/hugo-theme-learn). and its default style "flex" comes from [facette.io](https://github.com/facette)'s documentation.

{{%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%}}

## Main features

* [Search]({{%relref "search/_index.md" %}})
* [Automatic Search]({{%relref "search/_index.md" %}})
* **Unlimited menu levels**
* [Generate RevealJS presentation]({{%relref "page-slide.md"%}}) from markdown (embededed or fullscreen page)
* Automatic next/prev buttons to navigate through menu entries
Expand All @@ -28,13 +28,13 @@ This theme is a partial porting of the [Learn theme of matcornic {{%icon fa-gith



Style "Original"
Style "Flex" (default)

![](https://raw.githubusercontent.com/vjeantet/hugo-theme-docdock/master/images/tn.png?width=33pc&classes=border,shadow)
![](style-flex.png?width=33pc&classes=border,shadow)

Style "Flex"
Style "Original"

![](style-flexfull.png?width=33pc&classes=border,shadow)
![](style-original.png?width=33pc&classes=border,shadow)

## Contribute to this documentation
Feel free to update this content, just click the **Edit this page** link displayed on top right of each page, and pullrequest it
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/create-page/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ lastmodifierdisplayname = "Valere JEANTET"
lastmodifieremail = "[email protected]"
tags = ["tag1","tag2"]
weight = 10
pre ="<i class='fa fa-edit'></i> "
pre ="<i class='fa fa-edit' ></i> "

+++

Expand Down
22 changes: 16 additions & 6 deletions exampleSite/content/credits.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,25 @@ description = "contributors and packages used by hugo-theme-docdock"
## github contributors
{{%ghcontributors "https://api.github.com/repos/vjeantet/hugo-theme-docdock/contributors?per_page=100" %}}

### Other contributors
### Other contribution
<div class="ghContributors">
<div>
<img src="https://avatars2.githubusercontent.com/u/394382?v=3" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label>@<a href="https://github.com/bep">bep</a></label>
<span class="contributions">supports and advices</span>
</div>

<div>
<img src="https://avatars2.githubusercontent.com/u/394382?v=3" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label>@<a href="https://github.com/bep">bep</a></label>
<span class="contributions">supports and advices</span>
</div>

<div>
<img src="https://avatars1.githubusercontent.com/u/959400?s=200&v=4" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label>@<a href="https://github.com/facette">facette.io</a></label>
<span class="contributions">Flex style based on facette documentation theme, <br>Thanks to @vbatoufflet</span>
</div>

</div>



## Packages and libraries
* [Bootstrap](http://getbootstrap.com) - front-end framework
* [mermaid](https://knsv.github.io/mermaid) - generation of diagram and flowchart from text in a similar manner as markdown
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/getting-start/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = ""
weight = 1
+++

{{% alert theme="warning" %}}HUGO **v0.30** minimum required to use this theme{{%/alert%}}
{{% alert theme="warning" %}}HUGO **v0.32** minimum required to use this theme{{%/alert%}}

The following steps are here to help you initialize your new website. If you don’t know Hugo at all, we strongly suggest you to train by following this [great documentation for beginners](https://gohugo.io/overview/quickstart/).
<!--more-->
Expand Down
Binary file modified exampleSite/static/style-flex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed exampleSite/static/style-flexfull.png
Binary file not shown.
Binary file added exampleSite/static/style-original.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions i18n/en.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[create-header-md]
other = "Create a _header.md to customize this"
other = "Create a content/_header.md to customize this"

[create-footer-md]
other = "Create a content/_footer.md file to customize the footer content"
Expand Down Expand Up @@ -35,7 +35,10 @@ other = "Woops. Looks like this page doesn't exist."
other = "Go to homepage"

[Edit-this-page]
other = "Edit page"
other = "Improve this page"

[Expand-title]
other = "Expand me..."
other = "Expand me..."

[last-update-on]
other = "Last update on"
5 changes: 4 additions & 1 deletion i18n/fr.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@ other = "Vers la page d'accueil"
other = "Modifier"

[Expand-title]
other = "Déroulez-moi..."
other = "Déroulez-moi..."

[last-update-on]
other = "Dernière mise à jour le "
Binary file modified images/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/tn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions layouts/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
{{if .Site.Params.themeStyle}}
{{ partial (printf "%s/head.html" .Site.Params.themeStyle) . }}
{{else}}
{{ partial "original/head.html" . }}
{{ partial "flex/head.html" . }}
{{end}}
</head>
<body data-url="{{ .RelPermalink }}">
{{if .Site.Params.themeStyle}}
{{ partial (printf "%s/body-beforecontent.html" .Site.Params.themeStyle) . }}
{{else}}
{{ partial "original/body-beforecontent.html" . }}
{{ partial "flex/body-beforecontent.html" . }}
{{end}}

<h1>{{T "title-404"}}</h1>
Expand All @@ -26,7 +26,7 @@ <h1>{{T "title-404"}}</h1>
{{if .Site.Params.themeStyle}}
{{ partial (printf "%s/body-aftercontent.html" .Site.Params.themeStyle) . }}
{{else}}
{{ partial "original/body-aftercontent.html" . }}
{{ partial "flex/body-aftercontent.html" . }}
{{ end }}

{{ block "footer" . }}
Expand Down
6 changes: 3 additions & 3 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
{{if .Site.Params.themeStyle}}
{{ partial (printf "%s/head.html" .Site.Params.themeStyle) . }}
{{else}}
{{ partial "original/head.html" . }}
{{ partial "flex/head.html" . }}
{{end}}
</head>
<body data-url="{{ .RelPermalink }}">
{{if .Site.Params.themeStyle}}
{{ partial (printf "%s/body-beforecontent.html" .Site.Params.themeStyle) . }}
{{else}}
{{ partial "original/body-beforecontent.html" . }}
{{ partial "flex/body-beforecontent.html" . }}
{{end}}

{{ block "main" . }}
Expand All @@ -21,7 +21,7 @@
{{if .Site.Params.themeStyle}}
{{ partial (printf "%s/body-aftercontent.html" .Site.Params.themeStyle) . }}
{{else}}
{{ partial "original/body-aftercontent.html" . }}
{{ partial "flex/body-aftercontent.html" . }}
{{ end }}

{{ block "footer" . }}
Expand Down
73 changes: 35 additions & 38 deletions layouts/partials/flex/body-aftercontent.html
Original file line number Diff line number Diff line change
@@ -1,36 +1,40 @@
</article>
<aside class="footline">
{{if .Params.tags }}
<div class="tags">
{{ range $index, $tag := .Params.tags }}
<a class="label label-default" href="{{$.Site.BaseURL}}tags/{{ $tag | urlize }}">{{ $tag }}</a>
{{ end }}
</div>
{{end}}

{{with .Params.LastModifierDisplayName}}
<div class="author">
<i class='fa fa-user'></i> <a href="mailto:{{ $.Params.LastModifierEmail }}">{{ . }}</a>
</div>
{{end}}

{{ if not .Date.IsZero }}
<div class="date">
<i class='fa fa-calendar'></i> {{ .Date.Format "02/01/2006" }}
</div>
{{end}}

<div class="github-link">
<a href="{{ .Site.Params.editURL }}{{ replace .File.Dir "\\" "/" }}{{ .File.LogicalName }}" target="blank"><i class="fa fa-code-fork"></i>
{{T "Edit-this-page"}}</a>
</div>
</aside>
<aside class="chevrons">
<div class="chevrons">
{{ partial "next-prev-page.html" . }}
</aside>
</div>

</section>
</section>
</article>

<footer>

<div class="footline">
{{if .Params.tags }}
<div class="tags">
{{ range $index, $tag := .Params.tags }}
<a class="label label-default" href="{{$.Site.BaseURL}}tags/{{ $tag | urlize }}">{{ $tag }}</a>
{{ end }}
</div>
{{end}}

{{with .Params.LastModifierDisplayName}}
<div class="author">
<i class='fa fa-user'></i> <a href="mailto:{{ $.Params.LastModifierEmail }}">{{ . }}</a>
</div>
{{end}}

{{ if not .Date.IsZero }}
<div class="date">
<i class='fa fa-calendar'></i> {{T "last-update-on"}} {{ .Date.Format "02/01/2006" }}
</div>
{{end}}

<div class="github-link">
<a href="{{ .Site.Params.editURL }}{{ replace .File.Dir "\\" "/" }}{{ .File.LogicalName }}" target="blank"><i class="fa fa-code-fork"></i>
{{T "Edit-this-page"}}</a>
</div>
</div>


<div>
{{ $footer := print "_footer." .Lang }}
{{ range where .Site.Pages "Source.BaseFileName" $footer }}
Expand All @@ -39,14 +43,7 @@
{{ if .Site.GetPage "page" "_footer.md" }}
{{(.Site.GetPage "page" "_footer.md").Content}}
{{else}}
<strong>{{ T "create-footer-md" }}</strong>
<br>
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.
{{ T "create-footer-md" }}
{{end}}
{{end}}

Expand Down
Loading

0 comments on commit 14c8cf0

Please sign in to comment.