Just curious. why would pagination in blog be connected to sidebar?

Curious about this code at the start of blog.html.twig
{% set show_pagination = header_var(‘show_sidebar’)|default(true) %}

Which theme, Norma? Twig templates belong to themes, not Grav.

I think the answer might be simply that this is the decision of the theme creator. They’ve chosen to determine whether to show pagination based on whether the sidebar is visible. If it’s any consolation, I would not do it this way either.

Quark theme. And the blog.yaml has pagination defined and I think that it is not used - suspicious.

I stumbled across this template investigating something else today, and I think it’s a bug/copy-paste error and should be:

{% set show_pagination = header_var('show_pagination')|default(true) %}

I think there’s another (copy-paste) bug on line 4 which should be:

{% set show_breadcrumbs = header_var('show_breadcrumbs', '/blog')|default(true) %}

This is just how it looks from the context and I have not investigated enough to log an issue or submit a PR. Would you be interested in doing that?

How do I log an issue or submit a PR?

Sorry, my bad assumption!

Log in to github.com (create account first if needed), and go to the Quark repository.

The easiest way is to submit an issue and someone else will investigate and make the change. Search existing issues first just in case this has been reported already. Find the “New Issue” button and follow the project guidelines as much as possible. The most important things are:

  • use a descriptive title
  • provide details (you can be lazy and just link to this thread this time):
    • what’s happening?
    • what do you expect?
    • what do you think is wrong?
    • how can someone else reproduce this?

If you want to change the code yourself, do that, test it, and then submit a Pull Request (PR). The advantages here are that it makes it easier for the maintainers, and you get credit as a contributor. There are a few ways to submit your PR including one that’s not much more than editing the code on screen. Start with the Grav project PR guidelines and follow those generic Github links.

You can also submit an issue followed by a PR, and reference the issue the PR solves in its commit message or PR description. That way the two are linked. Also it gives you a bit of time to work out how PRs work (mention that you intend to submit a PR in the issue).