feat: add flexsearch

This commit is contained in:
Henk Verlinde
2020-11-04 08:26:58 +01:00
parent 90cea786c1
commit 97d8e2c0e2
130 changed files with 4162 additions and 1763 deletions

View File

@ -1,23 +1,13 @@
---
title : "Doks"
description: "Hugo starter helping you build modern documentation websites."
date: 2020-04-17T08:47:36+00:00
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: [image-doks.png]
lead: "Hugo starter helping you build modern documentation websites."
images: []
---
<div class="row justify-content-center">
<div class="col-lg-5">
<h2 class="h4 mt-1">100/A+ scores</h2>
<p>Get perfect Google Lighthouse and <a href="https://observatory.mozilla.org/" target="_blank" rel="noreferrer noopener">Mozilla Observatory</a> scores by default.</p>
</div>
<div class="col-lg-5">
<h2 class="h4 mt-1">Algolia DocSearch</h2>
<p>The best search experience for docs, by <a href="https://docsearch.algolia.com/" target="_blank" rel="noreferrer noopener">Algolia</a>, for free.</p>
</div>
<div class="col-lg-5">
<h2 class="h4 mt-1">Dark/Light toggle</h2>
<p>Enable dark mode at night or in dark environments.</p>
</div>
</div>
<!--
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/h-enk/hyas "Deploy to Netlify")
-->

View File

@ -1,9 +0,0 @@
---
title: "Authors"
description: "The Doks Blog authors."
date: 2020-04-17T08:50:29+00:00
draft: false
images: [image-doks.png]
---
The Doks Blog authors

View File

