How to remove recent activity, recent viewed, recent updated pages? #1201

Closed
opened 2026-02-05 00:14:59 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @blackshrub on GitHub (May 26, 2019).

Hi,

Just want to ask, how to remove the three widget on the left sidebar?

Thanks

Originally created by @blackshrub on GitHub (May 26, 2019). Hi, Just want to ask, how to remove the three widget on the left sidebar? Thanks
OVERLORD added the 🖌️ View Customization:cat2:🐈 Possible duplicate labels 2026-02-05 00:14:59 +03:00
Author
Owner

@ssddanbrown commented on GitHub (May 27, 2019):

Hello @blackshrub,
There is currently no way to do this within BookStack through the interface or existing options.

If you wanted to get a bit more advanced with the UI customization, you could either add custom CSS to do something like this via the "Custom Head HTML" option in the settings or look to use the unstable Custom Theme System.

Since this feature has been already requested in other issues, including #1291 and #515, I will close this to cut down on duplicates.

@ssddanbrown commented on GitHub (May 27, 2019): Hello @blackshrub, There is currently no way to do this within BookStack through the interface or existing options. If you wanted to get a bit more advanced with the UI customization, you could either add custom CSS to do something like this via the "Custom Head HTML" option in the settings or look to use the unstable [Custom Theme System](#652). Since this feature has been already requested in other issues, including #1291 and #515, I will close this to cut down on duplicates.
Author
Owner

@aegishajlmur commented on GitHub (May 19, 2023):

Thanks for your help !

@aegishajlmur commented on GitHub (May 19, 2023): Thanks for your help !
Author
Owner

@srvprivate commented on GitHub (Jul 30, 2025):

Here is the code necessary for hiding the Left Bar Recent Activity for unauthenticated users, the right bar "Revisions" section, but maintains Recent activity for logged in users. This took me awhile.

<script>
document.addEventListener("DOMContentLoaded", function () {
    // Detect public user by checking for the "Log in" link in the header
    const isPublicUser = document.querySelector('a[href*="/login"]') !== null;

    if (isPublicUser) {
        // Hide left sidebar Recent Activity block
        const recentActivity = document.querySelector('#recent-activity');
        if (recentActivity) recentActivity.style.display = 'none';

        // Hide revision-like metadata in the right sidebar (Updated by, Created by)
        const entityMeta = document.querySelectorAll('.entity-meta-item');
        entityMeta.forEach(item => {
            const text = item.textContent.toLowerCase();
            if (text.includes('updated') || text.includes('created')) {
                item.style.display = 'none';
            }
        });

        // Hide "Revisions" links if any appear (future-proofing)
        const links = document.querySelectorAll('a[href*="/revisions"]');
        links.forEach(link => {
            link.style.display = 'none';
        });
    }
});
</script>
@srvprivate commented on GitHub (Jul 30, 2025): Here is the code necessary for hiding the Left Bar Recent Activity for unauthenticated users, the right bar "Revisions" section, but maintains Recent activity for logged in users. This took me awhile. ``` <script> document.addEventListener("DOMContentLoaded", function () { // Detect public user by checking for the "Log in" link in the header const isPublicUser = document.querySelector('a[href*="/login"]') !== null; if (isPublicUser) { // Hide left sidebar Recent Activity block const recentActivity = document.querySelector('#recent-activity'); if (recentActivity) recentActivity.style.display = 'none'; // Hide revision-like metadata in the right sidebar (Updated by, Created by) const entityMeta = document.querySelectorAll('.entity-meta-item'); entityMeta.forEach(item => { const text = item.textContent.toLowerCase(); if (text.includes('updated') || text.includes('created')) { item.style.display = 'none'; } }); // Hide "Revisions" links if any appear (future-proofing) const links = document.querySelectorAll('a[href*="/revisions"]'); links.forEach(link => { link.style.display = 'none'; }); } }); </script> ```
Author
Owner

@MrGecco commented on GitHub (Jul 30, 2025):

Man i just googled for it 👍 justed adapted the script a litte

<script>
document.addEventListener("DOMContentLoaded", function () {
    // Detect public user by checking for the "Log in" link in the header
    const isPublicUser = document.querySelector('a[href*="/login"]') !== null;

    if (isPublicUser) {
        // Hide left sidebar Recent Activity block
        const recentActivity = document.querySelector('#recent-activity');
        if (recentActivity) recentActivity.style.display = 'none';

        // ADDED - Hide left sidebar Recent Updates block
        const recentlyUpdatedPages = document.querySelector('#recently-updated-pages');
        if (recentlyUpdatedPages) recentlyUpdatedPages.parentElement.style.display = 'none';
      
        // Hide revision-like metadata in the right sidebar (Updated by, Created by)
        // ADAPTED - not checking if "created" appears > language-independent 
        const entityMeta = document.querySelectorAll('.entity-meta-item');
        entityMeta.forEach(item => {
            const text = item.textContent.toLowerCase();
            //if (text.includes('updated') || text.includes('created')) {
                item.style.display = 'none';
            //}
        });

        // Hide "Revisions" links if any appear (future-proofing)
        const links = document.querySelectorAll('a[href*="/revisions"]');
        links.forEach(link => {
            link.style.display = 'none';
        });
    }
});
</script>
@MrGecco commented on GitHub (Jul 30, 2025): Man i just googled for it 👍 justed adapted the script a litte ``` <script> document.addEventListener("DOMContentLoaded", function () { // Detect public user by checking for the "Log in" link in the header const isPublicUser = document.querySelector('a[href*="/login"]') !== null; if (isPublicUser) { // Hide left sidebar Recent Activity block const recentActivity = document.querySelector('#recent-activity'); if (recentActivity) recentActivity.style.display = 'none'; // ADDED - Hide left sidebar Recent Updates block const recentlyUpdatedPages = document.querySelector('#recently-updated-pages'); if (recentlyUpdatedPages) recentlyUpdatedPages.parentElement.style.display = 'none'; // Hide revision-like metadata in the right sidebar (Updated by, Created by) // ADAPTED - not checking if "created" appears > language-independent const entityMeta = document.querySelectorAll('.entity-meta-item'); entityMeta.forEach(item => { const text = item.textContent.toLowerCase(); //if (text.includes('updated') || text.includes('created')) { item.style.display = 'none'; //} }); // Hide "Revisions" links if any appear (future-proofing) const links = document.querySelectorAll('a[href*="/revisions"]'); links.forEach(link => { link.style.display = 'none'; }); } }); </script>
Author
Owner

@srvprivate commented on GitHub (Jul 30, 2025):

@MrGecco That's wild. I've been working on installing this the past few days and that was an issue for me. No one on Google had anything sufficient, so i plugged away. Does your additions help?

@srvprivate commented on GitHub (Jul 30, 2025): @MrGecco That's wild. I've been working on installing this the past few days and that was an issue for me. No one on Google had anything sufficient, so i plugged away. Does your additions help?
Author
Owner

@MrGecco commented on GitHub (Jul 30, 2025):

@srvprivate I had it on my ToDo but didn't have time yet. Thank you for sharing
I just extended it a little. My goal was that a public visitor doens't see anything and can't access a page without knowing the link. So the public user doesn't have view-rights on the book, but on e.g. chapter and pages. Thus, I hide the "Recent update block" too.

Furthermore, our bookstack instance is not running on EN and a small adapted was necessary.

@MrGecco commented on GitHub (Jul 30, 2025): @srvprivate I had it on my ToDo but didn't have time yet. Thank you for sharing I just extended it a little. My goal was that a public visitor doens't see anything and can't access a page without knowing the link. So the public user doesn't have view-rights on the book, but on e.g. chapter and pages. Thus, I hide the "Recent update block" too. Furthermore, our bookstack instance is not running on EN and a small adapted was necessary.
Author
Owner

@srvprivate commented on GitHub (Jul 30, 2025):

Got it! I'll steal your version haha.

@srvprivate commented on GitHub (Jul 30, 2025): Got it! I'll steal your version haha.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1201