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
Describe the bug
The theme has a (currently undocumented) site configuration option back_to_top. The theme docs set this option, and at the bottom of each docs page there is a link to the top of the page. However, this link is shown only when some unrelated options are set.
To Reproduce
Steps to reproduce the behavior:
Clone, build, and serve the theme docs website locally.
See that the "Back to top" link is shown at the bottom of any page.
See that the "Back to top" link is no longer shown.
Expected behavior
Whether the "Back to top" link is shown should be independent of the configuration settings for unrelated features.
Screenshots
N/A.
Desktop:
OS: macOS
Browser: Safari
Version: 17.2
Smartphone:
N/A
Additional context
The obvious fix is to always render the footer when site.back_to_top is set. However, it would improve the usability of the back-to-top feature if individual pages could override the site setting (to suppress the link on some short pages, or to show it on some long pages).
In any case, the back-to-top feature should be explained in the theme docs.
The text was updated successfully, but these errors were encountered:
Thanks for submitting this issue! I agree with both the expected behavior and additional context points.
Without having implemented it yet, I think the following should be simple-ish to do:
render back_to_top even if footer_content/*_edit_* is not set
thing to look at: does this look good? unsure
allow individual pages to override back_to_top (we've done this before w/ other site config variables)
document back_to_top
document that the footer will appear if at least one of back_to_top or footer_content or the *_edit_* is specified
Does that seem like it properly captures the issue? If so, we can mark this as ready to implement, and I can add it to my backlog (time to complete is up-in-the-air) and/or have someone else take it on (e.g. you!).
From a bigger picture perspective, it would be great to eventually nest all of these keys under some sort of footer key - that way, it would make it more clear that back_to_top is dependent on the footer being rendered. Ex, I'm thinking something like this:
footer:
content: "Lorem ipsum..."# this would replace site.footer_contentback_to_top: true # this would replace site.back_to_top# ditto for last_edit, gh_edit, ...
This would be a breaking change, so we'd probably have to defer to a v1. Broadly speaking, do you think this is a good idea?
Describe the bug
The theme has a (currently undocumented) site configuration option
back_to_top
. The theme docs set this option, and at the bottom of each docs page there is a link to the top of the page. However, this link is shown only when some unrelated options are set.To Reproduce
Steps to reproduce the behavior:
_config.yml
remove or comment out the settings forfooter_content
,last_edit_*
, andgh_edit_*
.Expected behavior
Whether the "Back to top" link is shown should be independent of the configuration settings for unrelated features.
Screenshots
N/A.
Desktop:
Smartphone:
N/A
Additional context
The obvious fix is to always render the footer when
site.back_to_top
is set. However, it would improve the usability of the back-to-top feature if individual pages could override the site setting (to suppress the link on some short pages, or to show it on some long pages).In any case, the back-to-top feature should be explained in the theme docs.
The text was updated successfully, but these errors were encountered: