Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump version of geekdoc #21

Merged
merged 3 commits into from
Dec 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
THEME_VERSION ?= v0.2.2
THEME_VERSION ?= v0.7.3

.PHONY: theme-clean
theme-clean:
Expand Down
2 changes: 0 additions & 2 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,3 @@ params:
# (Optional, default none) Add a link to your Privacy Policy page to the site footer.
# It can be either a remote url or a local file path relative to your content directory.
geekdocPrivacyPolicy: https://owncloud.org/privacy-policy/

geekdocAnchorLeft: true
8 changes: 8 additions & 0 deletions themes/hugo-geekdoc/.jsbeautifyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"indent_size": 4,
"indent_char": " ",
"preserve_newlines": false,
"unformatted" : ["svg"],
"content_unformatted": ["pre"],
"extra_liners": ["head", "body", "html", "main", "header", "footer", "section"]
}
8 changes: 8 additions & 0 deletions themes/hugo-geekdoc/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.html
.drone.yml
search*.js
_normalize.css
.lighthouseci/
themes/
static/js/
src/favicon/
10 changes: 10 additions & 0 deletions themes/hugo-geekdoc/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"overrides": [
{
"files": ["*.html"],
"options": {
"parser": "go-template"
}
}
]
}
4 changes: 2 additions & 2 deletions themes/hugo-geekdoc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
* ENHANCEMENT
* [#6](https://github.com/xoxys/hugo-geekdoc/pull/6) improve code block formatting
- BUGFIX
- fix flexsearch loading
43 changes: 34 additions & 9 deletions themes/hugo-geekdoc/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,43 @@
# Hugo Geekdoc Theme
# Geekdoc

[![Build Status](https://img.shields.io/drone/build/xoxys/hugo-geekdoc?logo=drone)](https://cloud.drone.io/xoxys/hugo-geekdoc)
[![Build Status](https://img.shields.io/drone/build/thegeeklab/hugo-geekdoc?logo=drone)](https://cloud.drone.io/thegeeklab/hugo-geekdoc)
[![Hugo Version](https://img.shields.io/badge/hugo-0.65-blue.svg)](https://gohugo.io)
[![GitHub release](https://img.shields.io/github/v/release/xoxys/hugo-geekdoc)](https://github.com/xoxys/hugo-geekdoc/releases/latest)
[![License: MIT](https://img.shields.io/github/license/xoxys/hugo-geekdoc)](LICENSE)
[![GitHub release](https://img.shields.io/github/v/release/thegeeklab/hugo-geekdoc)](https://github.com/thegeeklab/hugo-geekdoc/releases/latest)
[![GitHub contributors](https://img.shields.io/github/contributors/thegeeklab/hugo-geekdoc)](https://github.com/thegeeklab/hugo-geekdoc/graphs/contributors)
[![License: MIT](https://img.shields.io/github/license/thegeeklab/hugo-geekdoc)](https://github.com/thegeeklab/hugo-geekdoc/blob/master/LICENSE)

Geekdoc is a simple Hugo theme for documentations. This work is inspired and partially based on the [hugo-book](https://github.com/alex-shpak/hugo-book) theme. You can find a demo and the full documentation at [https://geekdocs.de](https://geekdocs.de).
Geekdoc is a simple Hugo theme for documentations. It is intentionally designed as a fast and lean theme and may not fit the requirements of complex projects. If a more feature-complete theme is required there are a lot of got alternatives out there. You can find a demo and the full documentation at [https://geekdocs.de](https://geekdocs.de).

![Screenshot Desktop](local_media/desktop.png)
![Desktop and mobile preview](https://github.com/thegeeklab/hugo-geekdoc/blob/master/images/readme.png)

## Build and release process

This theme is subject to a CI driven build and release process common for software development. During the release build, all necessary assets are automatically built by [gulp](https://gulpjs.com/) and bundled in a release tarball. You can download the latest release from the GitHub [release page](https://github.com/thegeeklab/hugo-geekdoc/releases).

Due to the fact that `gulp` is used as pre-processor the theme cannot be used from the master branch by default. If you want to use the theme from a cloned branch instead of a release tarball you'll need to install `gulp` locally and run the default pipeline once to create all required assets.

```Shell
# install required packages from package.json
npm install

# run gulp pipeline to build required assets
gulp default
```

See the [Getting Started Guide](https://geekdocs.de/usage/getting_started/) for details about the different setup options.

## Contributors

Special thanks goes to all [contributors](https://github.com/thegeeklab/hugo-geekdoc/graphs/contributors).

Geekdoc is inspired and partially based on the [hugo-book](https://github.com/alex-shpak/hugo-book) theme, thanks [Alex Shpak](https://github.com/alex-shpak/) for your work.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
This project is licensed under the MIT License - see the [LICENSE](https://github.com/thegeeklab/hugo-geekdoc/blob/master/LICENSE) file for details.

## Maintainers and Contributors
The used SVG icons and generated icon fonts are licensed under the license of the respective icon pack:

[Robert Kaussow](https://github.com/xoxys)
- Font Awesome: [CC BY 4.0 License](https://github.com/FortAwesome/Font-Awesome#license)
- IcoMoon Free Pack: [GPL/CC BY 4.0](https://icomoon.io/#icons-icomoon)
- Material Icons: [Apache License 2.0](https://github.com/google/material-design-icons/blob/master/LICENSE)
2 changes: 1 addition & 1 deletion themes/hugo-geekdoc/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.2.2
v0.7.3
7 changes: 7 additions & 0 deletions themes/hugo-geekdoc/assets/js/clipboard.min.js

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

32 changes: 32 additions & 0 deletions themes/hugo-geekdoc/assets/js/mermaid.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions themes/hugo-geekdoc/assets/js/mermaid.min.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion themes/hugo-geekdoc/assets/js/search-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
indexCfg.doc = {
id: 'id',
field: ['title', 'content'],
store: ['title', 'href'],
store: ['title', 'href', 'parent'],
};

const index = FlexSearch.create(indexCfg);
Expand All @@ -21,6 +21,7 @@
'id': {{ $index }},
'href': '{{ $page.RelPermalink }}',
'title': {{ (partial "title" $page) | jsonify }},
'parent': {{ with $page.Parent }}{{ (partial "title" .) | jsonify }}{{ else }}''{{ end }},
'content': {{ $page.Plain | jsonify }}
});
{{- end -}}
Expand Down
7 changes: 6 additions & 1 deletion themes/hugo-geekdoc/assets/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
input.removeEventListener('focus', init); // init once
input.required = true;

loadScript('{{ "js/flexsearch.min.js" | relURL }}');
loadScript('{{ index .Site.Data.assets "js/flexsearch.min.js" | relURL }}');
loadScript('{{ $searchData.RelPermalink }}', function() {
input.required = false;
search();
Expand Down Expand Up @@ -46,7 +46,12 @@
a = li.appendChild(document.createElement('a'));

a.href = page.href;

{{ if .Site.Params.GeekdocSearchShowParent }}
a.textContent = page.parent ? page.parent + ' / ' + page.title : page.title;
{{ else }}
a.textContent = page.title;
{{ end }}

results.appendChild(li);
results.classList.add("DUMMY");
Expand Down
Loading