GithubHelp home page GithubHelp logo

gethyas / doks Goto Github PK

View Code? Open in Web Editor NEW
1.9K 11.0 350.0 22.77 MB

Everything you need to build a stellar documentation website. Fast, accessible, and easy to use.

Home Page: https://getdoks.org

License: MIT License

JavaScript 47.77% HTML 50.91% SCSS 1.32%
hugo hyas documentation static-site static-site-generator theme npm

doks's Introduction

Doks

Doks is a documentation theme for Hyas.

Demo

Install

The recommended way to install the latest version of Doks is by running the command below:

npm create hyas@latest -- --template doks

Looking for help? Start with our Getting Started guide.

Documentation

Visit our official documentation.

Support

Having trouble? Get help in the official Doks Discussions.

Contributing

New contributors welcome! Check out our Contributor Guides for help getting started.

Links

Sponsors

Doks is supported by Netlify, Algolia, and several other amazing organizations and inidviduals. Sponsor Doks! ❤️

doks's People

Contributors

commanderstorm avatar dependabot-preview[bot] avatar dependabot[bot] avatar filefabrik avatar github-actions[bot] avatar h-enk avatar james-d-elliott avatar jbspeakr avatar limichange avatar mikepianka avatar nk9 avatar ocram85 avatar psa avatar rocktakey avatar schnerring avatar sharjeelaziz avatar soichih avatar steven-mathew avatar umatare5 avatar zerotask avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

doks's Issues

Invisible text - in searchbar - in dark mode

Description

The text typed inside search bar, in dark mode is invisible

Steps to reproduce

  1. Go to https://getdoks.org/
  2. Enable dark mode by clicking on the moon icon
  3. Start typing anything in the search bar

Expected result

The text being typed should be visible (should be white/light color).

Actual result

The color of text was dark (possibly same as that of the dark background) & thus it was not visible.

Environment

I am sorry, I don't have access to nodejs
OS: Windows
Browsers: Firefox, Edge

2021-03-14_10-03-33.mp4

Tables rendering incorrectly after minification

EDIT: After a lot of fiddling around, I realized that postCSS was removing some CSS from the final that I actually needed. I was able to fix this issue by modifying postcss.config.js to whitelist table headers and cells.

The fix looks something like this:

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',
      ],
      safelist: [
        'lazyloaded',
        'th',
        'td',
        ...whitelister([
          './assets/scss/components/_code.scss',
          './assets/scss/components/_search.scss',
          './assets/scss/common/_dark.scss',
        ]),
      ],
    }),
  ],
}

This seems to be working for now, but I think that common markdown stuff should be whitelisted by default.

Description

I created a table using Markdown and locally the table renders correctly, but when I the CSS is minified into a single file and displayed on the web, I'm not sure why, but the new CSS is not rendering tables as I would expect. I've narrowed this down to the line postCSS (dict "config" "config/postcss.config.js") in stylesheet.html. It appears that removing this fixes it. Perhaps the purge function is getting rid of stuff that I actually need?

Steps to reproduce

The project can be found here: https://github.com/ElectricBlocks/electricblocks.github.io

I created a table using the following code:

{{< table "table table-striped table-bordered table-dark" >}}

| Index | # Bytes | Data Type | Variable | Purpose |
|-------|---------|-----------|----------|---------|
| 0 - 3 | 4       | int       | x        | x coord of updated TE|
| 4 - 7 | 4       | int       | y        | y coord of updated TE|
| 8 - 11| 4       | int       | z        | z coord of updated TE|
| 12    | 1       | boolean   | inService| Is TE enabled? |
| 13 - 16| 4 | int | numInputs | # of inputs to a TE|
| 17 - end | 8 * numInputs| double[] | inputs | Double array of TE inputs|
{{</ table >}}

The shortcode for table is defined as:

{{ $htmlTable := .Inner | markdownify }}
{{ $class := .Get 0 }}
{{ $old := "<table>" }}
{{ $new := printf "<table class=\"%s\">" $class }}
{{ $htmlTable := replace $htmlTable $old $new }}
{{ $htmlTable | safeHTML }}

Expected result

When viewed on localhost, it renders correctly like this:

image

Actual result

When minified and pushed to github pages, the table renders like this:
image

Environment

npm run check

> [email protected] precheck
> npm version

{
  doks: '0.1.5',
  npm: '7.3.0',
  node: '15.5.0',
  v8: '8.6.395.17-node.23',
  uv: '1.40.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.17.1',
  modules: '88',
  nghttp2: '1.41.0',
  napi: '7',
  llhttp: '2.1.3',
  openssl: '1.1.1i',
  cldr: '38.0',
  icu: '68.1',
  tz: '2020b',
  unicode: '13.0'
}

> [email protected] check
> hugo version

