Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Sticky" masthead/top navigation bar #1085

Closed
2 tasks done
ghost opened this issue Jun 27, 2017 · 4 comments
Closed
2 tasks done

"Sticky" masthead/top navigation bar #1085

ghost opened this issue Jun 27, 2017 · 4 comments

Comments

@ghost
Copy link

ghost commented Jun 27, 2017

  • This is a question about using the theme.
  • This is a feature request.

Dear MR,

When using the sidebar navigation in MM, it stays fixed when scrolling down a page. Is it possible to do the same with the headmast/top nav and the footer? (example http://idratherbewriting.com/documentation-theme-jekyll/ and https://aksakalli.github.io/jekyll-doc-theme/)

@mmistakes mmistakes changed the title Fixing masthead/top navigation to top of screen. "Sticky" masthead/top navigation bar Sep 6, 2017
@stale
Copy link

stale bot commented Oct 6, 2017

This issue has been automatically marked as stale because it has not had recent activity.

If this is a bug and you can still reproduce this error on the master branch, please reply with any additional information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in 7 days if no further activity occurs. Thank you for all your contributions.

@couet
Copy link

couet commented Nov 1, 2019

I am interested in that also ... I managed to make the top bar fixed with some tricks but then the side menu bar hides and the TOC are hidden on top when scrolling and the section headers are also hidden when clicking on an item in the TOC.... that's very annoying ....

@fortierq
Copy link

fortierq commented Jan 1, 2021

Here is an example, to add a sticky class to masthead: fortierq/fortierq.github.io@477b98f

Result: https://fortierq.github.io/python-dev-1

snxoxopy added a commit to snxoxopy/archives_backup that referenced this issue Apr 22, 2021
koyumi0601 pushed a commit to koyumi0601/koyumi0601.github.io that referenced this issue Jul 31, 2023
Avoid Liquid failure when no pages with titles

Fix issue mmistakes#1085

The user's config specified collections (incorrectly). Trying to build the site resulted in Jekyll failing due to a Liquid error. The error report did not suggest the cause of the error.

Liquid fails with division by 0 when title_pages_size is 0. This fix guards that code by checking that title_pages is non-empty.

To test:

1.  Specify a Jekyll collection with no pages, and specify it as a JTD collection.
2. Build the site.
3. Check that the specified collection has no nav links to pages.
@josecastillolema
Copy link

Thanks for your example @fortierq .
I your example I see that the anchors are being overlapped by the sticky masthead.
Does anyone has a solution to adjust this?
I have played around with scroll-margin-top in the CSS but I have been unable to solve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants