feat: update for doks v0.3.0

This commit is contained in:
Henk Verlinde 2021-06-25 16:49:17 +02:00
parent 69cdc3ccce
commit 630c2a2edd
16 changed files with 4054 additions and 11675 deletions

3
.gitignore vendored
View File

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

1
.npmrc
View File

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

View File

@ -1,27 +0,0 @@
{
"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"
}
]
}

View File

@ -1,6 +1,10 @@
# Changelog
### 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.
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
<!-- auto-changelog-above -->
### [0.2.3](https://github.com/h-enk/doks/compare/v0.2.2...v0.2.3) (2021-04-02)

View File

@ -6,20 +6,34 @@ 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
## Open Graph
images = ["doks.png"]
twitterSite = "henkverlinde"
twitterCreator = "henkverlinde"
facebookAuthor = "verlinde.henk"
facebookPublisher = "verlinde.henk"
ogLocale = "en_US"
domainTLD = "doks.netlify.app"
titleHome = "Doks Theme"
## Twitter Cards
twitterSite = "@getdoks"
twitterCreator = "@henkverlinde"
## JSON-LD
# schemaType = "Person"
schemaType = "Organization"
schemaName = "Doks"
schemaAuthor = "Henk Verlinde"
schemaAuthorTwitter = "https://twitter.com/henkverlinde"
schemaAuthorLinkedIn = "https://www.linkedin.com/in/henkverlinde/"
schemaAuthorGitHub = "https://github.com/h-enk"
schemaLocale = "en-US"
schemaLogo = "logo-doks.png"
schemaTwitter = "https://twitter.com/henkverlinde"
schemaLinkedIn = "https://www.linkedin.com/in/henkverlinde/"
schemaGitHub = "https://github.com/h-enk"
schemaLogoWidth = 512
schemaLogoHeight = 512
schemaImage = "doks.png"
schemaImageWidth = 1280
schemaImageHeight = 640
schemaTwitter = "https://twitter.com/getdoks"
schemaLinkedIn = ""
schemaGitHub = "https://github.com/h-enk/doks"
schemaSection = "blog"
## Sitelinks Search Box
@ -37,6 +51,7 @@ 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>"
copyRight = "Copyright (c) 2020-2021 Henk Verlinde"
# Alert
alert = false
@ -52,7 +67,8 @@ editPage = false
instantPage = true
flexSearch = true
darkMode = true
bootStrapJs = false
bootStrapJs = true
breadCrumb = false
highLight = true
kaTex = false
collapsibleSidebar = false

View File