Hugo Static Site Generator v0.80.0-792EF0F4/extended linux/amd64 BuildDate: 2020-12-31T13:46:18Z

Dark theme as default?

Summary

Sorry if this has been asked already, but I could not find much about it.
Doks has a beautiful button to change the page to dark theme, and I love it.

I was wondering if it could be possible to have the page always load in dark mode by default, with the user having the option to select the light theme via the same button.

Please NOTE - I am not necessairly requesting these changes to be implemented in Doks if that is too complicated for the codebase, an explanation of how to achieve this in my own project will suffice.

Motivation

Dark theme is easier on the eyes, and just better to read documentation overall. Most websites are embracing it now and I think it would make for a great feature to have this on by default.

Seeking clickable link upon running server

Description

Web Server is available at //localhost:1313/ (bind address 0.0.0.0)
Without the http: the link is not clickable on the Mac terminal.

Steps to reproduce

% npm run start after cloning repo

Expected result

Web Server is available at http://localhost:1313/ (bind address 0.0.0.0)
The http: enables the link to be clickable from the terminal.

I am able to get this result when I set: baseurl = "http://example.com"

Actual result

no http: so the link is not clickable.

Environment


> [email protected] precheck
> npm version

{
  'doks-child-theme': '0.2.3',
  npm: '7.7.6',
  node: '15.14.0',
  v8: '8.6.395.17-node.28',
  uv: '1.41.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.17.1',
  modules: '88',
  nghttp2: '1.42.0',
  napi: '8',
  llhttp: '2.1.3',
  openssl: '1.1.1k+quic',
  cldr: '38.1',
  icu: '68.2',
  tz: '2020d',
  unicode: '13.0',
  ngtcp2: '0.1.0-DEV',
  nghttp3: '0.1.0-DEV'
}

> [email protected] check
> hugo version

hugo v0.82.1-60618210+extended darwin/amd64 BuildDate=2021-04-20T11:02:50Z VendorInfo=gohugoio

Pagination SEO issue: canonical url on paginated pages does not work

Discussed in #344

Originally posted by krispkrisp June 17, 2021
On pages with numbers: ../page/2/ ...
it shows the canonical for the main taxonomy page, without the page number this is a problem for indexing.
As described here:
https://www.searchenginejournal.com/technical-seo/pagination/

this is a general issue with hugo described here:
gohugoio/hugo#4507

In DOKS pagination and canonicalization is done in seo.html in partials/head

However, this:
`{{ if $.Scratch.Get "paginator" }}

{{ if .Paginator.HasPrev -}} {{ end -}} {{ if .Paginator.HasNext -}} {{ end -}} {{ else -}} {{ end -}}` does not work on pagination pages the ELSE is executed, and no prev/next and canonical is done

way around the Hugo problem with canonical for pagination pages is described here:
https://moonbooth.com/hugo/seo/#canonicals

failed to extract shortcode: template for shortcode "gallery" not found

Description

After cloning this theme into the /themes directory, I get the error: failed to extract shortcode: template for shortcode "gallery" not found

Steps to reproduce

  1. Clone the hugo sample code
  2. Check that the sample hugo site is working
  3. Clone the doks repo
  4. Update the toml file to use the doks theme
  5. Restart the hugo server, it fails with the error message above

Expected result

It should work
What should happen?

Actual result

Results in error message above
What happened.

Environment

Paste the information here as shown by npm run check

🚀 Support more language search with Fusejs

Summary

Fusejs supports more language search, such as Japanese, Chinese, Korean, etc. And it's very friendly with Hugo.

https://github.com/krisk/Fuse

Basic example

onweru/compose@c725994

zzossig/hugo-theme-zzo#28

https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae

Motivation

Compared with algolia, fusejs is more flexible and convenient to use out of the box; compared with common solutions such as lunrjs, fusejs is more language friendly. Therefore, I think adding fusejs as an alternative can better search.

White flash on page transitions

Summary

Added the following script on top of layouts\partials\header\header.html to:

  • avoid white flash between page transitions in the dark mode, and
  • set dark theme as default

Basic example

<script>
  if (localStorage.getItem('theme') === 'dark' || localStorage.getItem('theme') === null) {
    document.body.classList.add('dark');
  }
</script>

Motivation

Not sending PR as this is just a quick hack I needed.

Highlight.js horizontal scroll bar disappears in dark mode

Description

The scroll bard in code blocks with large content disappears in dark mode.

Steps to reproduce

use any code block like this:

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores 

Expected result

Switching to dark mode should keep the scroll bar visible regardless. I'm using the highlight.js theme, but the color needs to be independent of the used theme.

Actual result

image

image

Environment

Paste the information here as shown by npm run check

URL's metatags are relative, s/b absolute — in production

Description

URL's metatags are relative, s/b absolute — in non development environments.

