Page not found
-The page you requested could not be found.
+Page not found :(
+The page you are looking for doesn't exist or has been moved.
diff --git a/.eslintignore b/.eslintignore index e258d0c..e9d09b5 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,3 @@ +assets/js/index.js assets/js/vendor node_modules \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 282ab12..0f02f7c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -12,7 +12,7 @@ on: # The branches below must be a subset of the branches above branches: [master] schedule: - - cron: '0 22 * * 1' + - cron: '0 11 * * 5' jobs: analyze: diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..a8b885d --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,10 @@ +{ + "comment": "Hyas rules", + + "default": true, + "line_length": false, + "no-inline-html": false, + "no-trailing-punctuation": false, + "no-duplicate-heading": false, + "no-bare-urls": false +} \ No newline at end of file diff --git a/.markdownlintignore b/.markdownlintignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/.markdownlintignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/.stylelintignore b/.stylelintignore index ee4dea9..3972095 100644 --- a/.stylelintignore +++ b/.stylelintignore @@ -1,3 +1,3 @@ -assets/scss/common/_syntax.scss +assets/scss/components/_syntax.scss assets/scss/vendor node_modules \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 2f60d90..c6f94d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ sudo: required language: node_js node_js: - "lts/*" - - "13" + - "14" install: - wget "https://github.com/gohugoio/hugo/releases/download/v${HUGO_RELEASE}/hugo_extended_${HUGO_RELEASE}_Linux-64bit.deb" @@ -20,4 +20,4 @@ script: env: global: - PRODUCTION=true - - HUGO_RELEASE=0.69.0 \ No newline at end of file + - HUGO_RELEASE=0.75.1 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a6016d..8e4f093 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,16 +1,25 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] -### Removed -- negative margin `navbar-brand` -## [0.1.0] - 2020-04-16 +## [0.1.1] - 2020-09-29 + ### Added -- [Hyas](https://github.com/h-enk/hyas), Copyright (c) 2019 Henk Verlinde, [MIT License](https://github.com/h-enk/hyas/blob/master/LICENSE) -[Unreleased]: https://github.com/h-enk/doks/compare/v0.1.0...HEAD -[0.1.0]: https://github.com/h-enk/doks/releases/tag/v0.1.0 +- Base documentation + +## [0.1.0] - 2020-07-10 + +### Added + +- [Feather](https://github.com/feathericons/feather), Copyright (c) 2013-2017 Cole Bemis, [MIT License](https://github.com/feathericons/feather/blob/master/LICENSE) +- [Hyas](https://github.com/h-enk/hyas), Copyright (c) 2020 Henk Verlinde, [MIT License](https://github.com/h-enk/hyas/blob/master/LICENSE) + +[Unreleased]: https://github.com/h-enk/gethyas.com/compare/v0.1.1...HEAD +[0.1.1]: https://github.com/h-enk/gethyas.com/releases/tag/v0.1.1 +[0.1.0]: https://github.com/h-enk/gethyas.com/releases/tag/v0.1.0 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..3d7d695 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at henk@henkverlinde.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/LICENSE b/LICENSE index d060f61..13fef13 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 Henk Verlinde +Copyright (c) 2020 Henk Verlinde Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 92392ac..e10f4d4 100644 --- a/README.md +++ b/README.md @@ -1,59 +1,5 @@ -# Doks -[![GitHub release](https://img.shields.io/github/release/h-enk/doks.svg?style=flat-square)](https://github.com/h-enk/doks/releases) -[![Build Status](https://img.shields.io/travis/h-enk/doks.svg?style=flat-square)](https://travis-ci.com/github/h-enk/doks) -[![Netlify](https://img.shields.io/netlify/8a1009d5-88ac-413e-96ef-3f928674a083?style=flat-square)](https://doks.netlify.app/) +# Hyas website -Doks is a Hugo starter helping you build modern documentation websites. - -## 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) - -See a working example at [doks.netlify.app](https://doks.netlify.app/) - -## Requirements - -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) - -## Get started - -Create a new Doks project: - -```bash -$ git clone git@github.com:h-enk/doks.git my-doks-site -``` - -Install dependencies: - -```bash -# @ my-doks-site/ -$ yarn install -``` - -Build development theme with live reloading and injection: - -```bash -# @ my-doks-site/ -$ 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 - -## Documentation -- [Hugo](https://gohugo.io/documentation/) -- [Hyas](https://gethyas.com/) -- [Doks](https://getdoks.org/) +[![GitHub release](https://img.shields.io/github/release/h-enk/gethyas.com.svg?style=flat-square)](https://github.com/h-enk/gethyas.com/releases) +[![Build Status](https://img.shields.io/travis/h-enk/gethyas.com.svg?style=flat-square)](https://travis-ci.com/github/h-enk/gethyas.com) +[![Netlify](https://img.shields.io/netlify/72c25737-babf-44b6-98a5-eeb6861ac904?style=flat-square)](https://gethyas.com/) diff --git a/archetypes/blog.md b/archetypes/blog.md index 1b96724..b495210 100644 --- a/archetypes/blog.md +++ b/archetypes/blog.md @@ -3,9 +3,11 @@ title: "{{ replace .Name "-" " " | title }}" description: "" lead: "" date: {{ .Date }} +lastmod: {{ .Date }} draft: true -images: {{ .Site.Params.images }} -authors: [""] +weight: 50 +images: ["{{ .Name | urlize }}.jpg"] +contributors: ["Henk Verlinde"] --- -{{< img src="" alt="" caption="" class="wide" >}} +{{< img src="{{ .Name | urlize }}.jpg" alt="{{ replace .Name "-" " " | title }}" caption="{{ replace .Name "-" " " | title }}" class="wide" >}} diff --git a/archetypes/default.md b/archetypes/default.md index 383c33d..d8210df 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -2,6 +2,7 @@ title: "{{ replace .Name "-" " " | title }}" description: "" date: {{ .Date }} +lastmod: {{ .Date }} draft: true -images: {{ .Site.Params.images }} +images: [] --- diff --git a/archetypes/docs.md b/archetypes/docs.md index 906f8f9..e572def 100644 --- a/archetypes/docs.md +++ b/archetypes/docs.md @@ -3,8 +3,9 @@ title: "{{ replace .Name "-" " " | title }}" description: "" lead: "" date: {{ .Date }} +lastmod: {{ .Date }} draft: true -images: {{ .Site.Params.images }} +images: [] menu: docs: parent: "" @@ -12,4 +13,4 @@ weight: 999 toc: true --- -{{< img src="" alt="" caption="" class="wide" >}} +{{< img src="{{ .Name | urlize }}.jpg" alt="{{ replace .Name "-" " " | title }}" caption="{{ replace .Name "-" " " | title }}" class="wide" >}} diff --git a/assets/js/app.js b/assets/js/app.js index 0f89b97..4db9115 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -1,8 +1,164 @@ +/* global FlexSearch docs:true a:true t:true d:true */ + document.getElementById('mode').addEventListener('click', () => { + document.body.classList.toggle('dark'); localStorage.setItem('theme', document.body.classList.contains('dark') ? 'dark' : 'light'); + }); if (localStorage.getItem('theme') === 'dark') { + document.body.classList.add('dark'); + } + +/* eslint-disable */ +/* +window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) } + +if (document.querySelector('#deploy-to-netlify') !== null) { + + document.getElementById('deploy-to-netlify').addEventListener('click', function(){ + plausible('Deploy to Netlify'); + }); + +} +*/ +/* eslint-enable */ + +var suggestions = document.getElementById('suggestions'); +var userinput = document.getElementById('userinput'); + +document.addEventListener('keydown', inputFocus); + +function inputFocus(e) { + + if (e.keyCode === 191 ) { + e.preventDefault(); + userinput.focus(); + } + + if (e.keyCode === 27 ) { + userinput.blur(); + suggestions.classList.add('d-none'); + } + +} + +document.addEventListener('click', function(event) { + + var isClickInsideElement = suggestions.contains(event.target); + + if (!isClickInsideElement) { + suggestions.classList.add('d-none'); + } + +}); + + +/* +Source: + - https://dev.to/shubhamprakash/trap-focus-using-javascript-6a3 +*/ + +document.addEventListener('keydown',suggestionFocus); + +function suggestionFocus(e){ + + const focusableSuggestions= suggestions.querySelectorAll('a'); + const focusable= [...focusableSuggestions]; + const index = focusable.indexOf(document.activeElement); + + let nextIndex = 0; + + if (e.keyCode === 38) { + e.preventDefault(); + nextIndex= index > 0 ? index-1 : 0; + focusableSuggestions[nextIndex].focus(); + } + else if (e.keyCode === 40) { + e.preventDefault(); + nextIndex= index+1 < focusable.length ? index+1 : index; + focusableSuggestions[nextIndex].focus(); + } + +} + + +/* +Source: + - https://github.com/nextapps-de/flexsearch#index-documents-field-search + - https://raw.githack.com/nextapps-de/flexsearch/master/demo/autocomplete.html +*/ + +(function(){ + + var index = new FlexSearch({ + preset: 'score', + cache: true, + doc: { + id: 'id', + field: [ + 'title', + 'description', + 'content', + ], + store: [ + 'href', + 'title', + 'description', + ], + }, + }); + + index.add(docs); + + userinput.addEventListener('input', show_results, true); + suggestions.addEventListener('click', accept_suggestion, true); + + function show_results(){ + + var value = this.value; + var results = index.search(value, 5); + var entry, childs = suggestions.childNodes; + var i = 0, len = results.length; + + suggestions.classList.remove('d-none'); + + results.forEach(function(page) { + + entry = document.createElement('div'); + + entry.innerHTML = ''; + + a = entry.querySelector('a'), + t = entry.querySelector('span:first-child'), + d = entry.querySelector('span:nth-child(2)'); + + a.href = page.href; + t.textContent = page.title; + d.textContent = page.description; + + suggestions.appendChild(entry); + + }); + + while(childs.length > len){ + + suggestions.removeChild(childs[i]) + } + + } + + function accept_suggestion(){ + + while(suggestions.lastChild){ + + suggestions.removeChild(suggestions.lastChild); + } + + return false; + } + +}()); diff --git a/assets/js/index.js b/assets/js/index.js new file mode 100644 index 0000000..82dfda8 --- /dev/null +++ b/assets/js/index.js @@ -0,0 +1,11 @@ +var docs = [ +{{ range $index, $page := (where .Site.Pages "Section" "docs") -}} + { + id: {{ $index }}, + href: "{{ .Permalink | absURL }}", + title: {{ .Title | jsonify }}, + description: {{ .Params.description | jsonify }}, + content: {{ .Content | jsonify }} + }, +{{ end -}} +]; \ No newline at end of file diff --git a/assets/scss/app.scss b/assets/scss/app.scss index 1f6691c..91b9db8 100644 --- a/assets/scss/app.scss +++ b/assets/scss/app.scss @@ -8,15 +8,17 @@ @import "bootstrap/scss/bootstrap"; /** Import theme styles */ -// @import "common/fonts"; +@import "common/fonts"; @import "common/global"; @import "common/dark"; -// @import "common/syntax"; +@import "components/alerts"; @import "components/buttons"; @import "components/code"; +// @import "components/syntax"; @import "components/comments"; @import "components/forms"; @import "components/images"; +@import "components/search"; @import "layouts/footer"; @import "layouts/header"; @import "layouts/pages"; diff --git a/assets/scss/common/_dark.scss b/assets/scss/common/_dark.scss index 8d3b126..b5a38c1 100644 --- a/assets/scss/common/_dark.scss +++ b/assets/scss/common/_dark.scss @@ -1,10 +1,23 @@ /** Theme variables */ -$body-bg-dark: lighten($black, 10%); -$body-color-dark: darken($white, 15%); -$link-color-dark: lighten($primary, 20%); -$body-overlay-dark: lighten($black, 15%); -$border-dark: lighten($black, 20%); +// Source: https://material.io/design/color/dark-theme.html + +$body-bg-dark: $gray-900; +$body-overlay-dark: darken($body-bg-dark, 2.5%); +$border-dark: darken($body-bg-dark, 2.5%); +$body-color-dark: $gray-300; +$dots-dark: darken($body-color-dark, 50%); + +$link-color-dark: $blue-300; +$button-color-dark: $link-color-dark; +$focus-color-dark: lighten($link-color-dark, 2.5%); +$selection-color-dark: lighten($link-color-dark, 2.5%); + +$navbar-dark-brand-color: $link-color-dark; +$navbar-dark-brand-hover-color: $body-color-dark; +$navbar-dark-color: $body-color-dark; +$navbar-dark-hover-color: $link-color-dark; +$navbar-dark-active-color: $link-color-dark; /** Theme styles */ @@ -17,8 +30,14 @@ body.dark a { color: $link-color-dark; } +body.dark a.text-body { + color: $body-color-dark !important; +} + body.dark .btn-primary { - color: $body-color-dark; + @include button-variant($button-color-dark, $button-color-dark); + + color: $body-bg-dark !important; } body.dark .navbar { @@ -32,12 +51,12 @@ body.dark.home .navbar { } body.dark .navbar-light .navbar-brand { - color: $navbar-dark-brand-color; + color: $navbar-dark-brand-color !important; } body.dark .navbar-light .navbar-brand:hover, body.dark .navbar-light .navbar-brand:focus { - color: $navbar-dark-brand-hover-color; + color: $navbar-dark-brand-hover-color !important; } body.dark .navbar-light .navbar-nav .nav-link { @@ -64,6 +83,15 @@ body.dark .navbar-light .navbar-text { color: $navbar-dark-color; } +body.dark .alert-primary a { + color: $body-bg-dark; +} + +body.dark .alert-warning { + background: $body-overlay-dark; + color: $body-color-dark; +} + body.dark .page-links a { color: $body-color-dark; } @@ -106,6 +134,14 @@ body.dark .navbar .btn-link:active { body.dark .form-control.is-search { background: $body-overlay-dark; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-search'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E"); + background-repeat: no-repeat; + background-position: right calc(0.375em + 0.1875rem) center; + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +body.dark .form-control:focus { + box-shadow: 0 0 0 0.2rem $focus-color-dark; } body.dark .border-top { @@ -124,7 +160,7 @@ body.dark .docs-navigation { } body.dark ::selection { - background: lighten($primary, 25%); + background: $selection-color-dark; } body.dark pre { @@ -138,7 +174,7 @@ body.dark code { } body.dark blockquote { - border-left: 3px solid lighten($black, 30%); + border-left: 3px solid $border-dark; } body.dark .footer { @@ -211,3 +247,28 @@ body.dark .navbar .menu-icon .navicon::before, body.dark .navbar .menu-icon .navicon::after { background: $navbar-dark-color; } + +body.dark .logo-light { + display: none !important; +} + +body.dark .logo-dark { + display: inline-block !important; +} + +body.dark .bg-light { + background: darken($body-bg-dark, 1.5%) !important; +} + +body.dark .bg-dots { + background-image: radial-gradient($dots-dark 15%, transparent 15%); +} + +body.dark .text-muted { + color: darken($body-color-dark, 7.5%) !important; +} + +body.dark .alert-primary { + background: $link-color-dark; + color: $body-bg-dark; +} diff --git a/assets/scss/common/_global.scss b/assets/scss/common/_global.scss index c670c6d..38aac1e 100644 --- a/assets/scss/common/_global.scss +++ b/assets/scss/common/_global.scss @@ -1,7 +1,8 @@ -.authors .content, +.contributors .content, .blog .content, .page .content, -.error404 .content { +.error404 .content, +.docs.list .content { padding-top: 1rem; padding-bottom: 3rem; } @@ -48,12 +49,24 @@ h6, padding-bottom: 5rem; } +.section-md { + padding-top: 3rem; + padding-bottom: 3rem; +} + +.section-sm { + padding-top: 1rem; + padding-bottom: 1rem; +} + +/* .section svg { display: inline-block; width: 2rem; height: 2rem; vertical-align: text-top; } +*/ body { padding-top: 3.5625rem; @@ -128,7 +141,7 @@ body { .docs-navigation { border-top: 1px solid $gray-200; - margin-top: 3rem; + margin-top: 2rem; margin-bottom: 0; padding-top: 2rem; } @@ -139,7 +152,7 @@ body { @include media-breakpoint-up(lg) { .docs-navigation { - margin-bottom: 5rem; + margin-bottom: -1rem; } .docs-navigation a { @@ -153,5 +166,33 @@ body { } ::selection { - background: lighten($primary, 45%); + background: lighten($primary, 55%); +} + +.bg-dots { + background-image: radial-gradient($gray-300 15%, transparent 15%); + background-position: 0 0; + background-size: 1rem 1rem; + -webkit-mask: linear-gradient(to top, #fff, transparent); + mask: linear-gradient(to top, #fff, transparent); + width: 100%; + height: 9rem; + margin-top: -10rem; + z-index: -1; +} + +.bg-dots-lg { + margin-top: -12rem; +} + +// https://fossheim.io/writing/posts/css-text-gradient/ +.gradient-text { + background-color: $primary; + background-image: linear-gradient(90deg, $primary, $blue-300 50%, $pink-500); + background-size: 100%; + background-repeat: repeat; + -webkit-background-clip: text; + -moz-background-clip: text; + -webkit-text-fill-color: transparent; + -moz-text-fill-color: transparent; } diff --git a/assets/scss/common/_syntax.scss b/assets/scss/common/_syntax.scss deleted file mode 100644 index 51b1d84..0000000 --- a/assets/scss/common/_syntax.scss +++ /dev/null @@ -1,60 +0,0 @@ -/* Background */ .chroma { color: #f8f8f2; background-color: #282a36 } -/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } -/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } -/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc } -/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } -/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } -/* Keyword */ .chroma .k { color: #ff79c6 } -/* KeywordConstant */ .chroma .kc { color: #ff79c6 } -/* KeywordDeclaration */ .chroma .kd { color: #8be9fd; font-style: italic } -/* KeywordNamespace */ .chroma .kn { color: #ff79c6 } -/* KeywordPseudo */ .chroma .kp { color: #ff79c6 } -/* KeywordReserved */ .chroma .kr { color: #ff79c6 } -/* KeywordType */ .chroma .kt { color: #8be9fd } -/* NameAttribute */ .chroma .na { color: #50fa7b } -/* NameBuiltin */ .chroma .nb { color: #8be9fd; font-style: italic } -/* NameClass */ .chroma .nc { color: #50fa7b } -/* NameFunction */ .chroma .nf { color: #50fa7b } -/* NameLabel */ .chroma .nl { color: #8be9fd; font-style: italic } -/* NameTag */ .chroma .nt { color: #ff79c6 } -/* NameVariable */ .chroma .nv { color: #8be9fd; font-style: italic } -/* NameVariableClass */ .chroma .vc { color: #8be9fd; font-style: italic } -/* NameVariableGlobal */ .chroma .vg { color: #8be9fd; font-style: italic } -/* NameVariableInstance */ .chroma .vi { color: #8be9fd; font-style: italic } -/* LiteralString */ .chroma .s { color: #f1fa8c } -/* LiteralStringAffix */ .chroma .sa { color: #f1fa8c } -/* LiteralStringBacktick */ .chroma .sb { color: #f1fa8c } -/* LiteralStringChar */ .chroma .sc { color: #f1fa8c } -/* LiteralStringDelimiter */ .chroma .dl { color: #f1fa8c } -/* LiteralStringDoc */ .chroma .sd { color: #f1fa8c } -/* LiteralStringDouble */ .chroma .s2 { color: #f1fa8c } -/* LiteralStringEscape */ .chroma .se { color: #f1fa8c } -/* LiteralStringHeredoc */ .chroma .sh { color: #f1fa8c } -/* LiteralStringInterpol */ .chroma .si { color: #f1fa8c } -/* LiteralStringOther */ .chroma .sx { color: #f1fa8c } -/* LiteralStringRegex */ .chroma .sr { color: #f1fa8c } -/* LiteralStringSingle */ .chroma .s1 { color: #f1fa8c } -/* LiteralStringSymbol */ .chroma .ss { color: #f1fa8c } -/* LiteralNumber */ .chroma .m { color: #bd93f9 } -/* LiteralNumberBin */ .chroma .mb { color: #bd93f9 } -/* LiteralNumberFloat */ .chroma .mf { color: #bd93f9 } -/* LiteralNumberHex */ .chroma .mh { color: #bd93f9 } -/* LiteralNumberInteger */ .chroma .mi { color: #bd93f9 } -/* LiteralNumberIntegerLong */ .chroma .il { color: #bd93f9 } -/* LiteralNumberOct */ .chroma .mo { color: #bd93f9 } -/* Operator */ .chroma .o { color: #ff79c6 } -/* OperatorWord */ .chroma .ow { color: #ff79c6 } -/* Comment */ .chroma .c { color: #6272a4 } -/* CommentHashbang */ .chroma .ch { color: #6272a4 } -/* CommentMultiline */ .chroma .cm { color: #6272a4 } -/* CommentSingle */ .chroma .c1 { color: #6272a4 } -/* CommentSpecial */ .chroma .cs { color: #6272a4 } -/* CommentPreproc */ .chroma .cp { color: #ff79c6 } -/* CommentPreprocFile */ .chroma .cpf { color: #ff79c6 } -/* GenericDeleted */ .chroma .gd { color: #8b080b } -/* GenericEmph */ .chroma .ge { text-decoration: underline } -/* GenericHeading */ .chroma .gh { font-weight: bold } -/* GenericInserted */ .chroma .gi { font-weight: bold } -/* GenericOutput */ .chroma .go { color: #44475a } -/* GenericSubheading */ .chroma .gu { font-weight: bold } -/* GenericUnderline */ .chroma .gl { text-decoration: underline } diff --git a/assets/scss/common/_variables.scss b/assets/scss/common/_variables.scss index 163e194..125930e 100644 --- a/assets/scss/common/_variables.scss +++ b/assets/scss/common/_variables.scss @@ -1,16 +1,4 @@ -/* -$theme-colors: ( - primary: #3c48d5 -); -*/ - -$yellow: #ffe000; -$black: #1d2d35; -$white: #fff; -$beige: #fbf7f0; -$red: #e55235; -$purple: #5d2f86; -$brown: #aa9c84; +// Color system $white: #fff; $gray-100: #f8f9fa; @@ -24,8 +12,17 @@ $gray-800: #343a40; $gray-900: #212529; $black: #000; -$primary: lighten($purple, 10%); -$secondary: $gray-200; +$yellow: #ffe000; +$black: #1d2d35; +$beige: #fbf7f0; +$red: #e55235; +$purple: #5d2f86; +$brown: #aa9c84; + +$blue-300: #8ed6fb; +$pink-500: #d32e9d; + +$primary: $purple; /** Bootstrap navbar fix (https://git.io/fADqW) */ $navbar-dark-toggler-icon-bg: none; @@ -42,7 +39,7 @@ $enable-responsive-font-sizes: true; // Settings for the `
` element. $body-bg: $white; -$body-color: lighten($black, 10%); +$body-color: $black; // Grid containers // @@ -65,6 +62,12 @@ $grid-columns: 16; $grid-gutter-width: 48px; $grid-row-columns: 6; +// Components +// +// Define common padding and border radius sizes and more. + +$border-color: $gray-200; + // Typography // // Font, line-height, and color for body text, headings, and more. @@ -100,3 +103,26 @@ $navbar-padding-y: $spacer / 2; $navbar-padding-x: 0; $navbar-nav-link-padding-x: 0.5rem; + +$navbar-light-color: $black; +$navbar-light-hover-color: $primary; +$navbar-light-active-color: $primary; + +// Cards + +$card-border-color: $gray-200; + +// Alerts +// +// Define alert colors, border radius, and padding. + +$alert-padding-y: 1rem; +$alert-padding-x: 1.5rem; +$alert-margin-bottom: 0; +$alert-border-radius: 0; +$alert-link-font-weight: $headings-font-weight; +$alert-border-width: 0; + +$alert-bg-level: 0; +$alert-border-level: 0; +$alert-color-level: 0; diff --git a/assets/scss/components/_alerts.scss b/assets/scss/components/_alerts.scss new file mode 100644 index 0000000..b40c571 --- /dev/null +++ b/assets/scss/components/_alerts.scss @@ -0,0 +1,63 @@ +.alert { + font-family: $font-family-monospace; + font-size: $font-size-sm; +} + +.alert-icon { + margin-right: 0.75rem; +} + +.docs .alert { + margin: 2rem -1.5rem; +} + +.alert .alert-link { + text-decoration: underline; +} + +.alert-dark { + color: $white; + background-color: $black; +} + +.alert-dark .alert-link { + color: $white; +} + +.alert-light { + color: $black; +} + +.alert-warning { + background: $beige; + color: $black; +} + +/* +.alert-light { + color: #215888; + background: linear-gradient(-45deg, rgb(212, 245, 255), rgb(234, 250, 255), rgb(234, 250, 255), #d3f6ef); +} + +.alert-light .alert-link { + color: #215888; +} +*/ + +.alert-white { + background-color: rgba(255, 255, 255, 0.95); +} + +.alert-primary { + color: $white; + background-color: $primary; +} + +.alert-primary .alert-link { + color: $white; +} + +.alert .alert-link:hover, +.alert .alert-link:focus { + text-decoration: none; +} diff --git a/assets/scss/components/_buttons.scss b/assets/scss/components/_buttons.scss index 40f8a8f..d9bb621 100644 --- a/assets/scss/components/_buttons.scss +++ b/assets/scss/components/_buttons.scss @@ -7,6 +7,11 @@ margin-right: 1.25rem; } +.btn-link:focus { + outline: 0; + box-shadow: none; +} + #navigation { margin-left: 1.25rem; } @@ -44,3 +49,26 @@ body.dark .toggle-light { body.dark .toggle-dark { display: none; } + +.btn-clipboard { + display: none; +} + +@include media-breakpoint-up(md) { + .btn-clipboard { + display: block; + margin: 2.0625rem 0.25rem -4rem auto; + } +} + +.copy-status::after, +.copy-status:hover::after { + content: "Copy"; + display: block; +} + +.copy-status:focus::after, +.copy-status:active::after { + content: "Copied"; + display: block; +} diff --git a/assets/scss/components/_code.scss b/assets/scss/components/_code.scss index cde4684..130c610 100644 --- a/assets/scss/components/_code.scss +++ b/assets/scss/components/_code.scss @@ -1,10 +1,3 @@ -/* -.highlight { - margin-left: -1.5rem; - margin-right: -1.5rem; -} -*/ - pre, code, kbd, @@ -15,8 +8,8 @@ samp { } pre { - background: lighten($black, 15%); - color: $beige; + background: $beige; + color: $black; line-height: $line-height-lg; margin: 2rem 0; overflow: auto; @@ -35,3 +28,16 @@ pre code { font-size: inherit; padding: 0; } + +@include media-breakpoint-down(xs) { + pre { + margin: 2rem -1.5rem; + } + + pre, + code, + kbd, + samp { + border-radius: 0; + } +} diff --git a/assets/scss/components/_images.scss b/assets/scss/components/_images.scss index cc6c3b6..254eefa 100644 --- a/assets/scss/components/_images.scss +++ b/assets/scss/components/_images.scss @@ -1,20 +1,3 @@ -.img svg, -.img img { - margin: 0; - width: 100%; - height: auto; -} - -.img { - position: relative; -} - -.img img { - position: absolute; - top: 0; - left: 0; -} - figure { margin: 2rem 0; } @@ -33,11 +16,11 @@ figure.wide .figure-caption { @include media-breakpoint-up(md) { figure.wide { - margin: 2rem -3rem; + margin: 2rem -2.5rem; } figure.wide .figure-caption { - margin: 0.25rem 3rem 0.75rem; + margin: 0.25rem 2.5rem 0.75rem; } } @@ -52,12 +35,14 @@ figure.wide .figure-caption { } .blur-up { - -webkit-filter: blur(5px); filter: blur(5px); - transition: filter 300ms, -webkit-filter 300ms; } .blur-up.lazyloaded { - -webkit-filter: blur(0); - filter: blur(0); + filter: unset; +} + +.img-simple { + margin-top: 0.375rem; + margin-bottom: 1.25rem; } diff --git a/assets/scss/components/_search.scss b/assets/scss/components/_search.scss new file mode 100644 index 0000000..3a70b2b --- /dev/null +++ b/assets/scss/components/_search.scss @@ -0,0 +1,75 @@ +.navbar-form { + position: relative; +} + +#suggestions { + position: absolute; + right: 0; + margin-top: 0.5rem; + width: calc(100vw - 3rem); +} + +#suggestions a { + display: block; + text-decoration: none; + padding: 0.75rem; + margin: 0 0.5rem; +} + +#suggestions a:focus { + background: $gray-100; + outline: 0; +} + +#suggestions div:not(:first-child) { + border-top: 1px dashed $gray-200; +} + +#suggestions div:first-child { + margin-top: 0.5rem; +} + +#suggestions div:last-child { + margin-bottom: 0.5rem; +} + +#suggestions a:hover { + background: $gray-100; +} + +#suggestions span { + display: flex; + font-size: $font-size-base; +} + +#suggestions span:first-child { + font-weight: $headings-font-weight; + color: $black; +} + +#suggestions span:nth-child(2) { + color: $gray-700; +} + +@include media-breakpoint-up(sm) { + #suggestions { + width: 30rem; + } + + #suggestions a { + display: flex; + } + + #suggestions span:first-child { + width: 9rem; + padding-right: 1rem; + border-right: 1px solid $gray-200; + display: inline-block; + text-align: right; + } + + #suggestions span:nth-child(2) { + width: 19rem; + padding-left: 1rem; + } +} diff --git a/assets/scss/components/_syntax.scss b/assets/scss/components/_syntax.scss new file mode 100644 index 0000000..d9a1c02 --- /dev/null +++ b/assets/scss/components/_syntax.scss @@ -0,0 +1,131 @@ +/*! + * GitHub Light v0.5.0 + * Copyright (c) 2012 - 2017 GitHub, Inc. + * Licensed under MIT (https://github.com/primer/github-syntax-theme-generator/blob/master/LICENSE) + */ + + .c1, + .c /* comment, punctuation.definition.comment, string.comment */ { + color: #6a737d; + } + + .v /* variable */, + .smw /* sublimelinter.mark.warning */ { + color: #e36209; + } + + // .c1 /* constant, entity.name.constant, variable.other.constant, variable.language, support, meta.property-name, support.constant, support.variable, meta.module-reference, markup.raw, meta.diff.header, meta.output */, + .s .v /* string variable */ { + color: #005cc5; + } + + .e /* entity */, + .en /* entity.name */ { + color: #6f42c1; + } + + .smi /* variable.parameter.function, storage.modifier.package, storage.modifier.import, storage.type.java, variable.other */, + .s .s1 /* string source */ { + color: #24292e; + } + + .ent /* entity.name.tag, markup.quote */ { + color: #22863a; + } + + .k /* keyword, storage, storage.type */ { + color: #d73a49; + } + + .s /* string */, + .pds /* punctuation.definition.string, source.regexp, string.regexp.character-class */, + .s .pse .s1 /* string punctuation.section.embedded source */, + .sr /* string.regexp */, + .sr .cce /* string.regexp constant.character.escape */, + .sr .sre /* string.regexp source.ruby.embedded */, + .sr .sra /* string.regexp string.regexp.arbitrary-repitition */ { + color: #032f62; + } + + .bu /* invalid.broken, invalid.deprecated, invalid.unimplemented, message.error, brackethighlighter.unmatched, sublimelinter.mark.error */ { + color: #b31d28; + } + + .ii /* invalid.illegal */ { + color: #fafbfc; + background-color: #b31d28; + } + + .c2 /* carriage-return */ { + color: #fafbfc; + background-color: #d73a49; + } + + .c2::before /* carriage-return */ { + content: "^M"; + } + + .sr .cce /* string.regexp constant.character.escape */ { + font-weight: bold; + color: #22863a; + } + + .ml /* markup.list */ { + color: #735c0f; + } + + .mh /* markup.heading */, + .mh .en /* markup.heading entity.name */, + .ms /* meta.separator */ { + font-weight: bold; + color: #005cc5; + } + + .mi /* markup.italic */ { + font-style: italic; + color: #24292e; + } + + .mb /* markup.bold */ { + font-weight: bold; + color: #24292e; + } + + .md /* markup.deleted, meta.diff.header.from-file, punctuation.definition.deleted */ { + color: #b31d28; + background-color: #ffeef0; + } + + .mi1 /* markup.inserted, meta.diff.header.to-file, punctuation.definition.inserted */ { + color: #22863a; + background-color: #f0fff4; + } + + .mc /* markup.changed, punctuation.definition.changed */ { + color: #e36209; + background-color: #ffebda; + } + + .mi2 /* markup.ignored, markup.untracked */ { + color: #f6f8fa; + background-color: #005cc5; + } + + .mdr /* meta.diff.range */ { + font-weight: bold; + color: #6f42c1; + } + + .ba /* brackethighlighter.tag, brackethighlighter.curly, brackethighlighter.round, brackethighlighter.square, brackethighlighter.angle, brackethighlighter.quote */ { + color: #586069; + } + + .sg /* sublimelinter.gutter-mark */ { + color: #959da5; + } + + .corl /* constant.other.reference.link, string.other.link */ { + text-decoration: underline; + color: #032f62; + } + \ No newline at end of file diff --git a/assets/scss/layouts/_footer.scss b/assets/scss/layouts/_footer.scss index ce1eb4a..7d21811 100644 --- a/assets/scss/layouts/_footer.scss +++ b/assets/scss/layouts/_footer.scss @@ -8,15 +8,13 @@ margin-bottom: 0; } -.footer p, -.footer li a { +.footer li { font-size: $font-size-sm; margin-bottom: 0; } @include media-breakpoint-up(md) { - .footer p, - .footer li a { + .footer li { font-size: $font-size-base; } } diff --git a/assets/scss/layouts/_header.scss b/assets/scss/layouts/_header.scss index d07bbbd..a4ef3d6 100644 --- a/assets/scss/layouts/_header.scss +++ b/assets/scss/layouts/_header.scss @@ -10,6 +10,16 @@ margin-left: 1rem; } +.navbar-brand { + font-weight: $headings-font-weight; +} + +.navbar-light .navbar-brand, +.navbar-light .navbar-brand:hover, +.navbar-light .navbar-brand:active { + color: $body-color; +} + @include media-breakpoint-up(md) { .navbar-brand { font-size: $font-size-xl; @@ -55,12 +65,11 @@ .navbar { background-color: rgba(255, 255, 255, 0.95); border-bottom: 1px solid $gray-200; - - /* margin-top: 3px; */ + margin-top: 4px; } .header-bar { - border-top: 3px solid; + border-top: 4px solid; border-image-source: linear-gradient(90deg, $primary, #8ed6fb 50%, #d32e9d); border-image-slice: 1; } @@ -90,11 +99,23 @@ .navbar-form { margin-top: 0; - margin-left: 1.5rem; + margin-left: 9rem; margin-right: 1.5rem; } } +@include media-breakpoint-up(lg) { + .navbar-form { + margin-left: 18rem; + } +} + +@include media-breakpoint-up(xl) { + .navbar-form { + margin-left: 36rem; + } +} + .form-control.is-search { padding-right: calc(1.5em + 0.75rem); background: $gray-100; @@ -105,6 +126,44 @@ background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } +/*! purgecss start ignore */ +.algolia-autocomplete { + display: flex !important; +} + +.algolia-autocomplete .ds-dropdown-menu { + box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; +} + +@include media-breakpoint-down(sm) { + .algolia-autocomplete .ds-dropdown-menu { + max-width: 512px !important; + min-width: 312px !important; + width: auto !important; + } + + .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column::after { + content: "|"; + margin-right: 0.25rem; + } +} + +.algolia-autocomplete .algolia-docsearch-suggestion--title { + margin-bottom: 0; +} + +.algolia-autocomplete .algolia-docsearch-suggestion--highlight { + padding: 0 0.05em; +} + +.algolia-autocomplete .algolia-docsearch-footer { + margin-top: 1rem; + margin-right: 0.5rem; + margin-bottom: 0.5rem; +} + +/*! purgecss end ignore */ + /* * Source: https://medium.com/creative-technology-concepts-code/responsive-mobile-dropdown-navigation-using-css-only-7218e4498a99 */ diff --git a/assets/scss/layouts/_pages.scss b/assets/scss/layouts/_pages.scss index 7b34e12..eaa75de 100644 --- a/assets/scss/layouts/_pages.scss +++ b/assets/scss/layouts/_pages.scss @@ -23,3 +23,18 @@ h4:hover a { .card-list { margin-top: 2.25rem; } + +.edit-page { + margin-top: 3rem; + font-size: $font-size-base; +} + +.edit-page svg { + margin-right: 0.5rem; + margin-bottom: 0.25rem; +} + +p.meta { + margin-top: 0.5rem; + font-size: $font-size-base; +} diff --git a/assets/scss/layouts/_posts.scss b/assets/scss/layouts/_posts.scss index d43e3df..da27660 100644 --- a/assets/scss/layouts/_posts.scss +++ b/assets/scss/layouts/_posts.scss @@ -1,16 +1,19 @@ -.authors.list .card, +.home .card, +.contributors.list .card, .blog.list .card { margin-top: 2rem; margin-bottom: 2rem; transition: transform 0.3s; } -.authors.list .card:hover, +.home .card:hover, +.contributors.list .card:hover, .blog.list .card:hover { transform: scale(1.025); } -.authors.list .card-body, +.home .card-body, +.contributors.list .card-body, .blog.list .card-body { padding: 0 2rem 1rem; } diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..ce9c9de --- /dev/null +++ b/babel.config.js @@ -0,0 +1,17 @@ +module.exports = { + presets: [ + [ + '@babel/preset-env', + { + targets: { + browsers: [ + // Best practice: https://github.com/babel/babel/issues/7789 + '>=1%', + 'not ie 11', + 'not op_mini all' + ] + } + } + ] + ] +}; \ No newline at end of file diff --git a/config/_default/config.toml b/config/_default/config.toml index 51cce44..0ceb830 100644 --- a/config/_default/config.toml +++ b/config/_default/config.toml @@ -1,19 +1,17 @@ baseurl = "/" disableAliases = true disableHugoGeneratorInject = true -# disableKinds = ["taxonomy", "taxonomyTerm"] enableEmoji = true +enableGitInfo = true enableRobotsTXT = true languageCode = "en-US" paginate = 7 rssLimit = 10 -[taxonomies] - author = "authors" - # add redirects/headers [outputs] home = ["HTML", "RSS", "REDIRECTS", "HEADERS"] +section = ["HTML", "SITEMAP"] # remove .{ext} from text/netlify [mediaTypes."text/netlify"] @@ -22,24 +20,36 @@ delimiter = "" # add output format for netlify _redirects [outputFormats.REDIRECTS] -mediatype = "text/netlify" +mediaType = "text/netlify" baseName = "_redirects" isPlainText = true notAlternative = true # add output format for netlify _headers [outputFormats.HEADERS] -mediatype = "text/netlify" +mediaType = "text/netlify" baseName = "_headers" isPlainText = true notAlternative = true +# add output format for section sitemap.xml +[outputFormats.SITEMAP] +mediaType = "application/xml" +baseName = "sitemap" +isHTML = false +isPlainText = true +noUgly = true +rel = "sitemap" + [markup] [markup.goldmark] + [markup.goldmark.extensions] + linkify = false [markup.goldmark.renderer] unsafe = true [markup.highlight] codeFences = true + guessSyntax = false hl_Lines = "" lineNoStart = 1 lineNos = false @@ -53,6 +63,12 @@ notAlternative = true filename = "sitemap.xml" priority = 0.5 +[taxonomies] + contributor = "contributors" + +[permalinks] + blog = "/blog/:title/" + [module] [[module.mounts]] source = "assets" @@ -64,5 +80,11 @@ notAlternative = true source = "node_modules/lazysizes" target = "assets/js/vendor/lazysizes" [[module.mounts]] - source = "node_modules/ga-lite/dist" - target = "static/js/vendor/ga-lite" + source = "node_modules/instant.page" + target = "assets/js/vendor/instant.page" + [[module.mounts]] + source = "node_modules/lazysizes" + target = "assets/js/vendor/lazysizes" + [[module.mounts]] + source = "node_modules/flexsearch" + target = "assets/js/vendor/flexsearch" diff --git a/config/_default/menus.toml b/config/_default/menus.toml index 5e1813d..10fa10e 100644 --- a/config/_default/menus.toml +++ b/config/_default/menus.toml @@ -5,8 +5,26 @@ url = "/docs/prologue/" [[docs]] - name = "Help" + name = "Basic Hyas" weight = 20 + identifier = "basic-hyas" + url = "/docs/basic-hyas/" + +[[docs]] + name = "Core Hyas" + weight = 30 + identifier = "core-hyas" + url = "/docs/core-hyas/" + +[[docs]] + name = "Guides" + weight = 40 + identifier = "guides" + url = "/docs/guides/" + +[[docs]] + name = "Help" + weight = 50 identifier = "help" url = "/docs/help/" @@ -20,14 +38,15 @@ url = "/blog/" weight = 20 -[[social]] - name = "Twitter" - pre = "" - url = "https://twitter.com/getdoks" - weight = 10 +# [[social]] +# name = "Twitter" +# pre = "" +# url = "https://twitter.com/gethyas" +# weight = 10 [[social]] name = "GitHub" pre = "" url = "https://github.com/h-enk/doks" + post = "v0.1.0" weight = 20 diff --git a/config/_default/params.toml b/config/_default/params.toml index 491a6ee..4a8806d 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -1,27 +1,38 @@ title = "Doks" titleSeparator = "-" -titleAddition = "Modern Hugo Documentation Starter" -description = "Hugo starter helping you build modern documentation websites." -images = ["image-doks.png"] -twitterSite = "@henkverlinde" -twitterCreator = "@henkverlinde" +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." + +images = ["hyas.png"] + +twitterSite = "henkverlinde" +twitterCreator = "henkverlinde" +facebookAuthor = "verlinde.henk" +facebookPublisher = "verlinde.henk" ogLocale = "en_US" + schemaType = "Organization" -schemaLogo = "logo-doks.png" -schemaTwitter = "https://twitter.com/getdoks" +schemaLogo = "logo-hyas.png" +schemaTwitter = "https://twitter.com/henkverlinde" schemaLinkedIn = "https://www.linkedin.com/in/henkverlinde/" -schemaSection = "news" +schemaGitHub = "https://github.com/h-enk" +schemaSection = "blog" + siteLinksSearchBox = false themeColor = "#fff" -# googleAnalytics = "UA-99999999-1" - quality = 85 bgColor = "#fff" -landscapePhotoWidths = [900, 700, 500] -portraitPhotoWidths = [1500, 1000, 750] +landscapePhotoWidths = [1000, 800, 700, 600, 500] +portraitPhotoWidths = [800, 700, 600, 500] lqipWidth = "20x" -footer = "© 2020 Henk Verlinde - MIT License" -version = "v0.1.0" +footer = "An open source project by @HenkVerlinde" + +alert = false +alertText = "Like Doks? Star on GitHub. Thanks!" + +hyasVersion = "v0.2.0" + +docsRepo = "https://github.com/h-enk/doks" diff --git a/config/postcss.config.js b/config/postcss.config.js index eea7a78..119d5f1 100644 --- a/config/postcss.config.js +++ b/config/postcss.config.js @@ -10,12 +10,12 @@ module.exports = { './layouts/**/*.html', './content/**/*.md', ], - whitelist: [ + safelist: [ 'lazyloaded', ...whitelister([ - './assets/scss/common/_dark.scss', - './assets/scss/common/_syntax.scss', './assets/scss/components/_code.scss', + './assets/scss/components/_search.scss', + './assets/scss/common/_dark.scss', ]), ], }), diff --git a/config/production/params.toml b/config/production/.gitkeep similarity index 100% rename from config/production/params.toml rename to config/production/.gitkeep diff --git a/config/production/config.toml b/config/production/config.toml deleted file mode 100644 index 0a9e67b..0000000 --- a/config/production/config.toml +++ /dev/null @@ -1,2 +0,0 @@ -baseurl = "https://doks.netlify.app/" -canonifyURLs = false diff --git a/config/staging/params.toml b/config/staging/.gitkeep similarity index 100% rename from config/staging/params.toml rename to config/staging/.gitkeep diff --git a/config/staging/config.toml b/config/staging/config.toml deleted file mode 100644 index 14e8022..0000000 --- a/config/staging/config.toml +++ /dev/null @@ -1,2 +0,0 @@ -baseurl = "https://doks-staging.netlify.app/" -canonifyURLs = false diff --git a/content/_index.md b/content/_index.md index ce8c3a9..d3ac3c4 100644 --- a/content/_index.md +++ b/content/_index.md @@ -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: [] --- -Get perfect Google Lighthouse and Mozilla Observatory scores by default.
-The best search experience for docs, by Algolia, for free.
-Enable dark mode at night or in dark environments.
-The page you requested could not be found.
+The page you are looking for doesn't exist or has been moved.
{{ .Params.lead }}
+{{ .Params.lead | safeHTML }}
{{ partial "main/blog-meta.html" . -}}{{ .Params.lead }}
+{{ .Params.lead | safeHTML }}
{{ .Content }} diff --git a/layouts/authors/list.html b/layouts/contributors/list.html similarity index 75% rename from layouts/authors/list.html rename to layouts/contributors/list.html index 5752bae..45e07e6 100644 --- a/layouts/authors/list.html +++ b/layouts/contributors/list.html @@ -8,9 +8,9 @@ {{ range .Data.Pages -}}{{ .Params.lead }}
+{{ .Params.lead | safeHTML }}
{{ partial "main/blog-meta.html" . -}} {{ end -}}{{ .Params.lead | safeHTML }}
{{ partial "main/headline-hash.html" .Content }} + {{ partial "main/edit-page.html" . }} {{ partial "main/docs-navigation.html" . }}Posted {{ .Lastmod.Format "January 2, 2006" }} by {{ if .Params.authors -}}{{ range $index, $author := .Params.authors }}{{ if gt $index 0 }} and {{ end }}{{ . }}{{ end -}}{{ end -}} ‐ {{ .ReadingTime -}} min read
\ No newline at end of file +
Posted {{ .PublishDate.Format "January 2, 2006" }} by {{ if .Params.contributors -}}{{ range $index, $contributor := .Params.contributors }}{{ if gt $index 0 }} and {{ end }}{{ . }}{{ end -}}{{ end -}} ‐ {{ .ReadingTime -}} min read
\ No newline at end of file
diff --git a/layouts/partials/main/docs-navigation.html b/layouts/partials/main/docs-navigation.html
index 50fc014..bf805ac 100644
--- a/layouts/partials/main/docs-navigation.html
+++ b/layouts/partials/main/docs-navigation.html
@@ -4,7 +4,7 @@
{{ $pages := where site.RegularPages "Section" .Section -}}
{{ with $pages.Next . -}}
-