@ -20,11 +20,12 @@ module.exports = {
'tr',
'th',
'td',
'h5',
...whitelister([
'./node_modules/@hyas/doks/assets/scss/common/_variables.scss',
'./node_modules/@hyas/doks/assets/scss/components/_doks.scss',
'./node_modules/@hyas/doks/assets/scss/components/_code.scss',
'./node_modules/@hyas/doks/assets/scss/components/_buttons.scss',
'./node_modules/@hyas/doks/assets/scss/components/_code.scss',
'./node_modules/@hyas/doks/assets/scss/components/_syntax.scss',
'./node_modules/@hyas/doks/assets/scss/components/_search.scss',
'./node_modules/@hyas/doks/assets/scss/common/_dark.scss',
'./node_modules/katex/dist/katex.css',

View File

@ -13,7 +13,7 @@ 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>." >}}
{{< 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>." />}}
## Check for outdated packages

View File

@ -13,14 +13,12 @@ weight: 130
toc: true
---
{{< alert icon="💡" text="You can change the commands in the scripts section of `./package.json`." >}}
{{< alert icon="💡" text="You can change the commands in the scripts section of `./package.json`." />}}
## create
Create new content for your site:
{{< btn-copy text="npm run create" >}}
```bash
npm run create [path] [flags]
```
@ -31,8 +29,6 @@ See also the Hugo docs: [hugo new](https://gohugo.io/commands/hugo_new/).
Check scripts, styles, and markdown for errors:
{{< btn-copy text="npm run lint" >}}
```bash
npm run lint
```
@ -41,8 +37,6 @@ npm run lint
Check scripts for errors:
{{< btn-copy text="npm run lint:scripts" >}}
```bash
npm run lint:scripts [-- --fix]
```
@ -51,8 +45,6 @@ npm run lint:scripts [-- --fix]
Check styles for errors:
{{< btn-copy text="npm run lint:styles" >}}
```bash
npm run lint:styles [-- --fix]
```
@ -61,8 +53,6 @@ npm run lint:styles [-- --fix]
Check markdown for errors:
{{< btn-copy text="npm run lint:markdown" >}}
```bash
npm run lint:markdown [-- --fix]
```
@ -71,8 +61,6 @@ npm run lint:markdown [-- --fix]
Delete temporary directories:
{{< btn-copy text="npm run clean" >}}
```bash
npm run clean
```
@ -81,8 +69,6 @@ npm run clean
Start local development server:
{{< btn-copy text="npm run start" >}}
```bash
npm run start
```
@ -91,8 +77,6 @@ npm run start
Build production website:
{{< btn-copy text="npm run build" >}}
```bash
npm run build
```
@ -101,8 +85,6 @@ npm run build
Build Lambda functions:
{{< btn-copy text="npm run build:functions" >}}
```bash
npm run build:functions
```
@ -111,8 +93,6 @@ npm run build:functions
Build production website including draft and future content:
{{< btn-copy text="npm run build:preview" >}}
```bash
npm run build:preview
```

View File

@ -19,13 +19,13 @@ There are two main ways to get started with Doks:
### Tutorial
{{< alert icon="👉" text="The Tutorial is intended for novice to intermediate users." >}}
{{< 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." >}}
{{< 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 →]({{< relref "quick-start" >}})

View File

@ -34,40 +34,30 @@ Not quite sure? Use the Doks child theme.
#### Doks child theme
{{< btn-copy text="git clone https://github.com/h-enk/doks-child-theme.git my-doks-site" >}}
```bash
git clone https://github.com/h-enk/doks-child-theme.git my-doks-site
```
#### Doks starter theme
{{< 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
```

View File

@ -1,4 +0,0 @@
{
"name": "doks",
"version": "0.2.3"
}

View File

@ -7,7 +7,7 @@
<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{{ .Site.Data.doks.version }}</a></p>
<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>
</div>
</div>
</section>

View File

@ -3,27 +3,27 @@
functions = "functions"
[build.environment]
NODE_VERSION = "15.5.1"
NPM_VERSION = "7.3.0"
NODE_VERSION = "16.3.0"
NPM_VERSION = "7.16.0"
[context.production]
command = "npx hugo --gc --minify && npx netlify-lambda build assets/lambda"
command = "exec-bin bin/hugo/hugo --gc --minify"
[context.deploy-preview]
command = "npx hugo --gc --minify -b $DEPLOY_PRIME_URL"
command = "exec-bin bin/hugo/hugo --gc --minify -b $DEPLOY_PRIME_URL"
[context.branch-deploy]
command = "npx hugo --gc --minify -b $DEPLOY_PRIME_URL"
command = "exec-bin bin/hugo/hugo --gc --minify -b $DEPLOY_PRIME_URL"
[context.next]
command = "npx hugo --gc --minify && npx netlify-lambda build assets/lambda"
command = "exec-bin bin/hugo/hugo --gc --minify"
[context.next.environment]
HUGO_ENV = "next"
[dev]
framework = "#custom"
command = "npx rimraf public resources functions && npx hugo server --bind=0.0.0.0 --disableFastRender"
command = "shx rm -rf public resources && exec-bin bin/hugo/hugo server --bind=0.0.0.0 --disableFastRender"
targetPort = 1313
port = 8888
publish = "public"

15523
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,9 +2,6 @@
"name": "doks-child-theme",
"description": "Doks child theme",
"version": "0.2.3",
"hugo-bin": {
"buildTags": "extended"
},
"browserslist": [
"defaults"
],
@ -14,53 +11,56 @@
"access": "public"
},
"scripts": {
"init": "rimraf .git && git init -b main",
"create": "hugo new",
"init": "shx rm -rf .git && git init -b main",
"create": "exec-bin bin/hugo/hugo new",
"prestart": "npm run clean",
"start": "hugo server --bind=0.0.0.0 --disableFastRender",
"start": "exec-bin bin/hugo/hugo server --bind=0.0.0.0 --disableFastRender",
"prebuild": "npm run clean",
"build": "hugo --gc --minify && npm run build:functions",
"build:functions": "netlify-lambda build assets/lambda",
"build": "exec-bin bin/hugo/hugo --gc --minify",
"build:preview": "npm run build -D -F",
"clean": "rimraf public resources functions",
"clean": "shx rm -rf public resources",
"clean:install": "shx rm -rf package-lock.json bin node_modules ",
"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:scripts": "eslint assets/js config functions",
"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",
"server": "exec-bin bin/hugo/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/"
"check": "exec-bin bin/hugo/hugo version",
"copy:katex-fonts": "shx cp ./node_modules/katex/dist/fonts/* ./static/fonts/",
"postinstall": "hugo-installer --version otherDependencies.hugo --extended",
"version": "auto-changelog -p && git add CHANGELOG.md"
},
"devDependencies": {
"@babel/cli": "^7.13",
"@babel/core": "^7.13",
"@babel/preset-env": "^7.13",
"@babel/cli": "^7.14",
"@babel/core": "^7.14",
"@babel/preset-env": "^7.14",
"@fullhuman/postcss-purgecss": "^4.0",
"@hyas/doks": "^0.2",
"@hyas/doks": "^0.3",
"auto-changelog": "^2.3.0",
"autoprefixer": "^10.2",
"bootstrap": "^5.0.0-beta3",
"bootstrap": "^5.0",
"clipboard": "^2.0",
"eslint": "^7.23",
"flexsearch": "^0.6",
"highlight.js": "^10.7",
"hugo-bin": "^0.70",
"eslint": "^7.29",
"exec-bin": "^1.0.0",
"hugo-installer": "^3.0.1",
"flexsearch": "^0.7.11",
"highlight.js": "^11.0",
"instant.page": "^5.1",
"katex": "^0.13.0",
"katex": "^0.13",
"lazysizes": "^5.3",
"markdownlint-cli": "^0.27",
"netlify-lambda": "^2.0",
"postcss": "^8.2",
"mermaid": "^8.10.2",
"postcss": "^8.3",
"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"
"stylelint": "^13.13",
"stylelint-config-standard": "^22.0"
},
"otherDependencies": {
"hugo": "0.84.0"
}
}