-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Params to turn off next/previous page - and breadcrumb #137
Conversation
tweaked to allow
In page params or site params |
layouts/partials/footer.html
Outdated
{{with ($.Scratch.Get "nextPage")}} | ||
<a class="nav nav-next" href="{{.URL}}" title="{{.Title}}" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a> | ||
{{end}} | ||
{{$showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev))}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is equivalent to (or .Params.disableNextPrev .Site.Params.disableNextPrev)
. But I'm not sure this should be the condition to use.
Actually, I think page params should always override behaviour of site params when set. For example, we have a site and we choose to disable all nextprev for the site in the config.toml
, but we want to enable it on a single page tough. It's not possible with this implementation.
layouts/partials/header.html
Outdated
<span class="links"> | ||
{{ template "breadcrumb" dict "page" . "value" .Title }} | ||
{{$showBreadcrumb := (and (not .Params.disableBreadcrumb) (not .Site.Params.disableBreadcrumb))}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same thing
Thanks for this PR. Sorry, I'm super late. See my comments :) |
And btw, could you update the documentation (English part, I will do the french one ^^) with your changes ?
Thanks again :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need a moment to get my head around these.. Will try and get back to you asap!
Can we merge this in as a sitewide setting and add per-page override to the backlog? I've tried implementing this but can't solve without having a |
I think this is all good!
re: #136