Steps to reproduce

  1. Run npm run build
  2. View page source — e.g.:
<meta property="og:url" content="/"><meta property="og:image" content="/doks.png">

See also e.g. doks.netlify.app

Expected result

<meta property="og:url" content="https://doks.netlify.app/"><meta property="og:image" content="https://doks.netlify.app/doks.png">

Actual result

<meta property="og:url" content="/"><meta property="og:image" content="/doks.png">

Environment

> @hyas/[email protected] precheck
> npm version

{
  '@hyas/doks': '0.2.3',
  npm: '7.0.5',
  node: '15.9.0',
  v8: '8.6.395.17-node.25',
  uv: '1.41.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.17.1',
  modules: '88',
  nghttp2: '1.42.0',
  napi: '7',
  llhttp: '2.1.3',
  openssl: '1.1.1i',
  cldr: '38.1',
  icu: '68.2',
  tz: '2020d',
  unicode: '13.0'
}

> @hyas/[email protected] check
> hugo version

hugo v0.82.0-9D960784+extended windows/amd64 BuildDate=2021-03-21T17:28:04Z VendorInfo=gohugoio

cannot search chinese

Description

current config of flexSearch may don't support break Chinese word.

Steps to reproduce

Create some documents containing CJK characters, then type keyword CJK characters in headers' search area.

Expected result

display the documents indexed by title or description of documents.

Actual result

show nothing.

Wide screen support

I am currently evaluating Hugo themes. Doks is on my shortlist, but I will only choose a theme that has wide-screen support (and supports non-JS browsing through w3m & screen readers, which Doks does an OK job at already).

While this is an extreme example, it shows the problem nicely at 5120x1440:
image

[Feature] Open external sites in new tab

Summary

https://github.com/h-enk/doks
https://github.com/h-enk/doks-child-theme
https://github.com/h-enk/getdoks.org

When open external domains contained in navbar buttons, in pages or homepage, footer etc those are open in same tab then it leave the origin site. i think it's not suitable then external links should open in new tab by default whether it contain as hyperlink, button or plain text link

Basic example

eg: https://getdoks.org/
check navbar github buttons etc, home page and docs page external links and footer hugo etc links.

Motivation

As mentioned and that'll be good for sites that create using docks and docks child site themes and for other readers come to the getdoks site.

Typo in index.redirects: RelRelPermalink instead of RelPermalink

Description

I think there is a typo in file index.redirects, which prevents redirects to work (hugo fails to compile if an alias is created in any content markdown).
The content of the file is:

{{- range $p := .Site.Pages -}}
{{- range .Aliases }}
{{ . }} {{ $p.RelRelPermalink -}}
{{- end }}
{{- end -}}

I think $p.RelRelPermalink should be replaced with $p.RelPermalink.
As a workaround, I overwrote this file with its copy in the site directly, replaced the typo above, and now it works fine.

Steps to reproduce

  • Create a site using Doks template child theme
  • Create a markdown in the content folder, and add an alias in the front matter, e.g.:
aliases:
  - /Install-LDAPCP.html
  • Then start the server

Expected result

Compilation works

Actual result

Compilation fails

Environment

{
  'hugo-ldapcp': '0.1.0',
  npm: '6.14.13',
  ares: '1.17.1',
  brotli: '1.0.9',
  cldr: '38.1',
  icu: '68.2',
  llhttp: '2.1.3',
  modules: '83',
  napi: '8',
  nghttp2: '1.42.0',
  node: '14.17.0',
  openssl: '1.1.1k',
  tz: '2020d',
  unicode: '13.0',
  uv: '1.41.0',
  v8: '8.4.371.23-node.63',
  zlib: '1.2.11'
}

Disabling lazyLoad still uses placeholder image

Description

When disabling the lazy load feature via the params, the images are not shown directly with their normal sizes. Instead, the placeholder image is used and nothing happens at load.

Steps to reproduce

  1. Add in an img shortcode
  2. Disable lazyLoad in params.toml

Expected result

The normal image is loaded instantly without lazy loading applied

Actual result

Placeholder image is used, and you see a blurred version of the image instead

image

Environment

{
  'doks-child-theme': '0.2.3',
  npm: '6.14.4',
  ares: '1.16.0',
  brotli: '1.0.7',
  cldr: '36.1',
  icu: '66.1',
  llhttp: '2.0.4',
  modules: '79',
  napi: '6',
  nghttp2: '1.40.0',
  node: '13.14.0',
  openssl: '1.1.1g',
  tz: '2019c',
  unicode: '13.0',
  uv: '1.37.0',
  v8: '7.9.317.25-node.32',
  zlib: '1.2.11'
}

Adding other menus in main causes the searchbox to shrink

Description

The search box has a decent size with the default menu list. If another voice is added, it gets squeezed to the right and become unusable/bad for the UI.

Steps to reproduce

