docs: update content

This commit is contained in:
Henk Verlinde
2020-12-03 16:07:04 +01:00
parent 0377b0de75
commit 63ca41e107
26 changed files with 345 additions and 151 deletions

View File

@ -7,3 +7,5 @@ lastmod: 2020-10-06T08:47:36+00:00
draft: false
images: []
---
Like Doks? [Star on GitHub](https://github.com/h-enk/doks/stargazers)! ⭐️🙏

View File

@ -7,6 +7,6 @@ draft: false
images: []
---
Creator of [Hyas](https://github.com/h-enk/hyas).
Creator of Hyas.
[@HenkVerlinde](https://twitter.com/henkverlinde)

View File

@ -9,7 +9,7 @@ images: []
menu:
docs:
parent: "help"
weight: 540
weight: 630
toc: true
---
@ -28,6 +28,11 @@ Please keep it in place.
- open: `Enter`
- close: `Esc`
## Other documentation?
- [Netlify](https://docs.netlify.com/)
- [Hugo](https://gohugo.io/documentation/)
## Can I get support?
Create a topic:

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

@ -1,7 +1,7 @@
---
title: "Commands"
description: "Doks comes with commands for most used tasks."
lead: "Doks comes with commands for most used tasks."
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
@ -9,7 +9,7 @@ images: []
menu:
docs:
parent: "prologue"
weight: 030
weight: 130
toc: true
---
@ -19,6 +19,8 @@ toc: true
Start local development server:
{{< btn-copy text="npm run start" >}}
```bash
npm run start
```
@ -27,6 +29,8 @@ npm run start
Check scripts, styles, and markdown for errors:
{{< btn-copy text="npm run lint" >}}
```bash
npm run lint
```
@ -35,6 +39,8 @@ npm run lint
Check scripts for errors:
{{< btn-copy text="npm run lint:scripts" >}}
```bash
npm run lint:scripts [-- --fix]
```
@ -43,6 +49,8 @@ npm run lint:scripts [-- --fix]
Check styles for errors:
{{< btn-copy text="npm run lint:styles" >}}
```bash
npm run lint:styles [-- --fix]
```
@ -51,6 +59,8 @@ npm run lint:styles [-- --fix]
Check markdown for errors:
{{< btn-copy text="npm run lint:markdown" >}}
```bash
npm run lint:markdown [-- --fix]
```
@ -59,6 +69,8 @@ npm run lint:markdown [-- --fix]
Delete temporary directories:
{{< btn-copy text="npm run clean" >}}
```bash
npm run clean
```
@ -67,6 +79,8 @@ npm run clean
Build production website:
{{< btn-copy text="npm run build" >}}
```bash
npm run build
```
@ -75,6 +89,8 @@ npm run build
Build Lambda functions:
{{< btn-copy text="npm run build:functions" >}}
```bash
npm run build:functions
```
@ -83,6 +99,8 @@ 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

@ -9,80 +9,50 @@ images: []
menu:
docs:
parent: "prologue"
weight: 010
weight: 100
toc: true
---
## Why Doks?
Nine 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.
3. __SEO-ready__. Use sensible defaults for structured data, open graph, and Twitter cards. Or easily change the SEO settings to your liking.
4. __Development tools__. Code with confidence. Check styles, scripts, and markdown for errors and fix automatically or manually.
5. __Bootstrap framework__. Build robust, flexible, and intuitive websites with Bootstrap. Or use any other front-end framework if you prefer.
6. __Netlify-ready__. Deploy to Netlify with sensible defaults. Easily use Netlify Functions, Netlify Redirects, and Netlify Headers.
7. __Full text search__. Search your Doks site with FlexSearch. Easily customize index settings and search options to your liking.
8. __Page layouts__. Build pages with a landing page, blog, or documentation layout. Add custom sections and components to suit your needs.
9. __Dark mode__. Switch to a low-light UI with the click of a button. Change colors with variables to match your branding.
## Requirements
Make sure all dependencies have been installed:
- [Hugo](https://gohugo.io/) >= 0.75.0/extended
- [Node.js](https://nodejs.org/) >= 14.15.0 (needed to install npm packages and run commands)
## Get started
Create a new Doks project:
There are two main ways to get started with Doks:
```bash
git clone https://github.com/h-enk/doks.git my-doks-site
```
### Tutorial
Install npm packages:
{{< alert icon="👉" text="The Tutorial is intended for novice to intermediate users." >}}
```bash
npm install
```
Step-by-step instructions on how to start a new Doks project. [Tutorial →](https://getdoks.org/tutorial/introduction/)
Start local development server:
### Quick Start
```bash
npm run start
```
{{< alert icon="👉" text="The Quick Start is intended for intermediate to advanced users." >}}
### Other commands
One page summary of how to start a new Doks project. [Quick Start →]({{< ref "quick-start" >}})
Doks comes with [commands for most used tasks]({{< ref "commands" >}}).
## Go further
## Quick start
Recipes, Reference Guides, Extensions, and Showcase.
Get your Doks site in 1 min.
### Recipes
<a class="btn btn-primary btn-sm px-3" href="https://app.netlify.com/start/deploy?repository=https://github.com/h-enk/doks" role="button">Deploy to Netlify</a>
Get instructions on how to accomplish common tasks with Doks. [Recipes →](https://getdoks.org/docs/recipes/project-configuration/)
## Example site
### Reference Guides
👉 [doks.netlify.app](https://doks.netlify.app/)
Learn how to customize Doks to fully make it your own. [Reference Guides →](https://getdoks.org/docs/reference-guides/security/)
## Documentation
### Extensions
- [Netlify](https://docs.netlify.com/)
- [Hugo](https://gohugo.io/documentation/)
- [Doks](https://getdoks.org/)
Get instructions on how to add even more to Doks. [Extensions →](https://getdoks.org/docs/extensions/add-google-fonts/)
## Communities
### Showcase
- [Netlify Community](https://community.netlify.com/)
- [Hugo Forums](https://discourse.gohugo.io/)
See what others have build with Doks. [Showcase →](https://getdoks.org/showcase/causal-data-science-meeting/)
## 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,65 @@
---
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
{{< alert icon="👉" text="Node.js is needed to install npm packages and run commands." >}}
Make sure all dependencies have been installed:
- [Hugo](https://gohugo.io/getting-started/installing/) >= 0.75.0/extended
- [Node.js](https://nodejs.org/) >= 14.15.0
## Start a new Doks project
Create a new site, change directories, install npm packages, 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 npm packages
{{< 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" >}})