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

@ -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" >}}).