Add the following

[[main]]
  name = "MenuNew"
  url = "/something/"
  weight = 100

[[main]]
  name = "MenuOther"
  url = "/something/"
  weight = 200

Expected result

The search box should maintain a size, a minimum one, until it collides with the menu.

Actual result

Search box is squeezed and disappear.

NPM Install Fails with Error `[ERR_REQUIRE_ESM]: Must use import to load ES Module`

Description

When following the installation instructions on the readme, the NPM insall fails with an error "Must use import to load ES Module"

Steps to reproduce

  1. Clone the template
git clone https://github.com/h-enk/doks.git my-doks-site && cd my-doks-site
  1. Run npm install
npm install

Expected result

What should happen?

Actual result

└─(20:21:46 on master ✹)──> git clone https://github.com/h-enk/doks.git my-doks-site && cd my-doks-site
┌─(/tmp/my-doks-site)───────────────────────────────────────────────────────────────────────────────────────────────(tylerbutler@me:s000)─┐
└─(20:20:33 on master)──> npm install                                                                                       ──(Tue,Jul13)─┘
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated

> @hyas/[email protected] postinstall
> hugo-installer --version otherDependencies.hugo --extended

internal/modules/cjs/loader.js:1173
      throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
      ^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /private/tmp/my-doks-site/node_modules/hugo-installer/bin/hugo-installer.js
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1173:13)
    at Module.load (internal/modules/cjs/loader.js:1001:32)
    at Function.Module._load (internal/modules/cjs/loader.js:900:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
    at internal/main/run_main_module.js:18:47 {
  code: 'ERR_REQUIRE_ESM'
}
npm ERR! code 1
npm ERR! path /private/tmp/my-doks-site
npm ERR! command failed
npm ERR! command sh -c hugo-installer --version otherDependencies.hugo --extended

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/tylerbutler/.npm/_logs/2021-07-14T00_20_47_995Z-debug.log

Environment

┌─(/tmp/my-doks-site)───────────────────────────────────────────────────────────────────────────────────────────────(tylerbutler@me:s000)─┐
└─(20:20:48 on master ✹)──> neofetch                                                                                    1 ↵ ──(Tue,Jul13)─┘
                    'c.          tylerbutler@me
                 ,xNMM.          --------------
               .OMMMMo           OS: macOS 11.4 20F71 x86_64
               OMMM0,            Host: MacBookPro15,2
     .;loddo:' loolloddol;.      Kernel: 20.5.0
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 3 days, 3 hours
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 137 (brew)
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: zsh 5.8
;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 1440x900@2x
:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Quartz Compositor
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    WM Theme: Purple (Dark)
 .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal: iTerm2
  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   Terminal Font: MesloLGMForPowerline-Regular 14
    kMMMMMMMMMMMMMMMMMMMMMMd     CPU: Intel i7-8569U (8) @ 2.80GHz
     ;KMMMMMMMWXXWMMMMMMMk.      GPU: Intel Iris Plus Graphics 655
       .cooc,.    .,coo:.        Memory: 9527MiB / 16384MiB

Paste the information here as shown by npm run check

┌─(/tmp/my-doks-site)───────────────────────────────────────────────────────────────────────────────────────────────(tylerbutler@me:s000)─┐
└─(20:21:25 on master ✹)──> npm run check                                                                                   ──(Tue,Jul13)─┘

> @hyas/[email protected] precheck
> npm version

{
  '@hyas/doks': '0.3.3',
  npm: '7.12.1',
  node: '12.16.0',
  v8: '7.8.279.23-node.31',
  uv: '1.34.0',
  zlib: '1.2.11',
  brotli: '1.0.7',
  ares: '1.15.0',
  modules: '72',
  nghttp2: '1.40.0',
  napi: '5',
  llhttp: '2.0.4',
  http_parser: '2.9.3',
  openssl: '1.1.1d',
  cldr: '35.1',
  icu: '64.2',
  tz: '2019c',
  unicode: '12.1'
}

> @hyas/[email protected] check
> exec-bin bin/hugo/hugo version

internal/modules/cjs/loader.js:1173
      throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
      ^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /private/tmp/my-doks-site/node_modules/exec-bin/bin/exec-bin.js
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1173:13)
    at Module.load (internal/modules/cjs/loader.js:1001:32)
    at Function.Module._load (internal/modules/cjs/loader.js:900:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
    at internal/main/run_main_module.js:18:47 {
  code: 'ERR_REQUIRE_ESM'
}
┌─(/tmp/my-doks-site)───────────────────────────────────────────────────────────────────────────────────────────────(tylerbutler@me:s000)─┐
└─(20:21:46 on master ✹)──>

The images go beyond the boundary of the article

Description

image

Steps to reproduce

Please check the screenshot

Expected result

The images should be limited within the borders of a article

Actual result

The images go beyond the boundary of the article

Environment

{
'doks-child-theme': '0.3.3',
npm: '6.14.9',
ares: '1.16.1',
brotli: '1.0.9',
cldr: '37.0',
icu: '67.1',
llhttp: '2.1.3',
modules: '83',
napi: '7',
nghttp2: '1.41.0',
node: '14.15.3',
openssl: '1.1.1g',
tz: '2020a',
unicode: '13.0',
uv: '1.40.0',
v8: '8.4.371.19-node.17',
zlib: '1.2.11'
}

FlexSearch result URL is broken when baseURL is set

I just installed the latest version of doks and playing around with it.

I have to release our site under some baseURL like (https://somewhere.com/somebase/). I've configured baseURL in config/production/config.toml like so

baseurl = "https://somewhere.com/somebase/"

Everything works except when I search a page under FlexSearch bar, and when I click on the search result, it jumps to URL like https://somewhere.com/docs/somepage instead of https://somewhere.com/somebase/docs/somepage and user ends up with 404 error.

I've tried to configure the baseURL for FlexSearch but I couldn't find such option. I am not sure if this is a bug with FlexSearch or Doks, or hugo itself, but how should I fix this?

netlify command issue with URLs

The order of these commands is giving me trouble when using netlify-cli

Changing to this resolved the issue:

[context.production]
  command = "hugo --gc --minify -b $URL && npm run build:functions"

[context.deploy-preview]
  command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"

[context.branch-deploy]
  command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"

Netlify was printing out --gc as part of the URL path if the URL wasn't specified last.

npm run start just gives me file not found

Description

npm run start doesnt work it says file not found

Steps to reproduce

After running npm install, everything goes well,
then I do npm run start and go to the localhost and it says file not found.

this is what shows up when I do npm run start

Quotz@The-Tardis my-doks-site % npm run start

[email protected] prestart /Users/Quotz/Desktop/doks/themes/my-doks-site
npm run clean

[email protected] clean /Users/Quotz/Desktop/doks/themes/my-doks-site
rimraf public resources functions

[email protected] start /Users/Quotz/Desktop/doks/themes/my-doks-site
hugo server --disableFastRender

Start building sites …

               | EN  

-------------------+-----
Pages | 29
Paginator pages | 0
Non-page files | 1
Static files | 25
Processed images | 0
Aliases | 0
Sitemaps | 1
Cleaned | 0

Built in 349 ms
Watching for changes in /Users/Quotz/Desktop/doks/themes/my-doks-site/{archetypes,assets,babel.config.js,content,data,layouts,node_modules,package.json,static}
Watching for config changes in /Users/Quotz/Desktop/doks/themes/my-doks-site/config/_default
Environment: "development"
Serving pages from memory
Web Server is available at //localhost:1313/ (bind address 127.0.0.1)

And here it is when I do npm install

Quotz@The-Tardis my-doks-site % npm install
npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of popper.js@^1.16.1 but none is installed. You must install peer dependencies yourself.

audited 1232 packages in 5.828s

86 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

alert-link css missing

Description

Note: I'm not particularly skilled at front-end, so I'm potentially just making a stupid mistake since I don't see any other reports.

Currently it seems like the doks and doks-child-theme are not generating the alert-link css using npm run build. I tested the getdoks.org repo as well, and the results differ on the same machine. The result is links in light mode appear without an underline and with the same color as the background, and appear as normal text in dark mode.

This doesn't affect npm run start, it's only when the page is published to netlify or github pages that you see the issue. i.e. because of some difference between npm run build. The confusing thing is this doesn't affect the getdoks.org repo.

Steps to reproduce

  1. git clone [email protected]:h-enk/doks.git && cd doks
  2. Edit config/_default/params.toml and change alert to true
  3. npm install
  4. npm run build
  5. cat public/*.css | grep alert-link
  6. Repeat for [email protected]:h-enk/getdoks.org.git

Expected result

CSS should be the same between the dev environment and the live environment (except minified).

Actual result

CSS differs for this one particular area.

Environment

@hyas/[email protected] precheck
npm version

{
'@hyas/doks': '0.3.1',
npm: '7.7.6',
node: '15.14.0',
v8: '8.6.395.17-node.28',
uv: '1.41.0',
zlib: '1.2.11',
brotli: '1.0.9',
ares: '1.17.1',
modules: '88',
nghttp2: '1.42.0',
napi: '8',
llhttp: '2.1.3',
openssl: '1.1.1k+quic',
cldr: '38.1',
icu: '68.2',
tz: '2020d',
unicode: '13.0',
ngtcp2: '0.1.0-DEV',
nghttp3: '0.1.0-DEV'
}

@hyas/[email protected] check
exec-bin bin/hugo/hugo version

hugo v0.84.0-2C4689F7B+extended linux/amd64 BuildDate=2021-06-18T17:14:27Z VendorInfo=gohugoio

Can't use arrow keys for scrolling

Description

When I open my own page built with doks (forked from commit ecc76bf), or
doks.netlify.app (also as of commit ecc76bf), I can't use the arrow keys to scroll

Steps to reproduce

  1. Open doks.netlify.app (in firefox or chromium or qutebrowser on linux)
  2. Press down arrow

Expected result

I expect the page to scroll down by a little bit.

Actual result

The dev console prints error: "Uncaught type error: Cannot read property "focus" of undefined at HTMLDocument.suggestionFocus"

Add video shortcode

Summary

Responsively handling video embeds based on the width of the parent.

Basic example

Using Ratios

Motivation

See #237

Unlimited docs, collapsible navigation and full width

Summary

Of course, Doks is a standout theme, but for me it lacks the ability to create unlimited docs and collapsible docs menu to be excellent. Today the documentation part seems to be aimed at websites with one or two few page tutorials, but imagine a website that wants to publish 20 books with three levels of subpages, the menu management through menus.toml would be difficult and prone to errors. In these cases it seems better to manage the menu of each book through front matter. The solution would be to be able to create documentation with hugo new --kind docs /new/book and in the main menu an item could list all the books to choose which one to navigate. I have been testing Doks for a couple of days because I wanted to use it in my new project, in fact I had already started to put content in my local installation, but I have been blocked by these problems. My computer skills do not go any further.

Basic example

Collapsible book navigation example and full page width (If we are going to use the two side bars, why waste space? we need the full width): https://gohugo.io/documentation/

Unlimited docs: https://uniwebsidad.com/libros

Motivation

I have tried some themes and chose Academic in my previous project, when Doks was not born yet, and I think I can say that there is no perfect theme, they all require computer skills to be able to adapt each solution. Dummys like me always have the same question, if I had enough computer knowledge to adapt a topic, would I choose to adapt it or would I directly make a new one?
Please excuse me for my English, it comes from translate

Menu item with same name

When having a pages with the same name, across multiple first level section it will not be shown (on one of the two places).

---
title: "First things first"
description: ""
lead: ""
date: 2020-10-06T08:49:31+00:00
lastmod: 2020-10-06T08:49:31+00:00
draft: false
images: []
menu:
docs:
parent: "enterprise"
weight: 300
toc: true
---



---
title: "First things first"
description: ""
lead: ""
date: 2020-10-06T08:49:31+00:00
lastmod: 2020-10-06T08:49:31+00:00
draft: false
images: []
menu:
docs:
parent: "opensource"
weight: 300
toc: true
---

`highlightBlock()` in Highlight.js will be deprecated in next release

Description

highlightBlock() in Highlight.js will be deprecated in next release.

The API in Highlight.js v10.7 notifies the deprecation to the browser as belows;

スクリーンショット 2021-04-18 19 14 07

Would you like to replace highlightBlock() with highlightElement()?

Steps to reproduce

  1. Do the following steps.
  1. Open your developer console.
  2. Access the page includes code block. (e.g. docs/prologue/quick-start/)

Expected result

The notification is not shown.

Actual result

The notification is shown.

Environment

$ npm run check

> @hyas/[email protected] precheck
> npm version

{
  '@hyas/doks': '0.2.3',
  npm: '7.3.0',
  node: '15.5.1',
  v8: '8.6.395.17-node.23',
  uv: '1.40.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.17.1',
  modules: '88',
  nghttp2: '1.41.0',
  napi: '7',
  llhttp: '2.1.3',
  openssl: '1.1.1i',
  cldr: '37.0',
  icu: '67.1',
  tz: '2019c',
  unicode: '13.0'
}

> @hyas/[email protected] check
> hugo version

hugo v0.82.0-9D960784+extended darwin/amd64 BuildDate=2021-03-21T17:28:04Z VendorInfo=gohugoio

security vulnerabilities upon npm install

Description

% npm install
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.

added 1247 packages, and audited 1248 packages in 24s

98 packages are looking for funding
  run `npm fund` for details

19 vulnerabilities (11 moderate, 8 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
npm notice
npm notice New minor version of npm available! 7.7.6 -> 7.17.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.17.0
npm notice Run npm install -g [email protected] to update!
npm notice

After running npm audit fix I get

added 2 packages, removed 1 package, changed 17 packages, and audited 1249 packages in 12s

99 packages are looking for funding
  run `npm fund` for details

# npm audit report

glob-parent  <5.1.2
Severity: moderate
Regular expression denial of service - https://npmjs.com/advisories/1751
fix available via `npm audit fix`
node_modules/glob-parent
  chokidar  1.0.0-rc1 - 2.1.8
  Depends on vulnerable versions of glob-parent
  node_modules/watchpack-chokidar2/node_modules/chokidar
    watchpack-chokidar2  *
    Depends on vulnerable versions of chokidar
    node_modules/watchpack-chokidar2
      watchpack  1.7.2 - 1.7.5
      Depends on vulnerable versions of watchpack-chokidar2
      node_modules/watchpack
        webpack  4.44.0 - 4.46.0
        Depends on vulnerable versions of watchpack
        node_modules/webpack

normalize-url  <=4.5.0 || 5.0.0 - 5.3.0 || 6.0.0
Severity: high
Regular Expression Denial of Service - https://npmjs.com/advisories/1755
fix available via `npm audit fix --force`
Will install [email protected], which is a breaking change
node_modules/normalize-url
  cacheable-request  0.1.0 - 6.0.0
  Depends on vulnerable versions of normalize-url
  node_modules/cacheable-request
    got  8.0.0 - 9.5.0
    Depends on vulnerable versions of cacheable-request
    node_modules/got
      download  >=7.0.0
      Depends on vulnerable versions of got
      node_modules/download
        bin-wrapper  2.1.2 || >=4.0.0
        Depends on vulnerable versions of download
        node_modules/bin-wrapper
          hugo-bin  >=0.31.0
          Depends on vulnerable versions of bin-wrapper
          node_modules/hugo-bin

trim-newlines  <3.0.1 || =4.0.0
Severity: high
Regular Expression Denial of Service - https://npmjs.com/advisories/1753
fix available via `npm audit fix`
node_modules/get-pkg-repo/node_modules/trim-newlines
  meow  3.4.0 - 5.0.0
  Depends on vulnerable versions of trim-newlines
  node_modules/get-pkg-repo/node_modules/meow

13 vulnerabilities (5 moderate, 8 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Steps to reproduce

% npm install

Expected result

0 vulnerabilities

Actual result

19 or 13 vulnerabilities, including 8 high

Environment

> [email protected] precheck
> npm version

{
  'doks-child-theme': '0.2.3',
  npm: '7.7.6',
  node: '15.14.0',
  v8: '8.6.395.17-node.28',
  uv: '1.41.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.17.1',
  modules: '88',
  nghttp2: '1.42.0',
  napi: '8',
  llhttp: '2.1.3',
  openssl: '1.1.1k+quic',
  cldr: '38.1',
  icu: '68.2',
  tz: '2020d',
  unicode: '13.0',
  ngtcp2: '0.1.0-DEV',
  nghttp3: '0.1.0-DEV'
}

> [email protected] check
> hugo version

hugo v0.82.0-9D960784+extended darwin/amd64 BuildDate=2021-03-21T17:28:04Z VendorInfo=gohugoio

"Refused to load..." errors

Description

Site doesn't load stylesheet. and I get these console errors:

www.hugonewbie.com/:1 Refused to load the font 'https://hugonewbie.com/fonts/vendor/jost/jost-v4-latin-regular.woff2' because it violates the following Content Security Policy directive: "font-src 'self'".
www.hugonewbie.com/:1 Refused to load the font 'https://hugonewbie.com/fonts/vendor/jost/jost-v4-latin-700.woff2' because it violates the following Content Security Policy directive: "font-src 'self'".
www.hugonewbie.com/:1 Refused to load the stylesheet 'https://hugonewbie.com/main.0d8cd4d……f7e56be….css' because it violates the following Content Security Policy directive: "style-src 'self'". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.
www.hugonewbie.com/:1 Refused to load the image 'https://hugonewbie.com/apple-touch-icon.png' because it violates the following Content Security Policy directive: "img-src 'self' data:".
www.hugonewbie.com/:1 Refused to load the image 'https://hugonewbie.com/favicon-32x32.png' because it violates the following Content Security Policy directive: "img-src 'self' data:".
www.hugonewbie.com/:1 Refused to load the image 'https://hugonewbie.com/favicon-16x16.png' because it violates the following Content Security Policy directive: "img-src 'self' data:".
www.hugonewbie.com/:1 Refused to load the script 'https://hugonewbie.com/js/highlight.min.c393194……85ffc81….js' because it violates the following Content Security Policy directive: "script-src 'self'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
www.hugonewbie.com/:1 Refused to load the script 'https://hugonewbie.com/main.min.7ab5231……4f0ce75….js' because it violates the following Content Security Policy directive: "script-src 'self'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
www.hugonewbie.com/:1 Refused to load the script 'https://hugonewbie.com/index.min.503f5fc……7137d88….js' because it violates the following Content Security Policy directive: "script-src 'self'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
www.hugonewbie.com/:1 Refused to load manifest from 'https://hugonewbie.com/site.webmanifest' because it violates the following Content Security Policy directive: "manifest-src 'self'".
www.hugonewbie.com/:1 Refused to load the image 'https://hugonewbie.com/favicon-32x32.png' because it violates the following Content Security Policy directive: "img-src 'self' data:".
www.hugonewbie.com/:1 Refused to load the image 'https://hugonewbie.com/favicon-16x16.png' because it violates the following Content Security Policy directive: "img-src 'self' data:".
www.hugonewbie.com/:1 Refused to load the stylesheet 'https://hugonewbie.com/main.0d8cd4d……f7e56be….css' because it violates the following Content Security Policy directive: "style-src 'self'". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.
www.hugonewbie.com/:1 Refused to load manifest from 'https://hugonewbie.com/site.webmanifest' because it violates the following Content Security Policy directive: "manifest-src 'self'".

​

Steps to reproduce

deploy to netlify, after having had another documentation teme on there before (not sure if that's relevant)

Expected result

site should look right and not have all those unloadable files

Actual result

site not implementing theme, and generating a lot of "Refused to load..." errors

Environment

the netflify build command is hugo --gc --minify -b $URL

% npm run check

> [email protected] precheck
> npm version

{
  'doks-child-theme': '0.2.3',
  npm: '7.7.6',
  node: '15.14.0',
  v8: '8.6.395.17-node.28',
  uv: '1.41.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.17.1',
  modules: '88',
  nghttp2: '1.42.0',
  napi: '8',
  llhttp: '2.1.3',
  openssl: '1.1.1k+quic',
  cldr: '38.1',
  icu: '68.2',
  tz: '2020d',
  unicode: '13.0',
  ngtcp2: '0.1.0-DEV',
  nghttp3: '0.1.0-DEV'
}

> [email protected] check
> hugo version

hugo v0.82.1-60618210+extended darwin/amd64 BuildDate=2021-04-20T11:02:50Z VendorInfo=gohugoio

Failed create new page

Description

Error while creating a new page with the hugo command.

Steps to reproduce

hugo new ...

Expected result

Create new page

Actual result

Error: "/data/doks/layouts/partials/head/seo.html:33:1": parse failed: template: partials/head/seo.html:33: unexpected "-" in else

Environment

just after a git clone

Allow creating a link that points to an external site in menus.toml

Summary

I would like to add a link (either in docs or in main section) that redirects to an external site (for example, a link "report an issue" that redirects to my GitHub project).

Basic example

Something like this in menus.toml:

[[docs]]
  name = "Report an issue"
  url = "https://github.com/Yvand/LDAPCP/issues"
  weight = 100

Ideally, the link would render with an icon that indicates it redirects to an external site

Motivation

I think it makes sense from a navigation perspective. But maybe I'm using a wrong approach and menus.toml is not the right approach?

Images do not load correctly if the site is hosted in a subfolder

Description

If the website is hosted in a subfolder, the images used with the img shortcode do not seem to take this in account and instead try to load from the root location ending with a 404 error. It doesn't matter if the baseUrl has been changed in the config.

Steps to reproduce

  1. Add in an img shortcode
  2. Change the baseUrl to something with a subfolder (e.g. example.com/documentation)
  3. Host the site in a subfolder

Expected result

The image src is using the baseUrl with the subfolder and load correctly e.g.
https://my-doc-site.com/documentation/ui-pages_hue0d2ad0362a4496ebe400446b0521ccf_22136_20x0_resize_box_2.png

Actual result

The image src directly relates to the domain and ignores the subfolder e.g.
https://my-doc-site.com/ui-pages_hue0d2ad0362a4496ebe400446b0521ccf_22136_20x0_resize_box_2.png

Environment

{
  'doks-child-theme': '0.2.3',
  npm: '6.14.4',
  ares: '1.16.0',
  brotli: '1.0.7',
  cldr: '36.1',
  icu: '66.1',
  llhttp: '2.0.4',
  modules: '79',
  napi: '6',
  nghttp2: '1.40.0',
  node: '13.14.0',
  openssl: '1.1.1g',
  tz: '2019c',
  unicode: '13.0',
  uv: '1.37.0',
  v8: '7.9.317.25-node.32',
  zlib: '1.2.11'
}

failed to render shortcode "img-simple"

Description

short codes for images don't work

Steps to reproduce

git clone https://github.com/alexvpickering/doks
cd doks
npm install
npm run start

Expected result

Should build

Actual result

Error: Error building site: "/home/alex/doks/content/docs/prologue/introduction.md:22:1": failed to render shortcode "img-simple": failed to process shortcode: "/home/alex/doks/layouts/shortcodes/img-simple.html:2:18": execute of template failed: template: shortcodes/img-simple.html:2:18: executing "shortcodes/img-simple.html" at <$image.Resize>: nil pointer evaluating resource.Resource.Resize

Environment

Fedora 32
node v15.7.0

Paste the information here as shown by hyas info

bash: hyas: command not found...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.