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 node_modules
public public
resources resources
# Local Netlify folder # Local Netlify folder
.netlify .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) ### [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" 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 helping you build modern documentation websites that are secure, fast, and SEO-ready — by default."
## Open Graph + Twitter Cards ## Open Graph
images = ["doks.png"] images = ["doks.png"]
twitterSite = "henkverlinde"
twitterCreator = "henkverlinde"
facebookAuthor = "verlinde.henk"
facebookPublisher = "verlinde.henk"
ogLocale = "en_US" ogLocale = "en_US"
domainTLD = "doks.netlify.app"
titleHome = "Doks Theme"
## Twitter Cards
twitterSite = "@getdoks"
twitterCreator = "@henkverlinde"
## JSON-LD ## JSON-LD
# schemaType = "Person"
schemaType = "Organization" 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" schemaLogo = "logo-doks.png"
schemaTwitter = "https://twitter.com/henkverlinde" schemaLogoWidth = 512
schemaLinkedIn = "https://www.linkedin.com/in/henkverlinde/" schemaLogoHeight = 512
schemaGitHub = "https://github.com/h-enk" schemaImage = "doks.png"
schemaImageWidth = 1280
schemaImageHeight = 640
schemaTwitter = "https://twitter.com/getdoks"
schemaLinkedIn = ""
schemaGitHub = "https://github.com/h-enk/doks"
schemaSection = "blog" schemaSection = "blog"
## Sitelinks Search Box ## Sitelinks Search Box
@ -37,6 +51,7 @@ lqipWidth = "20x"
# Footer # 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>" 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
alert = false alert = false
@ -52,7 +67,8 @@ editPage = false
instantPage = true instantPage = true
flexSearch = true flexSearch = true
darkMode = true darkMode = true
bootStrapJs = false bootStrapJs = true
breadCrumb = false breadCrumb = false
highLight = true highLight = true
kaTex = false kaTex = false
collapsibleSidebar = false

View File

