feat: add doks as a node module

This commit is contained in:
Henk Verlinde 2021-03-18 15:50:09 +01:00
commit cfed05efaf
55 changed files with 26751 additions and 0 deletions

11
.editorconfig Normal file
View File

@ -0,0 +1,11 @@
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

4
.eslintignore Normal file
View File

@ -0,0 +1,4 @@
assets/js/index.js
assets/js/katex.js
assets/js/vendor
node_modules

31
.eslintrc.json Normal file
View File

@ -0,0 +1,31 @@
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"no-console": 0,
"quotes": ["error", "single"],
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "ignore"
}
]
}
}

25
.github/ISSUE_TEMPLATE/bug-report---.md vendored Normal file
View File

@ -0,0 +1,25 @@
---
name: "Bug report \U0001F41E"
about: Create a report to help us improve
---
## Description
Describe the issue that you're seeing.
### Steps to reproduce
Clear steps describing how to reproduce the issue. Please please please link to a demo project if possible, this makes your issue _much_ easier to diagnose (seriously).
### Expected result
What should happen?
### Actual result
What happened.
### Environment
Paste the information here as shown by `npm run check`

4
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,4 @@
contact_links:
- name: Question 🙋
url: https://github.com/h-enk/doks/discussions/categories/q-a
about: Ask your question in Doks Discussions

View File

@ -0,0 +1,17 @@
---
name: "Feature request \U0001F680"
about: Suggest an idea for Doks
---
## Summary
Brief explanation of the feature.
### Basic example
Include a basic example or links here.
### Motivation
Why are we doing this? What use cases does it support? What is the expected outcome?

11
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"

62
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@ -0,0 +1,62 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"
on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 11 * * 5'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['javascript']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

48
.github/workflows/node.js-ci.yml vendored Normal file
View File

@ -0,0 +1,48 @@
# Test and build your Hyas project
# For more information see: https://henkverlinde.com/continuous-integration-workflow-for-your-hyas-project/
name: Hyas CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [14.x, 15.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Check install Hugo
run: hugo version
- name: Install dependencies
run: npm ci
- name: Check for linting errors
run: npm test
- name: Delete temporary directories
run: npm run clean
- name: Build production website
run: npm run build

6
.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
functions
node_modules
public
resources
# Local Netlify folder
.netlify

10
.markdownlint.json Normal file
View File

@ -0,0 +1,10 @@
{
"comment": "Hyas rules",
"default": true,
"line_length": false,
"no-inline-html": false,
"no-trailing-punctuation": false,
"no-duplicate-heading": false,
"no-bare-urls": false
}

3
.markdownlintignore Normal file
View File

@ -0,0 +1,3 @@
node_modules
CHANGELOG.md
README.md

1
.npmrc Normal file
View File

@ -0,0 +1 @@
hugo_bin_build_tags = "extended"

3
.stylelintignore Normal file
View File

@ -0,0 +1,3 @@
assets/scss/components/_syntax.scss
assets/scss/vendor
node_modules

34
.stylelintrc.json Normal file
View File

@ -0,0 +1,34 @@
{
"extends": "stylelint-config-standard",
"rules": {
"no-empty-source": null,
"string-quotes": "double",
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"extend",
"at-root",
"debug",
"warn",
"error",
"if",
"else",
"for",
"each",
"while",
"mixin",
"include",
"content",
"return",
"function",
"tailwind",
"apply",
"responsive",
"variants",
"screen"
]
}
]
}
}

27
.versionrc.json Normal file
View File

@ -0,0 +1,27 @@
{
"types": [
{"type": "feat", "section": "Features"},
{"type": "fix", "section": "Bug Fixes"},
{"type": "chore", "hidden": true},
{"type": "deps", "section": "Dependencies"},
{"type": "docs", "section": "Documentation"},
{"type": "style", "hidden": true},
{"type": "refactor", "hidden": true},
{"type": "perf", "hidden": true},
{"type": "test", "hidden": true}
],
"bumpFiles": [
{
"filename": "package.json",
"type": "json"
},
{
"filename": "package-lock.json",
"type": "json"
},
{
"filename": "data/doks.json",
"type": "json"
}
]
}

3
CHANGELOG.md Normal file
View File

@ -0,0 +1,3 @@
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

76
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at hello@getdoks.org. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020-2021 Gridsome, Henk Verlinde
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

1
README.md Normal file
View File

@ -0,0 +1 @@
# Doks child theme

