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 0.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
h-enk committed Oct 5, 2021
1 parent b735d08 commit 3782cf5
Show file tree
Hide file tree
Showing 35 changed files with 2,100 additions and 4,486 deletions.
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
</h1>

<h3 align="center">
Doks child theme
Doks Child Theme
</h3>

<p align="center">
Doks is a Hugo theme helping you build modern documentation websites that are secure, fast, and SEO-ready — by default.
Doks is a Hugo theme for building secure, fast, and SEO-ready documentation websites, which you can easily update and customize.
</p>

<p align="center">
Expand All @@ -39,7 +39,7 @@

## Why Doks?

Nine reasons why you should use Doks:
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.

Expand All @@ -59,6 +59,14 @@ Nine reasons why you should use Doks:

9. __Dark mode__. Switch to a low-light UI with the click of a button. Change colors with variables to match your branding.

### Other features

- __Multilingual and i18n__ support
- __Versioning__ documentation support
- __KaTeX__ math typesetting
- __Mermaid__ diagrams and visualization
- __highlight.js__ syntax highlighting

## Requirements

Doks uses npm to centralize dependency management, making it [easy to update](https://getdoks.org/docs/help/how-to-update/) resources, build tooling, plugins, and build scripts:
Expand Down Expand Up @@ -117,3 +125,15 @@ Doks comes with [commands](https://getdoks.org/docs/prologue/commands/) for comm
- [Netlify Community](https://community.netlify.com/)
- [Hugo Forums](https://discourse.gohugo.io/)
- [Doks Discussions](https://github.com/h-enk/doks/discussions)

## Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

[![OC sponsor 0](https://opencollective.com/doks/sponsor/0/avatar.svg)](https://opencollective.com/doks/sponsor/0/website)

## Backers

Support this project by becoming a backer. Your avatar will show up here.

[![Backers](https://opencollective.com/doks/backers.svg)](https://opencollective.com/doks)
7 changes: 7 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Reporting Security Issues

The Doks team and community take security issues in Doks seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.

To report a security issue, email [security@getdoks.org](mailto:security@getdoks.org) and include the word "SECURITY" in the subject line.

We'll endeavor to respond quickly, and will keep you updated throughout the process.
32 changes: 9 additions & 23 deletions config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ languageCode = "en-US"
paginate = 7
rssLimit = 10

# Multilingual
defaultContentLanguage = "en"
disableLanguages = ["de", "nl"]
# defaultContentLanguageInSubdir = true

# add redirects/headers
[outputs]
home = ["HTML", "RSS", "REDIRECTS", "HEADERS"]
Expand Down Expand Up @@ -47,29 +52,6 @@ rel = "sitemap"
dir = ":cacheDir/:project"
maxAge = "10s"

[markup]
[markup.goldmark]
[markup.goldmark.extensions]
linkify = false
[markup.goldmark.parser]
autoHeadingID = true
autoHeadingIDType = "github"
[markup.goldmark.parser.attribute]
block = true
title = true
[markup.goldmark.renderer]
unsafe = true
[markup.highlight]
codeFences = false
guessSyntax = false
hl_Lines = ""
lineNoStart = 1
lineNos = false
lineNumbersInTable = true
noClasses = false
style = "dracula"
tabWidth = 4

[sitemap]
changefreq = "weekly"
filename = "sitemap.xml"
Expand All @@ -80,6 +62,7 @@ rel = "sitemap"

[permalinks]
blog = "/blog/:title/"
# docs = "/docs/1.0/:sections[1:]/:title/"

[minify.tdewolff.html]
keepWhitespace = false
Expand Down Expand Up @@ -113,6 +96,9 @@ rel = "sitemap"
[[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"
Expand Down
25 changes: 25 additions & 0 deletions config/_default/languages.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[en]
languageName = "English"
contentDir = "content/en"
weight = 10
[en.params]
languageISO = "EN"

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

[nl]
languageName = "Nederlands"
contentDir = "content/nl"
weight = 20
[nl.params]
languageISO = "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"
footer = "Mogelijk gemaakt door <a href=\"https://www.netlify.com/\">Netlify</a>, <a href=\"https://gohugo.io/\">Hugo</a>, en <a href=\"https://getdoks.org/\">Doks</a>"
alertText = "Introductie van het Doks-kinderthema, verschillende DX + UX-updates en meer! <a class=\"alert-link stretched-link\" href=\"https://getdoks.org/blog/doks-v0.2/\">Bekijk Doks v0.2</a>"
29 changes: 29 additions & 0 deletions config/_default/markup.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
defaultMarkdownHandler = "goldmark"

[goldmark]
[goldmark.extensions]
linkify = false
[goldmark.parser]
autoHeadingID = true
autoHeadingIDType = "github"
[goldmark.parser.attribute]
block = true
title = true
[goldmark.renderer]
unsafe = true

[highlight]
codeFences = false
guessSyntax = false
hl_Lines = ""
lineNoStart = 1
lineNos = false
lineNumbersInTable = true
noClasses = false
style = "dracula"
tabWidth = 4

[tableOfContents]
endLevel = 3
ordered = false
startLevel = 2
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
[[main]]
name = "Docs"
url = "/docs/prologue/introduction/"
# url = "/docs/1.0/prologue/introduction/"
weight = 10

[[main]]
Expand Down
11 changes: 8 additions & 3 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
title = "Doks"
titleSeparator = "-"
titleAddition = "Modern Documentation Theme"
description = "Doks is a Hugo theme helping you build modern documentation websites that are secure, fast, and SEO-ready — by default."
description = "Doks is a Hugo theme for building secure, fast, and SEO-ready documentation websites, which you can easily update and customize."

## Documentation
# docsVersion = "0.3"

## Open Graph
images = ["doks.png"]
Expand Down Expand Up @@ -48,6 +51,7 @@ bgColor = "#fff"
landscapePhotoWidths = [900, 800, 700, 600, 500]
portraitPhotoWidths = [800, 700, 600, 500]
lqipWidth = "20x"
smallLimit = "300"

# Footer
footer = "Powered by <a href=\"https://www.netlify.com/\">Netlify</a>, <a href=\"https://gohugo.io/\">Hugo</a>, and <a href=\"https://getdoks.org/\">Doks</a>"
Expand All @@ -63,6 +67,7 @@ alertText = "Introducing the Doks child theme, several DX + UX updates, and more

# Edit Page
docsRepo = "https://github.com/h-enk/doks"
docsRepoBranch = "master"
editPage = false

[options]
Expand All @@ -76,5 +81,5 @@ editPage = false
highLight = true
kaTex = false
collapsibleSidebar = true
multilingualMode = false # Not yet functional
docsVersioning = false # Not yet functional
multilingualMode = false
docsVersioning = false
9 changes: 0 additions & 9 deletions content/_index.md

This file was deleted.

9 changes: 9 additions & 0 deletions content/en/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title : "Modern Documentation Theme"
description: "Doks is a Hugo theme for building secure, fast, and SEO-ready documentation websites, which you can easily update and customize."
lead: "Doks is a Hugo theme for building secure, fast, and SEO-ready documentation websites, which you can easily update and customize."
date: 2020-10-06T08:47:36+00:00
lastmod: 2020-10-06T08:47:36+00:00
draft: false
images: []
---
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Introduction"
description: "Doks is a Hugo theme helping you build modern documentation websites that are secure, fast, and SEO-ready — by default."
lead: "Doks is a Hugo theme helping you build modern documentation websites that are secure, fast, and SEO-ready — by default."
description: "Doks is a Hugo theme for building secure, fast, and SEO-ready documentation websites, which you can easily update and customize."
lead: "Doks is a Hugo theme for building secure, fast, and SEO-ready documentation websites, which you can easily update and customize."
date: 2020-10-06T08:48:57+00:00
lastmod: 2020-10-06T08:48:57+00:00
draft: false
Expand Down
File renamed without changes.
11 changes: 11 additions & 0 deletions content/en/versions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Versions"
description: ""
lead: "An appendix of hosted documentation for nearly every release of Doks, from v0 through v3."
date: 2021-09-24T08:50:23+02:00
lastmod: 2021-09-24T08:50:23+02:00
draft: true
images: []
layout: versions
url: "/docs/versions/"
---
60 changes: 60 additions & 0 deletions data/docs-versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# - group: v1.x
# baseurl: "https://getbootstrap.com"
# description: "Every minor and patch release from v1 is listed below."
# versions:
# - v: "1.0.0"
# - v: "1.1.0"
# - v: "1.1.1"
# - v: "1.2.0"
# - v: "1.3.0"
# - v: "1.4.0"
#
# - group: v2.x
# baseurl: "https://getbootstrap.com"
# description: "Every minor and patch release from v2 is listed below."
# versions:
# - v: "2.0.0"
# - v: "2.0.1"
# - v: "2.0.2"
# - v: "2.0.3"
# - v: "2.0.4"
# - v: "2.1.0"
# - v: "2.1.1"
# - v: "2.2.0"
# - v: "2.2.1"
# - v: "2.2.2"
# - v: "2.3.0"
# - v: "2.3.1"
# - v: "2.3.2"
#
# - group: v3.x
# baseurl: "https://getbootstrap.com/docs"
# description: "Every minor and patch release from v3 is listed below. Last update was v3.4.1."
# versions:
# - v: "3.3"
# - v: "3.4"
#
# - group: v4.x
# baseurl: "https://getbootstrap.com/docs"
# description: "Our previous major release with its minor releases. Last update was v4.6.0."
# versions:
# - v: "4.0"
# - v: "4.1"
# - v: "4.2"
# - v: "4.3"
# - v: "4.4"
# - v: "4.5"
# - v: "4.6"

- group: v0.x
baseurl: "/docs"
description: "Current major release. Last update was v0.2.0."
versions:
- v: "0.1"
- v: "0.2"

- group: v1.x
baseurl: "/docs"
description: "Every minor and patch release from v1 is listed below. Last update was v1.0.0."
versions:
- v: "1.0"
2 changes: 2 additions & 0 deletions i18n/en.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[get-started]
other = "Get Started"
2 changes: 2 additions & 0 deletions i18n/nl.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[get-started]
other = "Aan de slag"
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.
4 changes: 2 additions & 2 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ <h1 class="mt-0">{{ .Title }}</h1>
</div>
<div class="col-lg-9 col-xl-8 text-center">
<p class="lead">{{ .Params.lead | safeHTML }}</p>
<a class="btn btn-primary btn-lg px-4 mb-2" href="{{ "docs/prologue/introduction/" | relURL }}" role="button">Get started</a>
<p class="meta">Open-source MIT Licensed. <a href="https://github.com/h-enk/doks">GitHub v{{ $data := getJSON "https://raw.githubusercontent.com/h-enk/doks/master/package.json" }}{{ $data.version }}</a></p>
<a class="btn btn-primary btn-lg px-4 mb-2" href="/docs/{{ if .Site.Params.options.docsVersioning }}{{ .Site.Params.docsVersion }}/{{ end }}prologue/introduction/" role="button">Get Started</a>
<p class="meta">Open-source MIT Licensed. <a href="https://github.com/h-enk/doks">GitHub v{{ $data := getJSON "/package.json" }}{{ $data.version }}</a></p>
</div>
</div>
</section>
Expand Down
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.3.0"
NPM_VERSION = "7.16.0"
NODE_VERSION = "16.9.1"
NPM_VERSION = "7.21.1"

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

0 comments on commit 3782cf5

Please sign in to comment.