Gollum: Hiding buttons

Created on 29 May 2020  路  4Comments  路  Source: gollum/gollum

Is there a way to hide buttons (Overview, Last Changes, Page History)? If so, how? Thanks!

Most helpful comment

I added ids to the buttons that didn't have them before in https://github.com/gollum/gollum/pull/1577. This means that you can now hide buttons through custom.js like so:

$( document ).ready(function() {
    $('#minibutton-overview').hide();
    $('#minibutton-history').hide();
    $('#minibutton-latest-changes').hide();
});

Just make sure to commit custom.js to the root of your repository. Hope this helps @Fastidious !

All 4 comments

The most straightforward way I think would be give each button an id and then use jQuery to select the buttons you want to hide (e.g., $('nav_overview').hide()). The first part would require a PR to gollum to add the ids, the hiding part could be done in custom.js.

What about using custom templates?

What about using custom templates?

Certainly another possibility. It's just that I think it wouldn't be unreasonable to give buttons ids.

I added ids to the buttons that didn't have them before in https://github.com/gollum/gollum/pull/1577. This means that you can now hide buttons through custom.js like so:

$( document ).ready(function() {
    $('#minibutton-overview').hide();
    $('#minibutton-history').hide();
    $('#minibutton-latest-changes').hide();
});

Just make sure to commit custom.js to the root of your repository. Hope this helps @Fastidious !

Was this page helpful?
0 / 5 - 0 ratings