View File

@ -0,0 +1,11 @@
exports.handler = (event, context, callback) => {
callback (null, {
statusCode: 200,
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
message: 'Hi from Lambda.',
}),
});
}

17
babel.config.js Normal file
View File

@ -0,0 +1,17 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: {
browsers: [
// Best practice: https://github.com/babel/babel/issues/7789
'>=1%',
'not ie 11',
'not op_mini all'
]
}
}
]
]
};

120
config/_default/config.toml Normal file
View File

@ -0,0 +1,120 @@
baseurl = "/"
disableAliases = true
disableHugoGeneratorInject = true
enableEmoji = true
enableGitInfo = false
enableRobotsTXT = true
languageCode = "en-US"
paginate = 7
rssLimit = 10
# add redirects/headers
[outputs]
home = ["HTML", "RSS", "REDIRECTS", "HEADERS"]
section = ["HTML", "RSS", "SITEMAP"]
# remove .{ext} from text/netlify
[mediaTypes."text/netlify"]
suffixes = [""]
delimiter = ""
# add output format for netlify _redirects
[outputFormats.REDIRECTS]
mediaType = "text/netlify"
baseName = "_redirects"
isPlainText = true
notAlternative = true
# add output format for netlify _headers
[outputFormats.HEADERS]
mediaType = "text/netlify"
baseName = "_headers"
isPlainText = true
notAlternative = true
# add output format for section sitemap.xml
[outputFormats.SITEMAP]
mediaType = "application/xml"
baseName = "sitemap"
isHTML = false
isPlainText = true
noUgly = true
rel = "sitemap"
[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"
priority = 0.5
[taxonomies]
contributor = "contributors"
[permalinks]
blog = "/blog/:title/"
[module]
[[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 = "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"

View File

@ -0,0 +1,45 @@
[[docs]]
name = "Prologue"
weight = 10
identifier = "prologue"
url = "/docs/prologue/"
[[docs]]
name = "Examples"
weight = 20
identifier = "examples"
url = "/docs/examples/"
[[docs]]
name = "Help"
weight = 60
identifier = "help"
url = "/docs/help/"
[[main]]
name = "Docs"
url = "/docs/prologue/introduction/"
weight = 10
[[main]]
name = "Blog"
url = "/blog/"
weight = 20
[[social]]
name = "Twitter"
pre = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-twitter\"><path d=\"M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z\"></path></svg>"
url = "https://twitter.com/getdoks"
weight = 10
[[social]]
name = "GitHub"
pre = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-github\"><path d=\"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22\"></path></svg>"
url = "https://github.com/h-enk/doks"
post = "v0.1.0"
weight = 20
# [[footer]]
# name = "Privacy"
# url = "/privacy-policy/"
# weight = 10

View File

@ -0,0 +1,58 @@
# Meta Data for SEO
## Homepage
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."
## Open Graph + Twitter Cards
images = ["doks.png"]
twitterSite = "henkverlinde"
twitterCreator = "henkverlinde"
facebookAuthor = "verlinde.henk"
facebookPublisher = "verlinde.henk"
ogLocale = "en_US"
## JSON-LD
schemaType = "Organization"
schemaLogo = "logo-doks.png"
schemaTwitter = "https://twitter.com/henkverlinde"
schemaLinkedIn = "https://www.linkedin.com/in/henkverlinde/"
schemaGitHub = "https://github.com/h-enk"
schemaSection = "blog"
## Sitelinks Search Box
siteLinksSearchBox = false
## Chrome Browser
themeColor = "#fff"
# Images
quality = 85
bgColor = "#fff"
landscapePhotoWidths = [900, 800, 700, 600, 500]
portraitPhotoWidths = [800, 700, 600, 500]
lqipWidth = "20x"
# 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>"
# Alert
alert = false
alertText = "Like Doks? <a class=\"alert-link\" href=\"https://github.com/h-enk/doks/stargazers\">Star on GitHub</a>. Thanks!</a>"
# Edit Page
docsRepo = "https://github.com/h-enk/doks"
editPage = false
[options]
lazySizes = true
clipBoard = false
instantPage = true
flexSearch = true
darkMode = true
bootStrapJs = false
breadCrumb = false
highLight = true
kaTex = false

31
config/postcss.config.js Normal file
View File

@ -0,0 +1,31 @@
const autoprefixer = require('autoprefixer');
const purgecss = require('@fullhuman/postcss-purgecss');
const whitelister = require('purgecss-whitelister');
module.exports = {
plugins: [
autoprefixer(),
purgecss({
content: [
'./layouts/**/*.html',
'./content/**/*.md',
],
safelist: [
'lazyloaded',
'table',
'thead',
'tbody',
'tr',
'th',
'td',
...whitelister([
'./assets/scss/components/_doks.scss',
'./assets/scss/components/_code.scss',
'./assets/scss/components/_search.scss',
'./assets/scss/common/_dark.scss',
'./node_modules/katex/dist/katex.css',
]),
],
}),
],
}

View File

@ -0,0 +1 @@
baseurl = "/"

0
config/staging/.gitkeep Normal file
View File

9
content/_index.md Normal file
View File

@ -0,0 +1,9 @@
---
title : "Modern Documentation Theme"
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."
date: 2020-10-06T08:47:36+00:00
lastmod: 2020-10-06T08:47:36+00:00
draft: false
images: []
---

8
content/blog/_index.md Normal file
View File

@ -0,0 +1,8 @@
---
title: "Blog"
description: "The Doks Blog."
date: 2020-10-06T08:49:55+00:00
lastmod: 2020-10-06T08:49:55+00:00
draft: false
images: []
---

View File

@ -0,0 +1,11 @@
---
title: "Say hello to Doks 👋"
description: "Introducing Doks, a Hugo theme helping you build modern documentation websites that are secure, fast, and SEO-ready — by default."
lead: "Introducing Doks, a Hugo theme helping you build modern documentation websites that are secure, fast, and SEO-ready — by default."
date: 2020-11-04T09:19:42+01:00
lastmod: 2020-11-04T09:19:42+01:00
draft: false
weight: 50
images: ["say-hello-to-doks.png"]
contributors: ["Henk Verlinde"]
---

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

10
content/contact/index.md Normal file
View File

@ -0,0 +1,10 @@
---
title: "Contact"
description: "Drop us an email."
date: 2020-08-27T19:25:12+02:00
lastmod: 2020-08-27T19:25:12+02:00
draft: true
images: []
---
{{< email user="hello" domain="getdoks.org" >}}

View File

@ -0,0 +1,10 @@
---
title: "Contributors"
description: "The Doks contributors."
date: 2020-10-06T08:50:29+00:00
lastmod: 2020-10-06T08:50:29+00:00
draft: false
images: []
---
The Doks contributors.

View File

@ -0,0 +1,12 @@
---
title: "Henk Verlinde"
description: "Creator of Hyas."
date: 2020-10-06T08:50:45+00:00
lastmod: 2020-10-06T08:50:45+00:00
draft: false
images: []
---
Creator of Hyas.
[@HenkVerlinde](https://twitter.com/henkverlinde)

9
content/docs/_index.md Normal file
View File

@ -0,0 +1,9 @@
---
title : "Docs"
description: "Docs Doks."
lead: ""
date: 2020-10-06T08:48:23+00:00
lastmod: 2020-10-06T08:48:23+00:00
draft: false
images: []
---

View File

@ -0,0 +1,9 @@
---
title: "Examples"
description: "Examples"
lead: ""
date: 2021-03-16T08:43:03+01:00
lastmod: 2021-03-16T08:43:03+01:00
draft: false
images: []
---

View File

@ -0,0 +1,79 @@
---
title: "Code"
description: "Code highlighting examples."
lead: "Code highlighting examples."
date: 2021-03-16T08:43:34+01:00
lastmod: 2021-03-16T08:43:34+01:00
draft: false
images: []
menu:
docs:
parent: "examples"
weight: 200
toc: true
---
## JavaScript
```js
function $initHighlight(block, cls) {
try {
if (cls.search(/\bno\-highlight\b/) != -1)
return process(block, true, 0x0F) +
` class="${cls}"`;
} catch (e) {
/* handle exception */
}
for (var i = 0 / 2; i < classes.length; i++) {
if (checkCondition(classes[i]) === undefined)
console.log('undefined');
}
return (
<div>
<web-component>{block}</web-component>
</div>
)
}
export $initHighlight;
```
## JSON
```json
[
{
"title": "apples",
"count": [12000, 20000],
"description": {"text": "...", "sensitive": false}
},
{
"title": "oranges",
"count": [17500, null],
"description": {"text": "...", "sensitive": false}
}
]
```
## Bash
```bash
#!/bin/bash
###### CONFIG
ACCEPTED_HOSTS="/root/.hag_accepted.conf"
BE_VERBOSE=false
if [ "$UID" -ne 0 ]
then
echo "Superuser rights required"
exit 2
fi
genApacheConf(){
echo -e "# Host ${HOME_DIR}$1/$2 :"
}
echo '"quoted"' | tr -d \" > text.txt
```

View File

@ -0,0 +1,46 @@
---
title: "Math"
description: "Math typesetting examples."
lead: "Math typesetting examples."
date: 2021-03-16T10:46:05+01:00
lastmod: 2021-03-16T10:46:05+01:00
draft: false
images: []
menu:
docs:
parent: "examples"
weight: 210
toc: true
---
[KaTeX](https://katex.org/) is switched off by default. Enable it by setting `kaTex = true` in the `[options]` section of `./config/_default/params.toml`.
## Example 1
_Excerpt taken from [Supernova Neutrinos](https://neutrino.leima.is/book/introduction/supernova-neutrinos/)_
### Markdown
```md
The average energy of the neutrinos $\langle E \rangle$ emitted during a supernova explosion is of the order of 10MeV, and the neutrino luminosity at the early epoch of the explosion is approximately $10^{52}\mathrm{ergs\cdot s^{-1}}$.
Therefore, the number density of the neutrinos at the radius $R$ is
$$
\begin{equation*}
n \sim 10^{18} \mathrm{cm^{-3}} \left(\frac{100\mathrm{km}}{R}\right)^2 \left(\frac{10\mathrm{MeV}}{\langle E \rangle}\right).
\end{equation*}
$$
```
### HTML
The average energy of the neutrinos $\langle E \rangle$ emitted during a supernova explosion is of the order of 10MeV, and the neutrino luminosity at the early epoch of the explosion is approximately $10^{52}\mathrm{ergs\cdot s^{-1}}$.
Therefore, the number density of the neutrinos at the radius $R$ is
$$
\begin{equation*}
n \sim 10^{18} \mathrm{cm^{-3}} \left(\frac{100\mathrm{km}}{R}\right)^2 \left(\frac{10\mathrm{MeV}}{\langle E \rangle}\right).
\end{equation*}
$$
It turns out that the ambient dense neutrino medium has a significant impact on neutrino oscillations, which has been intensely investigated in the last decade.

View File

@ -0,0 +1,9 @@
---
title: "Help"
description: "Help Doks."
lead: ""
date: 2020-10-06T08:49:15+00:00
lastmod: 2020-10-06T08:49:15+00:00
draft: false
images: []
---

48
content/docs/help/faq.md Normal file
View File

@ -0,0 +1,48 @@
---
title: "FAQ"
description: "Answers to frequently asked questions."
lead: "Answers to frequently asked questions."
date: 2020-10-06T08:49:31+00:00
lastmod: 2020-10-06T08:49:31+00:00
draft: false
images: []
menu:
docs:
parent: "help"
weight: 630
toc: true
---
## Hyas?
Doks is a [Hyas theme](https://gethyas.com/themes/doks/) build by the creator of Hyas.
## Footer notice?
Please keep it in place.
## Keyboard shortcuts for search?
- focus: `/`
- select: `↓` and `↑`
- open: `Enter`
- close: `Esc`
## Other documentation?
- [Netlify](https://docs.netlify.com/)
- [Hugo](https://gohugo.io/documentation/)
## Can I get support?
Create a topic:
- [Netlify Community](https://community.netlify.com/)
- [Hugo Forums](https://discourse.gohugo.io/)
## Contact the creator?
Send `h-enk` a message:
- [Netlify Community](https://community.netlify.com/)
- [Hugo Forums](https://discourse.gohugo.io/)

View File

@ -0,0 +1,24 @@
---
title: "How to Update"
description: "Regularly update the installed npm packages to keep your Doks website stable, usable, and secure."
lead: "Regularly update the installed npm packages to keep your Doks website stable, usable, and secure."
date: 2020-11-12T13:26:54+01:00
lastmod: 2020-11-12T13:26:54+01:00
draft: false
images: []
menu:
docs:
parent: "help"
weight: 610
toc: true
---
{{< alert icon="💡" text="Learn more about <a href=\"https://docs.npmjs.com/about-semantic-versioning\">semantic versioning</a> and <a href=\"https://docs.npmjs.com/cli/v6/using-npm/semver#advanced-range-syntax\">advanced range syntax</a>." >}}
## Update npm packages
Bump the versions in the `devDependencies` section of `./package.json` to your liking, and run:
```bash
npm update
```

View File

@ -0,0 +1,30 @@
---
title: "Troubleshooting"
description: "Solutions to common problems."
lead: "Solutions to common problems."
date: 2020-11-12T15:22:20+01:00
lastmod: 2020-11-12T15:22:20+01:00
draft: false
images: []
menu:
docs:
parent: "help"
weight: 620
toc: true
---
## Problems updating npm packages
Delete the `./node_modules` folder, and run again:
```bash
npm install
```
## Problems with cache
Delete the temporary directories:
```bash
npm run clean
```

View File

@ -0,0 +1,9 @@
---
title : "Prologue"
description: "Prologue Doks."
lead: ""
date: 2020-10-06T08:48:45+00:00
lastmod: 2020-10-06T08:48:45+00:00
draft: false
images: []
---

View File

@ -0,0 +1,106 @@
---
title: "Commands"
description: "Doks comes with commands for common tasks."
lead: "Doks comes with commands for common tasks."
date: 2020-10-13T15:21:01+02:00
lastmod: 2020-10-13T15:21:01+02:00
draft: false
images: []
menu:
docs:
parent: "prologue"
weight: 130
toc: true
---
{{< alert icon="💡" text="You can change the commands in the scripts section of `./package.json`." >}}
## start
Start local development server:
{{< btn-copy text="npm run start" >}}
```bash
npm run start
```
## lint
Check scripts, styles, and markdown for errors:
{{< btn-copy text="npm run lint" >}}
```bash
npm run lint
```
### scripts
Check scripts for errors:
{{< btn-copy text="npm run lint:scripts" >}}
```bash
npm run lint:scripts [-- --fix]
```
### styles
Check styles for errors:
{{< btn-copy text="npm run lint:styles" >}}
```bash
npm run lint:styles [-- --fix]
```
### markdown
Check markdown for errors:
{{< btn-copy text="npm run lint:markdown" >}}
```bash
npm run lint:markdown [-- --fix]
```
## clean
Delete temporary directories:
{{< btn-copy text="npm run clean" >}}
```bash
npm run clean
```
## build
Build production website:
{{< btn-copy text="npm run build" >}}
```bash
npm run build
```
### functions
Build Lambda functions:
{{< btn-copy text="npm run build:functions" >}}
```bash
npm run build:functions
```
### preview
Build production website including draft and future content:
{{< btn-copy text="npm run build:preview" >}}
```bash
npm run build:preview
```

View File

@ -0,0 +1,58 @@
---
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."
date: 2020-10-06T08:48:57+00:00
lastmod: 2020-10-06T08:48:57+00:00
draft: false
images: []
menu:
docs:
parent: "prologue"
weight: 100
toc: true
---
## Get started
There are two main ways to get started with Doks:
### Tutorial
{{< alert icon="👉" text="The Tutorial is intended for novice to intermediate users." >}}
Step-by-step instructions on how to start a new Doks project. [Tutorial →](https://getdoks.org/tutorial/introduction/)
### Quick Start
{{< alert icon="👉" text="The Quick Start is intended for intermediate to advanced users." >}}
One page summary of how to start a new Doks project. [Quick Start →]({{< ref "quick-start" >}})
## Go further
Recipes, Reference Guides, Extensions, and Showcase.
### Recipes
Get instructions on how to accomplish common tasks with Doks. [Recipes →](https://getdoks.org/docs/recipes/project-configuration/)
### Reference Guides
Learn how to customize Doks to fully make it your own. [Reference Guides →](https://getdoks.org/docs/reference-guides/security/)
### Extensions
Get instructions on how to add even more to Doks. [Extensions →](https://getdoks.org/docs/extensions/add-google-fonts/)
### Showcase
See what others have build with Doks. [Showcase →](https://getdoks.org/showcase/parietal-numerics-documentation/)
## Contributing
Find out how to contribute to Doks. [Contributing →](https://getdoks.org/docs/contributing/how-to-contribute/)
## Help
Get help on Doks. [Help →]({{< ref "how-to-update" >}})

View File

@ -0,0 +1,60 @@
---
title: "Quick Start"
description: "One page summary of how to start a new Doks project."
lead: "One page summary of how to start a new Doks project."
date: 2020-11-16T13:59:39+01:00
lastmod: 2020-11-16T13:59:39+01:00
draft: false
images: []
menu:
docs:
parent: "prologue"
weight: 110
toc: true
---
## Requirements
Doks uses npm to install dependencies and run commands. Installing npm is pretty simple. Download and install [Node.js](https://nodejs.org/) (it includes npm) for your platform.
## Start a new Doks project
Create a new site, change directories, install dependencies, and start development server.
### Create a new site
{{< btn-copy text="git clone https://github.com/h-enk/doks.git my-doks-site" >}}
```bash
git clone https://github.com/h-enk/doks.git my-doks-site
```
### Change directories
{{< btn-copy text="cd my-doks-site" >}}
```bash
cd my-doks-site
```
### Install dependencies
{{< btn-copy text="npm install" >}}
```bash
npm install
```
### Start development server
{{< btn-copy text="npm run start" >}}
```bash
npm run start
```
Doks will start the Hugo development webserver accessible by default at `http://localhost:1313`. Saved changes will live reload in the browser.
## Other commands
Doks comes with commands for common tasks. [Commands →]({{< ref "commands" >}})

View File

@ -0,0 +1,36 @@
---
title: "Privacy Policy"
description: "We do not use cookies and we do not collect any personal data."
date: 2020-08-27T19:23:18+02:00
lastmod: 2020-08-27T19:23:18+02:00
draft: true
images: []
---
__TLDR__: We do not use cookies and we do not collect any personal data.
## Website visitors
- No personal information is collected.
- No information is stored in the browser.
- No information is shared with, sent to or sold to third-parties.
- No information is shared with advertising companies.
- No information is mined and harvested for personal and behavioral trends.
- No information is monetized.
### Information we collect and what we use it for
We run [Plausible](https://plausible.io/) analytics on getdoks.org. The following information is collected:
- __Page URL__. We track the page URL of each page view on this website. We use this to understand which pages have been viewed and how many times a particular page has been viewed. For example: _https://getdoks.org/_.
- __HTTP Referrer__. We use the referrer string to understand the number of visitors referred to this website from links on other sites. For example: _https://github.com/_.
- __Browser__. We use this to understand what browsers people use when visiting this website. This is derived from the User-Agent HTTP header. The full User-Agent is discarded. For example: _Chrome_.
- __Operating system__. We use this to understand what operating systems people use when visiting this website. We only use the brand of the operating system and dont include the version number or any other details. This is derived from the User-Agent HTTP header. The full User-Agent is discarded. For example: _GNU/Linux_.
- __Device type__. We use this to understand what devices people use when visiting this website. This is derived from window.innerWidth. The actual width of the browser in pixels is discarded. For example: _Desktop_.
- __Visitor Country__. We look up the visitors country using the IP address. We do not track anything more granular than the country of origin and the IP address of the visitor is discarded. We never store IP addresses in our database or logs. For example: _Canada_.
## Contact us
[Contact us]({{< ref "contact/index.md" >}}) if you have any questions.
Effective Date: _27th August 2020_

BIN
images/screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

BIN
images/tn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

59
layouts/index.html Normal file
View File

@ -0,0 +1,59 @@
{{ define "main" }}
<section class="section container-fluid mt-n3 pb-3">
<div class="row justify-content-center">
<div class="col-lg-12 text-center">
<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/" | absURL }}" role="button">Get started</a>
<p class="meta">Open-source MIT Licensed. <a href="https://github.com/h-enk/doks">GitHub v{{ .Site.Data.doks.version }}</a></p>
</div>
</div>
</section>
{{ end }}
{{ define "sidebar-prefooter" }}
<section class="section section-sm">
<div class="container">
<div class="row justify-content-center text-center">
<div class="col-lg-5">
<h2 class="h4">Security aware</h2>
<p>Get A+ scores on <a href="https://observatory.mozilla.org/analyze/doks.netlify.app">Mozilla Observatory</a> out of the box. Easily change the default Security Headers to suit your needs.</p>
</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>
</div>
<div class="col-lg-5">
<h2 class="h4">SEO-ready</h2>
<p>Use sensible defaults for structured data, open graph, and Twitter cards. Or easily change the SEO settings to your liking.</p>
</div>
</div>
<div class="row justify-content-center text-center">
<div class="col-lg-5">
<h2 class="h4">Full text search</h2>
<p>Search your Doks site with FlexSearch. Easily customize index settings and search options to your liking.</p>
</div>
<div class="col-lg-5">
<h2 class="h4">Page layouts</h2>
<p>Build pages with a landing page, blog, or documentation layout. Add custom sections and components to suit your needs.</p>
</div>
<div class="col-lg-5">
<h2 class="h4">Dark mode</h2>
<p>Switch to a low-light UI with the click of a button. Change colors with variables to match your branding.</p>
</div>
</div>
</div>
</section>
{{ end }}
{{ define "sidebar-footer" }}
<section class="section section-sm container-fluid">
<div class="row justify-content-center text-center">
<div class="col-lg-9">
{{- .Content -}}
</div>
</div>
</section>
{{ end }}

24
netlify.toml Normal file
View File

@ -0,0 +1,24 @@
[build]
publish = "public"
functions = "functions"
[dev]
framework = "#custom"
command = "npx hugo server --disableFastRender"
targetPort = 1313
port = 8888
publish = "public"
autoLaunch = false
[build.environment]
NODE_VERSION = "15.5.1"
NPM_VERSION = "7.3.0"
[context.production]
command = "npx hugo --gc --minify -b $URL && npm run build:functions"
[context.deploy-preview]
command = "npx hugo --gc --minify -b $DEPLOY_PRIME_URL"
[context.branch-deploy]
command = "npx hugo --gc --minify -b $DEPLOY_PRIME_URL"

25326
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

66
package.json Normal file
View File

@ -0,0 +1,66 @@
{
"name": "doks-child-theme",
"description": "Doks child theme",
"version": "0.1.0",
"hugo-bin": {
"buildTags": "extended"
},
"browserslist": [
"defaults"
],
"repository": "https://github.com/h-enk/doks",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"scripts": {
"init": "rimraf .git && git init -b main",
"create": "hugo new",
"prestart": "npm run clean",
"start": "hugo server --disableFastRender",
"prebuild": "npm run clean",
"build": "hugo --gc --minify && npm run build:functions",
"build:functions": "netlify-lambda build assets/lambda",
"build:preview": "npm run build -D -F",
"clean": "rimraf public resources functions",
"lint": "npm run -s lint:scripts && npm run -s lint:styles && npm run -s lint:markdown",
"lint:scripts": "eslint assets/js assets/lambda config",
"lint:styles": "stylelint \"assets/scss/**/*.{css,sass,scss,sss,less}\"",
"lint:markdown": "markdownlint *.md content/**/*.md",
"release": "standard-version",
"release:dry-run": "standard-version --dry-run",
"server": "hugo server",
"test": "npm run -s lint",
"env": "env",
"precheck": "npm version",
"check": "hugo version",
"copy:katex-fonts": "shx cp ./node_modules/katex/dist/fonts/* ./static/fonts/"
},
"devDependencies": {
"@babel/cli": "^7.13",
"@babel/core": "^7.13",
"@babel/preset-env": "^7.13",
"@fullhuman/postcss-purgecss": "^4.0",
"@hyas/doks": "^0.2",
"autoprefixer": "^10.2",
"bootstrap": "^5.0.0-beta2",
"clipboard": "^2.0",
"eslint": "^7.22",
"flexsearch": "^0.6",
"highlight.js": "^10.6.0",
"hugo-bin": "^0.69",
"instant.page": "^5.1",
"katex": "^0.13.0",
"lazysizes": "^5.3",
"markdownlint-cli": "^0.27",
"netlify-lambda": "^2.0",
"postcss": "^8.2",
"postcss-cli": "^8.3",
"purgecss-whitelister": "^2.4",
"rimraf": "^3.0",
"shx": "^0.3.3",
"standard-version": "^9.1",
"stylelint": "^13.12",
"stylelint-config-standard": "^21.0"
}
}

12
theme.toml Normal file
View File

@ -0,0 +1,12 @@
name = "Doks"
license = "MIT"
licenselink = "https://github.com/h-enk/doks/blob/master/LICENSE"
description = "Hugo theme helping you build modern documentation websites that are secure, fast, and SEO-ready — by default."
homepage = "https://getdoks.org/"
tags = ["landing page", "documentation", "blog", "minimal", "modern", "customizable", "search", "dark mode", "bootstrap"]
features = ["security aware", "fast by default", "seo-ready", "development tools", "bootstrap framework", "netlify-ready", "full text search", "page layouts", "dark mode"]
min_version = "0.75.0"
[author]
name = "Henk Verlinde"
homepage = "https://henkverlinde.com/"