Is full width still possible with Doks 1.0?
Yvand opened this issue · 11 comments
I'm upgrading my site to @hyas/doks-core 1.0.5.
One thing I cannot do is to show my site with full width.
This was introduced in #636
I tried to enable it in my config/_default/hugo.toml
but it doesn't help:
[options]
fullWidth = true
Am I doing something wrong?
Side note: your links in https://github.com/h-enk/doks/issues/new/choose are broken, so I had to open a blank issue.
Thx. You're right — I will re-add this (soon)
Fixed — see also @hyas/doks-core v1.0.6
- In your project directory, run
npm i @hyas/doks-core@latest
- In
config/_default/hyas/doks.toml
setcontainerBreakpoint = "fluid"
- In
config/_default/params.yml
addmainSections: [docs]
Thank you, I tested and it works, but not as in previous Doks versions:
The width of the text in the middle column did not increase.
To illustrate, here is a screenshot before setting this config:
After applying this config:
My goal for the full width is that the extra space benefits mostly to the text in the middle column, similar to here (which still uses Doks 0.5.0).
Can I apply a config to do this?
Not a config setting (yet), but you can override the fixed width in your _custom.scss
:
.container-fw {
// max-width: 1200px;
max-width: 100%;
.docs-toc {
margin-left: 3rem;
}
}
Ok, I created assets/scss/_custom.scss
copied your content inside, deleted dir resources/_gen/assets/scss
, ran npm run dev
but it has no effect, I guess my scss is just not used.
Do I need to reference my new _custom.scss
somewhere?
Sorry if I ask dumb questions, my knowledge on Hugo / UI design is very low
In config/_default/module.toml
make sure you have:
[[mounts]]
source = "node_modules/@hyas/doks-core/assets"
target = "assets"
excludeFiles = "scss/common/_custom.scss"
And assets/scss/_custom.scss
s/b assets/scss/common/_custom.scss
Hmm, still no luck, I think I do not understand correctly your last message.
I will try again later, FYI I made all the changes in this commit, maybe you can see quickly my mistake.
You've placed your _custom.scss
in assets/scss/
But you should place it in assets/scss/common/
to be picked up
Also, in your package.json
bump "@hyas/doks-core": "^1.0.6"
to "@hyas/doks-core": "^1.0.7"
Yes it uses it successfully now ! Thank you !