@ -1,11 +0,0 @@
---
title: "Henk Verlinde"
description: "Creator of Doks."
date: 2020-04-17T08:50:45+00:00
draft: false
images: [image-doks.png]
---
Creator of Doks.
[@HenkVerlinde](https://twitter.com/henkverlinde)

View File

@ -1,7 +1,8 @@
---
title: "Blog"
description: "The Doks Blog."
date: 2020-04-17T08:49:55+00:00
description: "The Hyas Blog."
date: 2020-10-06T08:49:55+00:00
lastmod: 2020-10-06T08:49:55+00:00
draft: false
images: [image-doks.png]
images: []
---

View File

@ -1,9 +0,0 @@
---
title: "Say hello to Doks 👋"
description: "Doks is a Hugo starter helping you build modern documentation websites."
lead: "Doks is a Hugo starter helping you build modern documentation websites."
date: 2020-04-17T08:50:12+00:00
draft: false
images: [image-doks.png]
authors: ["Henk Verlinde"]
---

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -0,0 +1,55 @@
---
title: "Say hello to Hyas 👋"
description: "Introducing Hyas, a Hugo starter helping you build modern websites that are secure, fast, and SEO-ready — by default."
lead: "Introducing Hyas, a Hugo starter helping you build modern websites that are secure, fast, and SEO-ready — by default."
date: 2020-10-06T08:50:12+00:00
lastmod: 2020-10-06T08:50:12+00:00
draft: false
weight: 50
images: ["say-hello-to-hyas.png", "google-lighthouse-scores-hyas.png", "mozilla-observatory-scores-hyas.png"]
contributors: ["Henk Verlinde"]
---
## Solid as a rock
Some website projects require a solid starting point. With a great developer experience and a sound user experience. Sometimes you just don't want to start from scratch. That's why I created Hyas 💚
## This is how we do it
Making use of the power of Hugo. Following best practices for performance, SEO and security. Optimized for the Netlify platform. And always flexible, so you can easily make it your own.
## Say Whaaat?
- Security aware
- Fast by default ⚡️
- SEO-ready
- Development tools (linting, cleaning)
- Bootstrap framework
- Netlify-ready (functions, redirects, headers)
### 100 scores on Google Lighthouse
{{< img-simple src="google-lighthouse-scores-hyas.png" alt="Google Lighthouse Scores Hyas" >}}
Get 100 scores on [Google Lighthouse](https://googlechrome.github.io/lighthouse/viewer/?gist=8b7aec005ae7b9e128ad5c4e2f125fea) by default. Hyas removes unused css, prefetches links, and lazy loads images.
### A+ scores on Mozilla Observatory
Get A+ scores on [Mozilla Observatory](https://observatory.mozilla.org/analyze/hyas.netlify.app) out of the box. Easily change the default Security Headers to suit your needs.
### What's with the name?
Hyas used [Atlas](https://github.com/indigotree/atlas) 🙏 as a starting point. In Greek mythology,
[Hyas](https://www.greekmythology.com/Other_Gods/Minor_Gods/Hyas/hyas.html) was the son of the Titan Atlas and the Oceanid Aethra.
## Do what?
[Check out the docs]({{< ref "introduction" >}}) or [Deploy to Netlify](https://app.netlify.com/start/deploy?repository=https://github.com/h-enk/hyas) in less than a minute.
### Contribute
Contributions are welcome. Check the [Code of Conduct](https://github.com/h-enk/hyas/blob/master/CODE_OF_CONDUCT.md). [Suggest an idea](https://github.com/h-enk/hyas/issues/new?template=feature-request---.md), [Create a bug report](https://github.com/h-enk/hyas/issues/new?template=bug-report---.md), or [Improve the documentation](https://github.com/h-enk/gethyas.com/tree/master/content/docs).
### Star
Like Hyas? [Star the Hyas repo on GitHub](https://github.com/h-enk/hyas/stargazers). Thanks!

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

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

@ -0,0 +1,10 @@
---
title: "Contact"
description: "Email Henk Verlinde"
date: 2020-08-27T19:25:12+02:00
lastmod: 2020-08-27T19:25:12+02:00
draft: true
images: []
---
<p><script type="text/javascript" nonce="dXNlcj0iaGVsbG8iLGRvbWFpbj0iaGVua3ZlcmxpbmRlLmNvbSIsZG9jdW1lbnQud3JpdGUodXNlcisiQCIrZG9tYWluKTs=">user="hello",domain="henkverlinde.com",document.write(user+"@"+domain);</script><noscript>hello at henkverlinde.com</noscript></p>

View File

@ -0,0 +1,10 @@
---
title: "Contributors"
description: "The Hyas contributors."
date: 2020-10-06T08:50:29+00:00
lastmod: 2020-10-06T08:50:29+00:00
draft: false
images: []
---
The Hyas 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)

View File

@ -1,8 +1,9 @@
---
title : "Docs"
description: "Docs Doks."
description: "Docs Hyas."
lead: ""
date: 2020-04-17T08:48:23+00:00
date: 2020-10-06T08:48:23+00:00
lastmod: 2020-10-06T08:48:23+00:00
draft: false
images: [image-doks.png]
images: []
---

View File

@ -0,0 +1,9 @@
---
title: "Basic Hyas"
description: "Basic Hyas."
lead: ""
date: 2020-04-20T11:52:49+02:00
lastmod: 2020-04-20T11:52:49+02:00
draft: false
images: []
---

View File

@ -0,0 +1,53 @@
---
title: "Archetypes"
description: ""
lead: ""
date: 2020-09-21T13:58:42+02:00
lastmod: 2020-09-21T13:58:42+02:00
draft: false
images: []
menu:
docs:
parent: "basic-hyas"
weight: 130
toc: true
---
```bash
..
├── blog.md
└── default.md
```
See also the Hugo docs: [Archetypes](https://gohugo.io/content-management/archetypes/).
## blog.md
```md
---
title: "{{ replace .Name "-" " " | title }}"
description: ""
excerpt: ""
date: {{ .Date }}
lastmod: {{ .Date }}
draft: true
weight: 50
images: ["{{ .Name | urlize }}.jpg"]
categories: [""]
---
{{</* img src="{{ .Name | urlize }}.jpg" alt="{{ replace .Name "-" " " | title }}" caption="{{ replace .Name "-" " " | title }}" class="wide" */>}}
```
## default.md
```md
---
title: "{{ replace .Name "-" " " | title }}"
description: ""
date: {{ .Date }}
lastmod: {{ .Date }}
draft: true
images: []
---
```

View File

@ -0,0 +1,32 @@
---
title: "Assets"
description: ""
lead: ""
date: 2020-09-21T14:41:53+02:00
lastmod: 2020-09-21T14:41:53+02:00
draft: false
images: []
menu:
docs:
parent: "basic-hyas"
weight: 140
toc: true
---
```bash
..
├── fonts/
├── images/
├── js/
│ ├── vendor/
│ └── app.js
├── lambda/
└── scss/
├── common/
├── components/
├── layouts/
├── vendor/
└── app.scss
```
See also the Hugo docs: [Hugo Pipes](https://gohugo.io/hugo-pipes/).

View File

@ -0,0 +1,34 @@
---
title: "Deployment"
description: "Deployment Hyas."
lead: "Hyas is optimized for deployment to Netlify, but you can use any other static web host if you prefer."
date: 2020-04-20T12:46:25+02:00
lastmod: 2020-04-20T12:46:25+02:00
draft: false
images: []
menu:
docs:
parent: "basic-hyas"
weight: 160
toc: true
---
```bash
yarn build
```
## Netlify
See also: [Netlify]({{< ref "netlify" >}}).
### Netlify Drop
Netlify Drop lets you deploy a website with simply drag & drop.
- Run `yarn build` in your project folder.
- This will generate a `public` folder where your generated site is located.
- Visit [Netlify Drop](https://app.netlify.com/drop) and drop the `public` folder there.
## Other hosting options
See the Hugo Docs: [Hosting & Deployment](https://gohugo.io/hosting-and-deployment/).

View File

@ -0,0 +1,185 @@
---
title: "Directory Structure"
description: "The Hyas project directory structure extends Hugo's."
lead: "The Hyas project directory structure extends Hugo's."
date: 2020-04-20T14:14:16+02:00
lastmod: 2020-04-20T14:14:16+02:00
draft: false
images: []
menu:
docs:
parent: "basic-hyas"
weight: 110
toc: true
---
```bash
.
├── archetypes/
├── assets/
├── config/
├── content/
├── data/
├── layouts/
├── static/
├── .eslintignore
├── .eslintrc.json
├── .markdownlint.json
├── .markdownlintignore
├── .stylelintignore
├── .stylelintrc.json
├── babel.config.js
├── netlify.toml
└── package.json
```
See also the Hugo docs: [Directory Structure](https://gohugo.io/getting-started/directory-structure/).
## Root directories
### archetypes
```bash
..
├── blog.md
└── default.md
```
See also: [Archetypes]({{< ref "archetypes" >}}).
### assets
```bash
..
├── fonts/
├── images/
├── js/
│ ├── vendor/
│ └── app.js
├── lambda/
└── scss/
├── common/
├── components/
├── layouts/
├── vendor/
└── app.scss
```
See also: [Assets]({{< ref "assets" >}})
### config
```bash
..
├── _default/
│ ├── config.toml
│ ├── menus.toml
│ └── params.toml
├── production/
├── staging/
└── postcss.config.js
```
See also: [Project Configuration]({{< ref "project-configuration" >}}).
### content
```bash
..
├── blog/
├── quick-start/
└── _index.md
```
See also the Hugo docs: [Content Organization](https://gohugo.io/content-management/organization/).
### data
See the Hugo docs: [Data Templates](https://gohugo.io/templates/data-templates/).
### layouts
```bash
..
├── _default/
│ ├── baseof.html
│ ├── list.html
│ └── single.html
├── blog/
│ └── single.html
├── categories/
│ ├── list.html
│ └── terms.html
├── partials/
│ ├── content/
│ ├── footer/
│ │ ├── footer.html
│ │ └── script-footer.html
│ ├── head/
│ │ ├── favicons.html
│ │ ├── head.html
│ │ ├── opengraph.html
│ │ ├── resource-hints.html
│ │ ├── script-header.html
│ │ ├── seo.html
│ │ ├── structured-data.html
│ │ ├── stylesheet.html
│ │ └── twitter_cards.html
│ ├── header/
│ │ ├── alert.html
│ │ └── header.html
│ └── sidebar/
├── shortcodes/
│ └── img.html
├── 404.html
├── index.headers
├── index.html
├── index.redirects
├── robots.txt
├── rss.xml
└── sitemap.xml
```
See also: [Layouts]({{< ref "layouts" >}}).
### static
See the Hugo docs: [Static Files](https://gohugo.io/content-management/static-files/)
## Root files
### .eslintignore
See the ESLint docs: [Ignoring Files and Directories](https://eslint.org/docs/user-guide/configuring#ignoring-files-and-directories).
### .eslintrc.json
See the ESLint docs: [Configuring ESLint](https://eslint.org/docs/user-guide/configuring).
### .markdownlint.json
See the markdownlint Readme: [Rules / Aliases](https://github.com/DavidAnson/markdownlint#rules--aliases).
### .markdownlintignore
See the markdownlint-cli Readme: [Ignoring Files](https://github.com/igorshubovych/markdownlint-cli#ignoring-files).
### .stylelintignore
See the stylelint docs: [Ignoring code](https://stylelint.io/user-guide/ignore-code).
### .stylelintrc.json
See the stylelint docs: [Configuration](https://stylelint.io/user-guide/configure).
### babel.config.js
See the Babel docs: [Configure Babel](https://babeljs.io/docs/en/configuration).
### netlify.toml
See the Netlify docs: [File-based configuration](https://docs.netlify.com/configure-builds/file-based-configuration/).
### package.json
See the Yarn Documentation: [package.json](https://classic.yarnpkg.com/en/docs/package-json/).

View File

@ -0,0 +1,57 @@
---
title: "Layouts"
description: ""
lead: ""
date: 2020-09-21T14:13:01+02:00
lastmod: 2020-09-21T14:13:01+02:00
draft: false
images: []
menu:
docs:
parent: "basic-hyas"
weight: 150
toc: true
---
```bash
..
├── _default/
│ ├── baseof.html
│ ├── list.html
│ └── single.html
├── blog/
│ └── single.html
├── categories/
│ ├── list.html
│ └── terms.html
├── partials/
│ ├── content/
│ ├── footer/
│ │ ├── footer.html
│ │ └── script-footer.html
│ ├── head/
│ │ ├── favicons.html
│ │ ├── head.html
│ │ ├── opengraph.html
│ │ ├── resource-hints.html
│ │ ├── script-header.html
│ │ ├── seo.html
│ │ ├── structured-data.html
│ │ ├── stylesheet.html
│ │ └── twitter_cards.html
│ ├── header/
│ │ ├── alert.html
│ │ └── header.html
│ └── sidebar/
├── shortcodes/
│ └── img.html
├── 404.html
├── index.headers
├── index.html
├── index.redirects
├── robots.txt
├── rss.xml
└── sitemap.xml
```
See also the Hugo docs: [Templates](https://gohugo.io/templates/).

View File

@ -0,0 +1,142 @@
---
title: "Project Configuration"
description: "The Hyas project configuration extends Hugo's."
lead: "The Hyas project configuration extends Hugo's."
date: 2020-09-21T12:19:02+02:00
lastmod: 2020-09-21T12:19:02+02:00
draft: false
images: []
menu:
docs:
parent: "basic-hyas"
weight: 120
toc: true
---
```bash
..
├── _default/
│ ├── config.toml
│ ├── menus.toml
│ └── params.toml
├── production/
├── staging/
└── postcss.config.js
```
See also the Hugo docs: [Configure Hugo](https://gohugo.io/getting-started/configuration/).
## config.toml
### Netlify specifics
```toml
# add redirects/headers
[outputs]
home = ["HTML", "RSS", "REDIRECTS", "HEADERS"]
# 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
```
## menus.toml
No specifics.
## params.toml
### SEO specifics
```toml
title = "Hyas"
titleSeparator = "-"
titleAddition = "Modern Hugo Starter"
description = "Hugo starter helping you build modern websites."
images = ["hyas.png"]
twitterSite = "@henkverlinde"
twitterCreator = "@henkverlinde"
facebookAuthor = "verlinde.henk"
facebookPublisher = "verlinde.henk"
ogLocale = "en_US"
schemaType = "Organization"
schemaLogo = "logo-hyas.png"
schemaTwitter = "https://twitter.com/henkverlinde"
schemaLinkedIn = "https://www.linkedin.com/in/henkverlinde/"
schemaGitHub = "https://github.com/h-enk"
schemaSection = "blog"
siteLinksSearchBox = false
themeColor = "#fff"
```
### Image shortcode
```toml
quality = 85
bgColor = "#fff"
landscapePhotoWidths = [1000, 800, 700, 600, 500]
portraitPhotoWidths = [800, 700, 600, 500]
lqipWidth = "20x"
```
### Footer
```toml
footer = "© 2020 Henk Verlinde - MIT License"
```
### Alert
```toml
alert = false
alertText = "Deliver web projects 10x faster. <a class=\"alert-link\" href=\"https://www.netlify.com/whitepaper/\">Get the free enterprise paper →</a>"
```
## postcss.config.js
```js
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',
],
whitelist: [
'lazyloaded',
...whitelister([
'./assets/scss/components/_syntax.scss',
'./assets/scss/components/_code.scss',
]),
],
}),
],
}
```
See also: [Unused CSS removal]({{< ref "performance#unused-css-removal" >}}).

View File

@ -0,0 +1,9 @@
---
title: "Assets"
description: "Assets Hyas."
lead: ""
date: 2020-04-20T11:52:58+02:00
lastmod: 2020-04-20T11:52:58+02:00
draft: false
images: []
---

View File

@ -0,0 +1,15 @@
---
title: "Bootstrap"
description: "Build robust, flexible, and intuitive websites with Bootstrap. Or use any other front-end framework if you prefer."
lead: "Build robust, flexible, and intuitive websites with Bootstrap. Or use any other front-end framework if you prefer."
date: 2020-09-21T16:00:43+02:00
lastmod: 2020-09-21T16:00:43+02:00
draft: false
images: []
menu:
docs:
parent: "core-hyas"
weight: 250
toc: true
---

View File

@ -0,0 +1,15 @@
---
title: "Development Tools"
description: "Code with confidence. Check styles, scripts, and markdown for errors and fix automatically or manually."
lead: "Code with confidence. Check styles, scripts, and markdown for errors and fix automatically or manually."
date: 2020-09-21T14:26:38+02:00
lastmod: 2020-09-21T14:26:38+02:00
draft: false
images: []
menu:
docs:
parent: "core-hyas"
weight: 240
toc: true
---

View File

@ -0,0 +1,91 @@
---
title: "Netlify"
description: "Deploy to Netlify with sensible defaults. Easily use Netlify Functions, Netlify Redirects, and Netlify Headers."
lead: "Deploy to Netlify with sensible defaults. Easily use Netlify Functions, Netlify Redirects, and Netlify Headers."
date: 2020-09-21T15:58:12+02:00
lastmod: 2020-09-21T15:58:12+02:00
draft: false
images: []
menu:
docs:
parent: "core-hyas"
weight: 260
toc: true
---
```bash
.
├── assets/
│ └── lambda/
├── layouts/
│ ├── index.headers
│ └── index.redirects
└── netlify.toml
```
See also the Hugo Docs: [Host on Netlify](https://gohugo.io/hosting-and-deployment/hosting-on-netlify/).
## Functions
Functions in `./assets/lambda/` are compiled on build to `./functions/`.
See also the Netlify docs: [Functions overview](https://docs.netlify.com/functions/overview/)
## Redirects
`./layouts/index.redirects` is converted on build to `./public/_redirects`.
```bash
{{ range $pages := .Site.Pages -}}
{{ range .Aliases -}}
{{ . }} {{ $pages.RelPermalink -}}
{{ end -}}
{{ end -}}
```
See also the Netlify docs: [Redirects and rewrites](https://docs.netlify.com/routing/redirects/)
## Headers
`./layouts/index.headers` is converted on build to `./public/_headers`.
```bash
/*
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Security-Policy: default-src 'none'; manifest-src 'self'; connect-src 'self'; font-src 'self'; img-src 'self'; script-src 'self'; style-src 'self'
X-Frame-Options: SAMEORIGIN
Referrer-Policy: strict-origin
Feature-Policy: geolocation 'self'
Cache-Control: public, max-age=31536000
```
See also the Netlify docs: [Custom headers](https://docs.netlify.com/routing/headers/)
## Build and deploy
`./netlify.toml`:
```toml
[build]
publish = "public"
functions = "functions"
[build.environment]
HUGO_VERSION = "0.74.3"
NODE_VERSION = "13.11.0"
NPM_VERSION = "6.13.7"
YARN_VERSION = "1.22.4"
[context.production]
command = "hugo -b $URL --gc --minify && npm run build:functions"
[context.deploy-preview]
command = "hugo -b $DEPLOY_PRIME_URL --gc --minify"
[context.branch-deploy]
command = "hugo -b $DEPLOY_PRIME_URL --gc --minify"
```
See also the Netlify docs: [File-based configuration](https://docs.netlify.com/configure-builds/file-based-configuration/)

View File

@ -0,0 +1,61 @@
---
title: "Performance"
description: "Get 100 scores on Google Lighthouse by default. Hyas removes unused css, prefetches links, and lazy loads images."
lead: "Get 100 scores on <a href=\"https://googlechrome.github.io/lighthouse/viewer/?gist=8b7aec005ae7b9e128ad5c4e2f125fea\">Google Lighthouse</a> by default. Hyas removes unused css, prefetches links, and lazy loads images."
date: 2020-09-17T15:37:44+02:00
lastmod: 2020-09-17T15:37:44+02:00
draft: false
images: []
menu:
docs:
parent: "core-hyas"
weight: 220
toc: true
---
## Unused CSS removal
`./config/postcss.config.js`:
```js
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',
],
whitelist: [
'lazyloaded',
...whitelister([
'./assets/scss/components/_syntax.scss',
'./assets/scss/components/_code.scss',
]),
],
}),
],
}
```
See also the PurgeCSS docs: [Configuration](https://purgecss.com/configuration.html), and the Purgecss Whitelister [Readme](https://github.com/qodesmith/purgecss-whitelister#readme).
## Asset minification
Hyas uses [Hugo](https://gohugo.io/hugo-pipes/minification/) to minify CSS, JS and HTML.
## Link prefetching
Hyas uses [instant.page](https://instant.page/) with default settings for link prefetching. By default, instant.page preloads 65 ms after hovering a link and when a mobile user starts touching their display.
See also the instant.page website: [Intensity](https://instant.page/intensity).
## Lazy loading images
Hyas uses [lazysizes](https://github.com/aFarkas/lazysizes) with a Low Quality Image Placeholder (LQIP) to lazyload images added with the [image shortcode]({{< ref "layouts" >}}). The LQIP is blurred with a CSS filter.
See also the lazysizes [Readme](https://github.com/aFarkas/lazysizes#readme)

View File

@ -0,0 +1,37 @@
---
title: "Security"
description: "Get A+ scores on Mozilla Observatory out of the box. Easily change the default Security Headers to suit your needs."
lead: "Get A+ scores on <a href=\"https://observatory.mozilla.org/analyze/hyas.netlify.app\">Mozilla Observatory</a> out of the box. Easily change the default Security Headers to suit your needs."
date: 2020-09-17T13:48:09+02:00
lastmod: 2020-09-17T13:48:09+02:00
draft: false
images: []
menu:
docs:
parent: "core-hyas"
weight: 210
toc: true
---
## Security Headers
`./layouts/index.headers` excerpt:
```bash
/*
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Security-Policy: default-src 'none'; manifest-src 'self'; connect-src 'self'; font-src 'self'; img-src 'self'; script-src 'self'; style-src 'self'
X-Frame-Options: SAMEORIGIN
Referrer-Policy: strict-origin
```
See also: [Headers]({{< ref "netlify#headers" >}}).
### Content Security Policy
💡 [Laboratory](https://addons.mozilla.org/nl/firefox/addon/laboratory-by-mozilla/) is an experimental Firefox extension that helps you generate a Content Security Policy (CSP) header for your website.
## Subresource Integrity
[Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) is implemented with [Hugo](https://gohugo.io/hugo-pipes/fingerprint/) on styles and scripts.

View File

@ -0,0 +1,15 @@
---
title: "SEO"
description: "Use sensible defaults for structured data, open graph, and Twitter cards. Or easily change the SEO settings to your liking."
lead: "Use sensible defaults for structured data, open graph, and Twitter cards. Or easily change the SEO settings to your liking."
date: 2020-09-18T14:25:19+02:00
lastmod: 2020-09-18T14:25:19+02:00
draft: false
images: []
menu:
docs:
parent: "core-hyas"
weight: 230
toc: true
---

View File

@ -0,0 +1,9 @@
---
title: "Guides"
description: "Guides Hyas"
lead: ""
date: 2020-04-20T11:53:07+02:00
lastmod: 2020-04-20T11:53:07+02:00
draft: false
images: []
---

View File

@ -0,0 +1,15 @@
---
title: "Add Custom Fonts"
description: ""
lead: ""
date: 2020-09-21T14:28:38+02:00
lastmod: 2020-09-21T14:28:38+02:00
draft: false
images: []
menu:
docs:
parent: "guides"
weight: 310
toc: true
---

View File

@ -0,0 +1,15 @@
---
title: "Add External Scripts"
description: ""
lead: ""
date: 2020-09-21T14:28:51+02:00
lastmod: 2020-09-21T14:28:51+02:00
draft: false
images: []
menu:
docs:
parent: "guides"
weight: 320
toc: true
---

View File

@ -1,8 +1,9 @@
---
title: "Help"
description: "Help Doks."
description: "Help Hyas."
lead: ""
date: 2020-04-17T08:49:15+00:00
date: 2020-10-06T08:49:15+00:00
lastmod: 2020-10-06T08:49:15+00:00
draft: false
images: [image-doks.png]
images: []
---

View File

@ -1,22 +1,30 @@
---
title: "FAQ"
description: "FAQ Doks."
description: "FAQ Hyas."
lead: ""
date: 2020-04-17T08:49:31+00:00
date: 2020-10-06T08:49:31+00:00
lastmod: 2020-10-06T08:49:31+00:00
draft: false
images: [image-doks.png]
images: []
menu:
docs:
parent: "help"
weight: 110
weight: 410
toc: true
---
## Where to start from here?
Please make sure to check out the documentation:
- [Hugo](https://gohugo.io/documentation/)
- [Hyas](https://gethyas.com/)
- [Doks](https://getdoks.org/)
## What's with the name?
Hyas used [Atlas](https://github.com/indigotree/atlas) 🙏 as a starting point. In Greek mythology,
[Hyas](https://www.greekmythology.com/Other_Gods/Minor_Gods/Hyas/hyas.html) was the son of the Titan Atlas and the Oceanid Aethra.
## Can I get support?
Visit [Hugo Discourse](https://discourse.gohugo.io/) and use the search. It that does not help, start a new topic and ask your questions.
Visit [Hugo Discourse](https://discourse.gohugo.io/) and use the search. If that does not help, start a new topic and ask your question.
## Keyboard shortcuts for search?
- focus: `/`
- select: `↓` and `↑`
- open: `Enter`
- close: `Esc`

View File

@ -1,8 +1,9 @@
---
title : "Prologue"
description: "Prologue Doks."
description: "Prologue Hyas."
lead: ""
date: 2020-04-17T08:48:45+00:00
date: 2020-10-06T08:48:45+00:00
lastmod: 2020-10-06T08:48:45+00:00
draft: false
images: [image-doks.png]
images: []
---

View File

@ -0,0 +1,92 @@
---
title: "Commands"
description: "Repository commands."
lead: "Repository commands."
date: 2020-10-13T15:21:01+02:00
lastmod: 2020-10-13T15:21:01+02:00
draft: false
images: []
menu:
docs:
parent: "prologue"
weight: 030
toc: true
---
## start
Start local development server:
```bash
yarn start
```
## build
Build production website:
```bash
yarn build
```
### :functions
```bash
yarn build:functions
```
### :preview
```bash
yarn build:preview
```
## server
Start local development server:
```bash
yarn server
```
## clean
Delete temporary directories:
```bash
yarn clean
```
## lint
Check scripts, styles, and markdown for errors:
```bash
yarn lint
```
### :scripts
```bash
yarn lint:scripts [--fix]
```
### :styles
```bash
yarn lint:styles [--fix]
```
### :markdown
```bash
yarn lint:markdown [--fix]
```
## test
Check scripts, styles, and markdown for errors:
```bash
yarn test
```

View File

@ -0,0 +1,103 @@
---
title: "Hyas CLI"
description: "Hyas command line tool."
lead: "Hyas command line tool."
date: 2020-09-22T08:38:48+02:00
lastmod: 2020-09-22T08:38:48+02:00
draft: false
images: []
menu:
docs:
parent: "prologue"
weight: 020
toc: true
---
```bash
Usage: hyas <command> [options]
Commands:
build Build production website
clean Delete temporary directories
create [dir] Create a new Hyas project
start Start local development server
Options:
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
Run hyas <command> --help for detailed usage of given command.
```
## Installation
Install the [Hyas CLI](https://www.npmjs.com/package/@hyas/cli) globally:
```bash
yarn add global @hyas/cli
```
```bash
npm install -g @hyas/cli
```
## npx
Or use [npx](https://nodejs.dev/learn/the-npx-nodejs-package-runner):
```bash
npx @hyas/cli <command> [options]
```
## Commands
### Create
Create a new Hyas project:
```bash
hyas create [dir]
```
### Start
Start local development server:
```bash
hyas start
```
### Build
Build production website:
```bash
hyas build
```
### Clean
Delete temporary directories:
```bash
hyas clean
```
## Options
### -h, --help
Show help.
### -v, --version
Show version number.
## Update
You'll get notified when an update is available:
```bash
Update available: 0.3.2
Run npm install -g @hyas/cli to update
```

View File

@ -1,10 +1,11 @@
---
title: "Introduction"
description: "Introduction Doks."
lead: "Doks is a Hugo starter helping you build modern documentation websites."
date: 2020-04-17T08:48:57+00:00
description: "Introduction Hyas."
lead: "Hyas is a Hugo starter helping you build modern 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: [image-doks.png]
images: []
menu:
docs:
parent: "prologue"
@ -12,55 +13,92 @@ weight: 010
toc: true
---
## Features
- Lightweight code base
- 100 scores Google Lighthouse
- A+ scores [Mozilla Observatory](https://observatory.mozilla.org/)
- [Algolia DocSearch](https://docsearch.algolia.com/) support
- Dark/Light toggle
- Blog ready
- Easily make it your own
- All in [Hyas](https://github.com/h-enk/hyas)
## Why Hyas?
See a working example at [doks.netlify.app](https://doks.netlify.app/)
Six reasons why you should use Hyas:
## Requirements
1. __Security aware__. Get A+ scores on [Mozilla Observatory](https://observatory.mozilla.org/analyze/hyas.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=8b7aec005ae7b9e128ad5c4e2f125fea) by default. Hyas 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.
## Prerequisites
Make sure all dependencies have been installed:
- [Hugo](https://gohugo.io/) >= 0.69.0/extended
- [Node.js](https://nodejs.org/) >= 13.11.0
- [Yarn](https://yarnpkg.com/) >= 1.22.4 (recommended)
- [Hugo](https://gohugo.io/) >= 0.75.1/extended
- [Node.js](https://nodejs.org/) >= 14.12.0
- [Yarn](https://yarnpkg.com/) >= 1.22.5 (recommended)
{{< alert icon="💡" text="npm (comes with Node.js) and Yarn are both Node.js package managers. <a href=\"https://classic.yarnpkg.com/en/\">Yarn</a> is faster, more reliable, and more secure than npm." >}}
## Get started
Create a new Doks project:
Three ways to get started.
### Hyas CLI
Install the Hyas CLI globally:
```bash
$ git clone git@github.com:h-enk/doks.git my-doks-site
yarn add global @hyas/cli
```
Create a new Hyas project:
```bash
hyas create [dir]
```
#### npx
Or use [npx](https://nodejs.dev/learn/the-npx-nodejs-package-runner):
```bash
npx @hyas/cli create my-hyas-site
```
See also: [Hyas CLI]({{< ref "hyas-cli" >}}).
### Repository clone
Create a new Hyas project:
```bash
git clone git@github.com:h-enk/hyas.git my-hyas-site
```
Install dependencies:
```bash
# @ my-doks-site/
$ yarn install
yarn install
```
Build development theme with live reloading and injection:
Start local development server:
```bash
# @ my-doks-site/
$ yarn start
yarn start
```
### Other commands
- `yarn lint:styles` - Check Sass for errors
- `yarn lint:scripts` - Check JavaScript for errors
- `yarn clean` - Delete temporary directories
- `yarn build` - Build production theme
See also: [commands]({{< ref "commands" >}}).
## Documentation
- [Hugo](https://gohugo.io/documentation/)
- [Hyas](https://gethyas.com/)
- [Doks](https://getdoks.org/)
### Netlify deploy
Get your Hyas site in 1 min.
<a class="btn btn-primary btn-sm px-3" href="https://app.netlify.com/start/deploy?repository=https://github.com/h-enk/hyas" role="button">Deploy to Netlify</a>
<!--
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/h-enk/hyas "Deploy to Netlify")
-->
## Example site
👉 [hyas.netlify.app](https://hyas.netlify.app/)

View File

@ -0,0 +1,36 @@
---
title: "Privacy Policy"
description: "Privacy Policy gethyas.com"
date: 2020-08-27T19:23:18+02:00
lastmod: 2020-08-27T19:23:18+02:00
draft: true
images: []
---
__TLDR__: I do not use cookies and I 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 I collect and what I use it for
I run [Plausible](https://plausible.io/) analytics on gethyas.com. The following information is collected:
- __Page URL__. I track the page URL of each page view on this website. I use this to understand which pages have been viewed and how many times a particular page has been viewed. For example: _https://gethyas.com/_.
- __HTTP Referrer__. I 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__. I 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__. I use this to understand what operating systems people use when visiting this website. I 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__. I 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__. I look up the visitors country using the IP address. I do not track anything more granular than the country of origin and the IP address of the visitor is discarded. I never store IP addresses in my database or logs. For example: _Canada_.
## Contact me
[Contact me]({{< ref "contact/index.md" >}}) if you have any questions.
Effective Date: _20th July 2020_