You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version of Hugo you are using (output of hugo version): hugo v0.139.2-770f548b47b39e6f0fd4da1cc80552024e5829e1+extended windows/amd64 BuildDate=2024-11-23T15:33:51Z VendorInfo=gohugoio
OS:
Linux
macOS
Windows
Other:
Browser: Microsoft Edge 129.0.2792.89
Problem
If I create a single page document, e.g. content/en/test/test.md with the following content:
---title: Testmenu: {main}---
Some of
these lines
of text
will be hidden.
Then the first two lines will be hidden behind the header (not scrollable):
If I make the viewport less wide the problem goes away, but now there is a scrollbar that does not want to go away, no matter how tall the viewport gets:
Tested with docsy-example-0.11.0, I post this issue here because I don't think it is related to the example-project.
Updating hugo has no effect.
In contrast with other pages like docs, class td-main will not have a padding-top property.
Setting padding-top: 5.5rem to td-main fixes the issue,
The padding-top for other pages comes from _main-container.scss:
So after digging into the workings of bootstrap and CSS in general I found the following differences:
Below media-breakpoint-up(md) (<768px), the <header>-element has a non-zero height. Above that, the height of the element is zero, my guess is that this is related to the position: fixed property of the <nav>-element from _nav.scss:
This gets compensated for normal docs content by setting padding-top: 5.5rem in _main-container.scss (see original post).
This is because the content is inside an element named <main> within a div of class td-main:
For single-page content it doesn't work like this.
The content is inside an element named <main> with class td-main (subtle difference): <main role="main" class="td-main">
I'm not qualified to say what the acutal bug here is
Should the header-element always have a height?
Should the scss be fixed or extended?
Should single page content also generate an element named <main> within a div of class td-main ?
Environment
Version of Docsy you are using: 0.11.0
How are you using Docsy? As a:
Version of Hugo you are using (output of
hugo version
):hugo v0.139.2-770f548b47b39e6f0fd4da1cc80552024e5829e1+extended windows/amd64 BuildDate=2024-11-23T15:33:51Z VendorInfo=gohugoio
OS:
Browser: Microsoft Edge 129.0.2792.89
Problem
If I create a single page document, e.g.
content/en/test/test.md
with the following content:Then the first two lines will be hidden behind the header (not scrollable):
If I make the viewport less wide the problem goes away, but now there is a scrollbar that does not want to go away, no matter how tall the viewport gets:
Tested with
docsy-example-0.11.0
, I post this issue here because I don't think it is related to the example-project.Updating hugo has no effect.
In contrast with other pages like
docs
, classtd-main
will not have apadding-top
property.Setting
padding-top: 5.5rem
totd-main
fixes the issue,The
padding-top
for other pages comes from_main-container.scss
:It looks likemedia-breakpoint-up(md)
is not included for single page templates but I don't know how to fix this.The text was updated successfully, but these errors were encountered: