gethyas / doks Goto Github PK
View Code? Open in Web Editor NEWEverything you need to build a stellar documentation website. Fast, accessible, and easy to use.
Home Page: https://getdoks.org
License: MIT License
Everything you need to build a stellar documentation website. Fast, accessible, and easy to use.
Home Page: https://getdoks.org
License: MIT License
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.
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
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
Please check the screenshot
The images should be limited within the borders of a article
The images go beyond the boundary of the article
{
'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'
}
npm run start doesnt work it says file not found
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
Hello, is it normal the the js/vendor dir stays empty?
Add a Breadcrumb navigation (with microdata markup) to the top of the page.
It makes it easier to orientate through the site. Could be an optional thing.
Error while creating a new page with the hugo command.
hugo new ...
Create new page
Error: "/data/doks/layouts/partials/head/seo.html:33:1": parse failed: template: partials/head/seo.html:33: unexpected "-" in else
just after a git clone
Fusejs supports more language search, such as Japanese, Chinese, Korean, etc. And it's very friendly with Hugo.
https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae
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.
After cloning this theme into the /themes directory, I get the error: failed to extract shortcode: template for shortcode "gallery" not found
It should work
What should happen?
Results in error message above
What happened.
Paste the information here as shown by npm run check
Make the left sidebar navigation available on top, and consider also making the TOC navigation available on top.
See also:
Now, a user has to scroll to the bottom of a page to navigate to another documentation page.
See also: #65
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.
CSS should be the same between the dev environment and the live environment (except minified).
CSS differs for this one particular area.
@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
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.
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.
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;
Would you like to replace highlightBlock()
with highlightElement()
?
docs/prologue/quick-start/
)The notification is not shown.
The notification is shown.
$ 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
The scroll bard in code blocks with large content disappears in dark mode.
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
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.
Paste the information here as shown by npm run check
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.
% npm run start
after cloning repo
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"
no http: so the link is not clickable.
> [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
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.
aliases:
- /Install-LDAPCP.html
Compilation works
Compilation fails
{
'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'
}
short codes for images don't work
git clone https://github.com/alexvpickering/doks
cd doks
npm install
npm run start
Should build
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
Fedora 32
node v15.7.0
Paste the information here as shown by hyas info
bash: hyas: command not found...
current config of flexSearch may don't support break Chinese word.
Create some documents containing CJK characters, then type keyword CJK characters in headers' search area.
display the documents indexed by title or description of documents.
show nothing.
URL's metatags are relative, s/b absolute โ in non development environments.
npm run build
<meta property="og:url" content="/"><meta property="og:image" content="/doks.png">
See also e.g. doks.netlify.app
<meta property="og:url" content="https://doks.netlify.app/"><meta property="og:image" content="https://doks.netlify.app/doks.png">
<meta property="og:url" content="/"><meta property="og:image" content="/doks.png">
> @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
Add sub navigation (1 level deep) to navbar โ as an option
./config/_default/menus/menus.en.toml
, and if, how?With our first beta release of Bootstrap 5, weโre calling it on new features and breaking changes.
% 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
% npm install
0 vulnerabilities
19 or 13 vulnerabilities, including 8 high
> [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
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
I expect the page to scroll down by a little bit.
The dev console prints error: "Uncaught type error: Cannot read property "focus" of undefined at HTMLDocument.suggestionFocus"
Providing Doks as a npm package + using Hugo module mounts to put things in place, will allow you to use Doks in a parent theme - child theme setup. And, update Doks when a new version is released.
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).
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
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?
The text typed inside search bar, in dark mode is invisible
The text being typed should be visible (should be white/light color).
The color of text was dark (possibly same as that of the dark background) & thus it was not visible.
I am sorry, I don't have access to nodejs
OS: Windows
Browsers: Firefox, Edge
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.
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
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
{
'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'
}
Added the following script on top of layouts\partials\header\header.html to:
<script>
if (localStorage.getItem('theme') === 'dark' || localStorage.getItem('theme') === null) {
document.body.classList.add('dark');
}
</script>
Not sending PR as this is just a quick hack I needed.
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.
Add the following
[[main]]
name = "MenuNew"
url = "/something/"
weight = 100
[[main]]
name = "MenuOther"
url = "/something/"
weight = 200
The search box should maintain a size, a minimum one, until it collides with the menu.
Search box is squeezed and disappear.
Brief explanation of the feature.
https://henkverlinde.com/introduction-to-npm/
Why are we doing this? What use cases does it support? What is the expected outcome?
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.
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" }}
way around the Hugo problem with canonical for pagination pages is described here:
https://moonbooth.com/hugo/seo/#canonicals
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.
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?
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 }}
When viewed on localhost, it renders correctly like this:
When minified and pushed to github pages, the table renders like this:
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
When following the installation instructions on the readme, the NPM insall fails with an error "Must use import to load ES Module"
git clone https://github.com/h-enk/doks.git my-doks-site && cd my-doks-site
npm install
What should happen?
โโ(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
โโ(/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 โน)โโ>
Brief explanation of the feature.
Why are we doing this? What use cases does it support? What is the expected outcome?
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'".
๏ปฟ
โ
deploy to netlify, after having had another documentation teme on there before (not sure if that's relevant)
site should look right and not have all those unloadable files
site not implementing theme, and generating a lot of "Refused to load..." errors
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
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.
The normal image is loaded instantly without lazy loading applied
Placeholder image is used, and you see a blurred version of the image instead
{
'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'
}
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
eg: https://getdoks.org/
check navbar github buttons etc, home page and docs page external links and footer hugo etc links.
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.
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?
Add a Mermaid theme switch respecting the dark/light toggle. So, default Mermaid theme when toggled light, and dark Mermaid theme when toggled dark.
See e.g. Drawing diagrams in Sanity with Mermaid.js.
Better dark mode support.
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
---
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.