Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.

Commit

Permalink
feat: update for Doks v0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
h-enk committed Jul 9, 2022
1 parent 48499b6 commit 0df89d5
Show file tree
Hide file tree
Showing 17 changed files with 1,663 additions and 1,505 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</a>
</p>

![Doks — Modern Documentation Theme](https://raw.githubusercontent.com/h-enk/doks/master/images/tn.png)
![Doks — Modern Documentation Theme](https://raw.githubusercontent.com/h-enk/doks/master/images/doks.png)

## Demo

Expand All @@ -43,7 +43,7 @@ Nine main reasons why you should use Doks:

1. __Security aware__. Get A+ scores on [Mozilla Observatory](https://observatory.mozilla.org/analyze/doks.netlify.app) out of the box. Easily change the default Security Headers to suit your needs.

2. __Fast by default__. Get 100 scores on [Google Lighthouse](https://googlechrome.github.io/lighthouse/viewer/?gist=7731347bb8ce999eff7428a8e763b637) by default. Doks removes unused css, prefetches links, and lazy loads images.
2. __Fast by default__. Get 100 scores on [Google Lighthouse](https://googlechrome.github.io/lighthouse/viewer/?gist=59aafe464a68f8bc30b8e9a636d5b053) by default. Doks removes unused css, prefetches links, and lazy loads images.

3. __SEO-ready__. Use sensible defaults for structured data, open graph, and Twitter cards. Or easily change the SEO settings to your liking.

Expand Down
Binary file added assets/images/default-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 13 additions & 50 deletions config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,53 +67,16 @@ rel = "sitemap"
[minify.tdewolff.html]
keepWhitespace = false

[module]
[module.hugoVersion]
extended = true
min = "0.80.0"
max = ""
[[module.mounts]]
source = "node_modules/@hyas/doks/archetypes"
target = "archetypes"
[[module.mounts]]
source = "node_modules/@hyas/doks/assets"
target = "assets"
# [[module.mounts]]
# source = "node_modules/@hyas/doks/content"
# target = "content"
[[module.mounts]]
source = "node_modules/@hyas/doks/data"
target = "data"
[[module.mounts]]
source = "node_modules/@hyas/doks/layouts"
target = "layouts"
[[module.mounts]]
source = "node_modules/@hyas/doks/static"
target = "static"
[[module.mounts]]
source = "node_modules/flexsearch"
target = "assets/js/vendor/flexsearch"
[[module.mounts]]
source = "node_modules/katex"
target = "assets/js/vendor/katex"
[[module.mounts]]
source = "node_modules/mermaid"
target = "assets/js/vendor/mermaid"
[[module.mounts]]
source = "assets"
target = "assets"
[[module.mounts]]
source = "static"
target = "static"
# [[module.mounts]]
# source = "content"
# target = "content"
[[module.mounts]]
source = "layouts"
target = "layouts"
[[module.mounts]]
source = "archetypes"
target = "archetypes"
[[module.mounts]]
source = "data"
target = "data"
[related]
threshold = 80
includeNewer = true
toLower = false
[[related.indices]]
name = "categories"
weight = 100
[[related.indices]]
name = "tags"
weight = 80
[[related.indices]]
name = "date"
weight = 10
3 changes: 3 additions & 0 deletions config/_default/languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@
weight = 10
[en.params]
languageISO = "EN"
languageTag = "en-US"

[de]
languageName = "German"
contentDir = "content/de"
weight = 15
[de.params]
languageISO = "DE"
languageTag = "de-DE"

[nl]
languageName = "Nederlands"
contentDir = "content/nl"
weight = 20
[nl.params]
languageISO = "NL"
languageTag = "nl-NL"
titleAddition = "Modern documentatie-thema"
description = "Doks is een Hugo-thema waarmee je moderne documentatie-websites kunt bouwen die veilig, snel en klaar voor SEO zijn — standaard."
titleHome = "Doks thema"
Expand Down
68 changes: 68 additions & 0 deletions config/_default/module.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[hugoVersion]
extended = true
min = "0.80.0"
max = ""

[[mounts]]
source = "node_modules/@hyas/doks/archetypes"
target = "archetypes"

[[mounts]]
source = "node_modules/@hyas/doks/assets"
target = "assets"

# [[mounts]]
# source = "node_modules/@hyas/doks/content"
# target = "content"

[[mounts]]
source = "node_modules/@hyas/doks/data"
target = "data"

[[mounts]]
source = "node_modules/@hyas/doks/layouts"
target = "layouts"

[[mounts]]
source = "node_modules/@hyas/doks/static"
target = "static"

[[mounts]]
source = "node_modules/flexsearch"
target = "assets/js/vendor/flexsearch"

[[mounts]]
source = "node_modules/katex"
target = "assets/js/vendor/katex"

[[mounts]]
source = "node_modules/mermaid"
target = "assets/js/vendor/mermaid"

[[mounts]]
source = "assets"
target = "assets"

[[mounts]]
source = "static"
target = "static"

# [[mounts]]
# source = "content"
# target = "content"

[[mounts]]
source = "layouts"
target = "layouts"

[[mounts]]
source = "archetypes"
target = "archetypes"

[[mounts]]
source = "data"
target = "data"

[[mounts]]
source = "node_modules/@hyas/images/layouts"
target = "layouts"
21 changes: 20 additions & 1 deletion config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,25 @@ siteLinksSearchBox = false
## Chrome Browser
themeColor = "#fff"

# Images
# Images - Temporarily left in place for backward compatibility
quality = 85
bgColor = "#fff"
landscapePhotoWidths = [900, 800, 700, 600, 500]
portraitPhotoWidths = [800, 700, 600, 500]
lqipWidth = "20x"
smallLimit = "300"

# Images
imageResponsive = true
imageConvertTo = "webp"
imageImageSizes = ["480","720","1080","1280","1600","2048"]
singleSize = false
imageAddClass = "img-fluid lazyload blur-up"

### Image template
defaultImage = "default-image.png" # put in `./assets/images/`
fillImage = "1270x740 Center" # normalize image size

# Footer
footer = "Powered by <a class=\"text-muted\" href=\"https://www.netlify.com/\">Netlify</a>, <a class=\"text-muted\" href=\"https://gohugo.io/\">Hugo</a>, and <a class=\"text-muted\" href=\"https://getdoks.org/\">Doks</a>"

Expand All @@ -75,11 +86,16 @@ docsRepoSubPath = ""
editPage = false
lastMod = false

[sections]
sectionNav = ["docs", "guides"]

[options]
lazySizes = true
clipBoard = true
instantPage = true
flexSearch = true
searchSectionsShow = []
searchSectionsIndex = []
darkMode = true
bootStrapJs = true
breadCrumb = false
Expand All @@ -88,6 +104,9 @@ lastMod = false
multilingualMode = false
docsVersioning = false
fullWidth = false
navbarSticky = true
toTopButton = false
scrollSpy = false # experimental; needs Bootstrap >= 5.2.0-beta1

[menu]
[menu.section]
Expand Down
5 changes: 5 additions & 0 deletions i18n/de.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- id: get-started
translation: "Loslegen"

- id: on-this-page
translation: "Auf dieser Seite"
2 changes: 0 additions & 2 deletions i18n/en.toml

This file was deleted.

17 changes: 17 additions & 0 deletions i18n/en.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
- id: get-started
translation: "Get Started"

- id: on-this-page
translation: "On this page"

- id: search-text
translation: "Search docs..."

- id: 404-title
translation: "Page not found :("

- id: 404-text
translation: "The page you are looking for doesn't exist or has been moved."

- id: browse
translation: "Browse"
2 changes: 0 additions & 2 deletions i18n/nl.toml

This file was deleted.

17 changes: 17 additions & 0 deletions i18n/nl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
- id: get-started
translation: "Aan de slag"

- id: on-this-page
translation: "Op deze pagina"

- id: search-text
translation: "Zoeken..."

- id: 404-title
translation: "Pagina niet gevonden :("

- id: 404-text
translation: "De gezochte pagina bestaat niet of deze is verplaatst."

- id: browse
translation: "Browse"
Binary file added images/doks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h2 class="h4">Security aware</h2>
</div>
<div class="col-lg-5">
<h2 class="h4">Fast by default ⚡️</h2>
<p>Get 100 scores on <a href="https://googlechrome.github.io/lighthouse/viewer/?gist=7731347bb8ce999eff7428a8e763b637">Google Lighthouse</a> by default. Doks removes unused css, prefetches links, and lazy loads images.</p>
<p>Get 100 scores on <a href="https://googlechrome.github.io/lighthouse/viewer/?gist=59aafe464a68f8bc30b8e9a636d5b053">Google Lighthouse</a> by default. Doks removes unused css, prefetches links, and lazy loads images.</p>
</div>
<div class="col-lg-5">
<h2 class="h4">SEO-ready</h2>
Expand Down
1 change: 1 addition & 0 deletions layouts/partials/head/custom-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- Custom head -->
4 changes: 2 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
functions = "functions"

[build.environment]
NODE_VERSION = "16.15.0"
NPM_VERSION = "8.5.5"
NODE_VERSION = "16.16.0"
NPM_VERSION = "8.11.0"

[context.production]
command = "npm run build"
Expand Down
Loading

0 comments on commit 0df89d5

Please sign in to comment.