Skip to content
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: 2 additions & 0 deletions .dictionary
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ prebuilt
(S|s)ubdirector(ies|y)
(M|m)inify
whitespace
relref
href
6 changes: 4 additions & 2 deletions assets/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
const results = document.querySelector('#gdoc-search-results');
let showParent = {{ if .Site.Params.GeekdocSearchShowParent }}true{{ else }}false{{ end }}

input.addEventListener('focus', init);
input.addEventListener('keyup', search);
if (input) {
input.addEventListener('focus', init);
input.addEventListener('keyup', search);
}

function init() {
input.removeEventListener('focus', init); // init once
Expand Down
48 changes: 42 additions & 6 deletions exampleSite/content/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Documentation
description: 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.
geekdocNav: false
---

<!-- markdownlint-capture -->
Expand All @@ -16,11 +17,46 @@ description: Geekdoc is a simple Hugo theme for documentations. It is intentiona

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.

{{< button relref="usage/getting-started/" >}}Explore Documentation{{< /button >}}

## Features

- Clean and simple design
- Light and mobile-friendly
- Easy customization
- Zero initial configuration
- Handy shortcodes
- Dark mode
{{< columns >}}

### Clean and simple design

Stay focused on exploring the content and don't get overwhelmed by a complex design.

<--->

### Light and mobile-friendly

The theme is powered by less than 1 MB and looks impressive on mobile devices as well as on a regular Desktop.

<--->

### Easy customization

The look and feel can be easily customized by CSS custom properties (variables), features can be adjusted by Hugo parameters.

{{< /columns >}}

{{< columns >}}

### Zero initial configuration

Getting started in minutes. The theme is shipped with a default configuration and works out of the box.

<--->

### Handy shortcodes

We included some (hopefully) useful custom shortcodes so you don't have to and can focus on writing amazing docs.

<--->

### Dark mode

Powerful dark mode that detects your system preferences or can be controlled by a toggle switch.

{{< /columns >}}
4 changes: 0 additions & 4 deletions exampleSite/content/shortcodes/buttons.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,5 @@ Buttons are styled links that can lead to local page or external link.

## Example

<!-- spellchecker-disable -->

{{< button relref="/" >}}Get Home{{< /button >}}
{{< button href="https://github.com/thegeeklab/hugo-geekdoc" >}}Contribute{{< /button >}}

<!-- spellchecker-enable -->
8 changes: 8 additions & 0 deletions exampleSite/content/usage/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ geekdocToC = 3
# Set a description for the current page. This will be shown in toc-trees objects.
geekdocDescription =

# Set false to hide the whole left navigation sidebar. Beware that it will make
# navigation pretty hard without adding some kind of on-page navigation.
geekdocNav = true

# Show a breadcrumb navigation bar at the top of each docs page.
geekdocBreadcrumb = false

Expand Down Expand Up @@ -262,6 +266,10 @@ geekdocToC: 3
# Set a description for the current page. This will be shown in toc-trees objects.
geekdocDescription:

# Set false to hide the whole left navigation sidebar. Beware that it will make
# navigation pretty hard without adding some kind of on-page navigation.
geekdocNav: true

# Show a breadcrumb navigation bar at the top of each docs page.
geekdocBreadcrumb: false

Expand Down
7 changes: 5 additions & 2 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@
<body itemscope itemtype="https://schema.org/WebPage">
{{ partial "svg-icon-symbols" . }}

<div class="wrapper {{ if default false .Site.Params.geekdocDarkModeDim }}dark-mode-dim{{ end }}">
<div class="wrapper {{ if default false .Site.Params.GeekdocDarkModeDim }}dark-mode-dim{{ end }}">
<input type="checkbox" class="hidden" id="menu-control" />
{{ partial "site-header" (dict "Root" . "MenuEnabled" true) }}
{{ $navEnabled := default true .Page.Params.GeekdocNav }}
{{ partial "site-header" (dict "Root" . "MenuEnabled" $navEnabled) }}

<main class="container flex flex-even">
{{ if $navEnabled }}
<aside class="gdoc-nav">
{{ partial "menu" . }}
</aside>
{{ end }}

<div class="gdoc-page">
{{ template "main" . }}
Expand Down