@ -20,11 +20,12 @@ module.exports = {
'tr', 'tr',
'th', 'th',
'td', 'td',
'h5',
...whitelister([ ...whitelister([
'./node_modules/@hyas/doks/assets/scss/common/_variables.scss', './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/_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/components/_search.scss',
'./node_modules/@hyas/doks/assets/scss/common/_dark.scss', './node_modules/@hyas/doks/assets/scss/common/_dark.scss',
'./node_modules/katex/dist/katex.css', './node_modules/katex/dist/katex.css',

View File

@ -13,7 +13,7 @@ weight: 610
toc: true 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 ## Check for outdated packages

View File

@ -13,14 +13,12 @@ weight: 130
toc: true 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
Create new content for your site: Create new content for your site:
{{< btn-copy text="npm run create" >}}
```bash ```bash
npm run create [path] [flags] 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: Check scripts, styles, and markdown for errors:
{{< btn-copy text="npm run lint" >}}
```bash ```bash
npm run lint npm run lint
``` ```
@ -41,8 +37,6 @@ npm run lint
Check scripts for errors: Check scripts for errors:
{{< btn-copy text="npm run lint:scripts" >}}
```bash ```bash
npm run lint:scripts [-- --fix] npm run lint:scripts [-- --fix]
``` ```
@ -51,8 +45,6 @@ npm run lint:scripts [-- --fix]
Check styles for errors: Check styles for errors:
{{< btn-copy text="npm run lint:styles" >}}
```bash ```bash
npm run lint:styles [-- --fix] npm run lint:styles [-- --fix]
``` ```
@ -61,8 +53,6 @@ npm run lint:styles [-- --fix]
Check markdown for errors: Check markdown for errors:
{{< btn-copy text="npm run lint:markdown" >}}
```bash ```bash
npm run lint:markdown [-- --fix] npm run lint:markdown [-- --fix]
``` ```
@ -71,8 +61,6 @@ npm run lint:markdown [-- --fix]
Delete temporary directories: Delete temporary directories:
{{< btn-copy text="npm run clean" >}}
```bash ```bash
npm run clean npm run clean
``` ```
@ -81,8 +69,6 @@ npm run clean
Start local development server: Start local development server:
{{< btn-copy text="npm run start" >}}
```bash ```bash
npm run start npm run start
``` ```
@ -91,8 +77,6 @@ npm run start
Build production website: Build production website:
{{< btn-copy text="npm run build" >}}
```bash ```bash
npm run build npm run build
``` ```
@ -101,8 +85,6 @@ npm run build
Build Lambda functions: Build Lambda functions:
{{< btn-copy text="npm run build:functions" >}}
```bash ```bash
npm run build:functions npm run build:functions
``` ```
@ -111,8 +93,6 @@ npm run build:functions
Build production website including draft and future content: Build production website including draft and future content:
{{< btn-copy text="npm run build:preview" >}}
```bash ```bash
npm run build:preview npm run build:preview
``` ```

View File

@ -19,13 +19,13 @@ There are two main ways to get started with Doks:
### Tutorial ### 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/) Step-by-step instructions on how to start a new Doks project. [Tutorial →](https://getdoks.org/tutorial/introduction/)
### Quick Start ### 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" >}}) 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 #### Doks child theme
{{< btn-copy text="git clone https://github.com/h-enk/doks-child-theme.git my-doks-site" >}}
```bash ```bash
git clone https://github.com/h-enk/doks-child-theme.git my-doks-site git clone https://github.com/h-enk/doks-child-theme.git my-doks-site
``` ```
#### Doks starter theme #### Doks starter theme
{{< btn-copy text="git clone https://github.com/h-enk/doks.git my-doks-site" >}}
```bash ```bash
git clone https://github.com/h-enk/doks.git my-doks-site git clone https://github.com/h-enk/doks.git my-doks-site
``` ```
### Change directories ### Change directories
{{< btn-copy text="cd my-doks-site" >}}
```bash ```bash
cd my-doks-site cd my-doks-site
``` ```
### Install dependencies ### Install dependencies
{{< btn-copy text="npm install" >}}
```bash ```bash
npm install npm install
``` ```
### Start development server ### Start development server
{{< btn-copy text="npm run start" >}}
```bash ```bash
npm run start 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"> <div class="col-lg-9 col-xl-8 text-center">
<p class="lead">{{ .Params.lead | safeHTML }}</p> <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> <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>
</div> </div>
</section> </section>

View File

@ -3,27 +3,27 @@
functions = "functions" functions = "functions"
[build.environment] [build.environment]
NODE_VERSION = "15.5.1" NODE_VERSION = "16.3.0"
NPM_VERSION = "7.3.0" NPM_VERSION = "7.16.0"
[context.production] [context.production]
command = "npx hugo --gc --minify && npx netlify-lambda build assets/lambda" command = "exec-bin bin/hugo/hugo --gc --minify"
[context.deploy-preview] [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] [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] [context.next]
command = "npx hugo --gc --minify && npx netlify-lambda build assets/lambda" command = "exec-bin bin/hugo/hugo --gc --minify"
[context.next.environment] [context.next.environment]
HUGO_ENV = "next" HUGO_ENV = "next"
[dev] [dev]
framework = "#custom" 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 targetPort = 1313
port = 8888 port = 8888
publish = "public" publish = "public"

15525
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,9 +2,6 @@
"name": "doks-child-theme", "name": "doks-child-theme",
"description": "Doks child theme", "description": "Doks child theme",
"version": "0.2.3", "version": "0.2.3",
"hugo-bin": {
"buildTags": "extended"
},
"browserslist": [ "browserslist": [
"defaults" "defaults"
], ],
@ -14,53 +11,56 @@
"access": "public" "access": "public"
}, },
"scripts": { "scripts": {
"init": "rimraf .git && git init -b main", "init": "shx rm -rf .git && git init -b main",
"create": "hugo new", "create": "exec-bin bin/hugo/hugo new",
"prestart": "npm run clean", "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", "prebuild": "npm run clean",
"build": "hugo --gc --minify && npm run build:functions", "build": "exec-bin bin/hugo/hugo --gc --minify",
"build:functions": "netlify-lambda build assets/lambda",
"build:preview": "npm run build -D -F", "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": "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:styles": "stylelint \"assets/scss/**/*.{css,sass,scss,sss,less}\"",
"lint:markdown": "markdownlint *.md content/**/*.md", "lint:markdown": "markdownlint *.md content/**/*.md",
"release": "standard-version", "server": "exec-bin bin/hugo/hugo server",
"release:dry-run": "standard-version --dry-run",
"server": "hugo server",
"test": "npm run -s lint", "test": "npm run -s lint",
"env": "env", "env": "env",
"precheck": "npm version", "precheck": "npm version",
"check": "hugo version", "check": "exec-bin bin/hugo/hugo version",
"copy:katex-fonts": "shx cp ./node_modules/katex/dist/fonts/* ./static/fonts/" "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": { "devDependencies": {
"@babel/cli": "^7.13", "@babel/cli": "^7.14",
"@babel/core": "^7.13", "@babel/core": "^7.14",
"@babel/preset-env": "^7.13", "@babel/preset-env": "^7.14",
"@fullhuman/postcss-purgecss": "^4.0", "@fullhuman/postcss-purgecss": "^4.0",
"@hyas/doks": "^0.2", "@hyas/doks": "^0.3",
"auto-changelog": "^2.3.0",
"autoprefixer": "^10.2", "autoprefixer": "^10.2",
"bootstrap": "^5.0.0-beta3", "bootstrap": "^5.0",
"clipboard": "^2.0", "clipboard": "^2.0",
"eslint": "^7.23", "eslint": "^7.29",
"flexsearch": "^0.6", "exec-bin": "^1.0.0",
"highlight.js": "^10.7", "hugo-installer": "^3.0.1",
"hugo-bin": "^0.70", "flexsearch": "^0.7.11",
"highlight.js": "^11.0",
"instant.page": "^5.1", "instant.page": "^5.1",
"katex": "^0.13.0", "katex": "^0.13",
"lazysizes": "^5.3", "lazysizes": "^5.3",
"markdownlint-cli": "^0.27", "markdownlint-cli": "^0.27",
"netlify-lambda": "^2.0", "mermaid": "^8.10.2",
"postcss": "^8.2", "postcss": "^8.3",
"postcss-cli": "^8.3", "postcss-cli": "^8.3",
"purgecss-whitelister": "^2.4", "purgecss-whitelister": "^2.4",
"rimraf": "^3.0",
"shx": "^0.3.3", "shx": "^0.3.3",
"standard-version": "^9.1", "stylelint": "^13.13",
"stylelint": "^13.12", "stylelint-config-standard": "^22.0"
"stylelint-config-standard": "^21.0" },
"otherDependencies": {
"hugo": "0.84.0"
} }
} }