Thanks a lot for your hint, it helps.

Is it also possible to exclude using regular expressions? I tried
{% if pagename != "search" and (not re.match(pagename, "java/org/simgrid")) %}

but it fails because the re module was not imported. I tried to import
it from my conf.py, but it's not enough.

Thanks in advance, 
Mt.

On Thu, May 23, 2019 at 11:23:46AM -0700, Jared Dillard wrote:
> I use pagename to exclude putting a feedback form on some pages:
> 
> {% if pagename != "search" %}
> <div class="feedback">
> This is a feedback form
> </div>
> {% endif %}
> 
> On Thu, May 23, 2019 at 10:41 AM Martin Quinson <
> [email protected]> wrote:
> 
> > Hello,
> >
> > I'm trying to disable the "Edit on GitLab" button on some specific
> > pages, because they are generated and don't exist in gitlab. In
> > particular, I'd do so for the pages generated by javasphinx-apidoc, as
> > well as search.html and genindex.html.
> >
> > I was thinking of replacing "display_gitlab": True in my conf.py by a
> > conditional depending on the file name, but I have absolutely no clue
> > of how to do so, and I'm not even sure it's feasible, actually.
> >
> > I tried googling around, but fail to find the right keywords.
> >
> > Any hint, anyone?
> >
> > Thanks in advance,
> > Mt.
> >
> > --
> > Simplicity does not precede complexity, but follows it.
> >    -- "Epigrams in Programming", by Alan J. Perlis of Yale University.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "sphinx-users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to [email protected].
> > To post to this group, send email to [email protected].
> > Visit this group at https://groups.google.com/group/sphinx-users.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/sphinx-users/20190523173737.GM22901%40nouzonket
> > .
> > For more options, visit https://groups.google.com/d/optout.
> >
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/sphinx-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sphinx-users/CAHoez_%3Dt2kCFnMF6DBu-EB6Yn3jR9iw-aLvgWjvEPq%3DA9S1SdQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
I have not failed. I've just found 10,000 ways that won't work. 
                                  -- Thomas Edison

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sphinx-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-users/20190524211801.GP22901%40nouzonket.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: PGP signature

Reply via email to