mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-02-06 00:59:39 +03:00
Table of Contents as Home Page #520
Open
opened 2026-02-04 20:43:07 +03:00 by OVERLORD
·
14 comments
No Branch/Tag Specified
development
further_theme_development
l10n_development
release
llm_only
vectors
v25-11
docker_env
drawio_rendering
user_permissions
ldap_host_failover
svg_image
prosemirror
captcha_example
fix/video-export
v25.12.3
v25.12.2
v25.12.1
v25.12
v25.11.6
v25.11.5
v25.11.4
v24.11.4
v25.11.3
v25.11.2
v25.11.1
v25.11
v25.07.3
v25.07.2
v25.07.1
v25.07
v25.05.2
v25.05.1
v25.05
v25.02.5
v25.02.4
v25.02.3
v25.02.2
v25.02.1
v25.02
v24.12.1
v24.12
v24.10.3
v24.10.2
v24.10.1
v24.10
v24.05.4
v24.05.3
v24.05.2
v24.05.1
v24.05
v24.02.3
v24.02.2
v24.02.1
v24.02
v23.12.3
v23.12.2
v23.12.1
v23.12
v23.10.4
v23.10.3
v23.10.2
v23.10.1
v23.10
v23.08.3
v23.08.2
v23.08.1
v23.08
v23.06.2
v23.06.1
v23.06
v23.05.2
v23.05.1
v23.05
v23.02.3
v23.02.2
v23.02.1
v23.02
v23.01.1
v23.01
v22.11.1
v22.11
v22.10.2
v22.10.1
v22.10
v22.09.1
v22.09
v22.07.3
v22.07.2
v22.07.1
v22.07
v22.06.2
v22.06.1
v22.06
v22.04.2
v22.04.1
v22.04
v22.03.1
v22.03
v22.02.3
v22.02.2
v22.02.1
v22.02
v21.12.5
v21.12.4
v21.12.3
v21.12.2
v21.12.1
v21.12
v21.11.3
v21.11.2
v21.11.1
v21.11
v21.10.3
v21.10.2
v21.10.1
v21.10
v21.08.6
v21.08.5
v21.08.4
v21.08.3
v21.08.2
v21.08.1
v21.08
v21.05.4
v21.05.3
v21.05.2
v21.05.1
v21.05
v21.04.6
v21.04.5
v21.04.4
v21.04.3
v21.04.2
v21.04.1
v21.04
v0.31.8
v0.31.7
v0.31.6
v0.31.5
v0.31.4
v0.31.3
v0.31.2
v0.31.1
v0.31.0
v0.30.7
v0.30.6
v0.30.5
v0.30.4
v0.30.3
v0.30.2
v0.30.1
v0.30.0
v0.29.3
v0.29.2
v0.29.1
v0.29.0
v0.28.3
v0.28.2
v0.28.1
v0.28.0
v0.27.5
v0.27.4
v0.27.3
v0.27.2
v0.27.1
v0.27
v0.26.4
v0.26.3
v0.26.2
v0.26.1
v0.26.0
v0.25.5
v0.25.4
v0.25.3
v0.25.2
v0.25.1
v0.25.0
v0.24.3
v0.24.2
v0.24.1
v0.24.0
v0.23.2
v0.23.1
v0.23.0
v0.22.0
v0.21.0
v0.20.3
v0.20.2
v0.20.1
v0.20.0
v0.19.0
v0.18.5
v0.18.4
v0.18.3
v0.18.2
v0.18.1
v0.18.0
v0.17.4
v0.17.3
v0.17.2
v0.17.1
v0.17.0
v0.16.3
v0.16.2
v0.16.1
v0.16.0
v0.15.3
v0.15.2
v0.15.1
v0.15.0
v0.14.3
v0.14.2
v0.14.1
v0.14.0
v0.13.1
v0.13.0
v0.12.2
v0.12.1
v0.12.0
v0.11.2
v0.11.1
v0.11.0
v0.10.0
v0.9.3
v0.9.2
v0.9.1
v0.9.0
v0.8.2
v0.8.1
v0.8.0
v0.7.6
v0.7.5
v0.7.4
v0.7.3
0.7.2
v.0.7.1
v0.7.0
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.0
Labels
Clear labels
🎨 Design
📖 Docs Update
🐛 Bug
🐛 Bug
:cat2:🐈 Possible duplicate
💿 Database
☕ Open to discussion
💻 Front-End
🐕 Support
🚪 Authentication
🌍 Translations
🔌 API Task
🏭 Back-End
⛲ Upstream
🔨 Feature Request
🛠️ Enhancement
🛠️ Enhancement
🛠️ Enhancement
❤️ Happy feedback
🔒 Security
🔍 Pending Validation
💆 UX
📝 WYSIWYG Editor
🌔 Out of scope
🔩 API Request
:octocat: Admin/Meta
🖌️ View Customization
❓ Question
🚀 Priority
🛡️ Blocked
🚚 Export System
♿ A11y
🔧 Maintenance
> Markdown Editor
pull-request
Mirrored from GitHub Pull Request
No Label
🔨 Feature Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/BookStack#520
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jdrews on GitHub (Dec 13, 2017).
For Feature Requests
Desired Feature:
Looking for a table of contents that we can set as the home page. The use case is to allow for a jump point for new visitors. They may not know what they're looking for so a search doesn't always work.
@Shackelford-Arden commented on GitHub (Dec 13, 2017):
@jdrews
Are you looking for a table of contents to be auto-generated or are you simply looking for a way to set a custom home page that you've put together yourself?
You can already set any page as the home page for your bookstack instance by doing the following:
Would that help with what you're trying to do or are you looking for something else?
@jdrews commented on GitHub (Dec 14, 2017):
I am looking for a table of contents to be generated. This is similar to the
/booksdisplay, however I am looking for the contents of the books to be displayed as well (both chapters and pages).After we can generate a table of contents, I'd like to place that as the home page.
@jdrews commented on GitHub (Dec 14, 2017):
Thinking further, I could see a use case where there are so many pages that it could get unwieldy to display them on a table of contents. But for a smaller deployment it would be useful to see books, chapters, and pages on a table of contents.
Could the inclusion of pages be a configuration item?
@AbijeetP commented on GitHub (Dec 14, 2017):
I'm assuming you are looking for something similar to this but across books,
@jdrews commented on GitHub (Dec 14, 2017):
Yes Please!
@aljawaid commented on GitHub (Dec 24, 2017):
Having a Table of Contents (just like creating and auto cross-referencing the same from Microsoft Word) would make the BookStack book very printer/pdf friendly too. If there was an ability to show or hide the page numbers, then the final generated offline paper version of the book would be a lot more professional.
Just sharing my opinion.
My use case: for certain business terms and policies in particular books, there is no user access, just a printed paper version. At the moment, there is no company logo, header/footer, or table of contents/index. Having that stuff would make the online/offline same copies of the books awesome-r! :)
@Wookbert commented on GitHub (Oct 13, 2019):
@ssddanbrown @jdrews @littlebrighter
I am voting also for a full-fledged Table of Contents (ToC)/Index on the Homepage, and already spent some serious thoughts on this. Here’s a quick 'n dirty mockup:
ToC on homepage, below existing blocks
The existing blocks in the three columns should have the same maximal vertical length (in the above screenshot the middle block is too long. The lower left block should either be a) moved down a bit (this way the text/icons would vertically align across the three columns) or b) extended with white, so it aligns with the bottom of the middle block.
ToC in 3 columns ... or 2?
In my above mockup, I've used 3 columns and tried to horizontally align both icons and text with the 3 blocks above.
The problem with 3 ToC columns as pictured above is that the 3rd column on the right exceeds the block. This is in part because when looking at the above 3 blocks and my yellow markings, you see the gap between block 1-2 and 2-3, but that gap space is not existing on right side of the 3rd block. The ToC lines of each column could run up to each yellow marking ... if we wouldn't have the problem with the 3rd column.
Solution A: Ignore horizontal alignment of text/icon entirely and use a raster independent from the 3 blocks above
Solution B: Go for 2 columns.
Dealing with long headlines
Shorten the text or wrap it into the next line? I guess I'd go for wrapping with shortening after the 3rd line.
Icons & Colors
The above mockup shows icons only for books. My next post hereunder shows a life, actually working mockup where we incorporate both icons and the color scheme of books, chapters and pages.
Indention?
Chapters don't have necessarily to be indented (other than shown in the above mockup), but can/could be on the same indention level as the book title itself. One should test to display chapters in italic, as they don't have actual content.
Pages, Headline Large and Medium should be indented. Headline Small and Tiny could be on the same level? Question is: Are Headlines Tiny shown in the ToC? Down to which level do we go? Is this a user adjustable feature?
Order of book appearance
The above mockup has a sorting drop menu, similar to the Books and Shelves views. Sorting options should be Name, Created Date, Updated Date, Popular Books (how often a book gets opened, already exists in the left side navigation in the Books view; IMO a much needed sorting option).
@Wookbert commented on GitHub (Oct 13, 2019):
The following screenshot shows a BookStack Table of Contents Hack my partner has coded. It's live, generated on-the-fly from the actual books and fully working – but of course is a separate HTML page not implemented into BookStack. Our current implementation work-around: We've created a book in BookStack named „Table of contents“, which we are redirecting using the Apache server to our HTML page.
@nathlx commented on GitHub (Nov 15, 2022):
This looks great, did you publish this anywhere? or is it tied tightly to your implementation?
@jefry7 commented on GitHub (Aug 29, 2023):
Any progress on this feature? is there any way to get it?
@ccarlo88 commented on GitHub (Nov 12, 2023):
You are probably looking for something like this: #2477
@ssddanbrown commented on GitHub (Mar 8, 2025):
I wouldn't be opposed to having some form of "content index" page/UI to list everything as a tree representation, which could be then set as a homepage. The request/desire is generally low here though so wouldn't want to get too complex with it.
I would want to paginate the view, we could seek to have a high per-page count, but ultimately I wouldn't want to leave it unlimited since that can get into scaling issues on mahoosive instances.
The main question is how do we represent shelves?
It needs to be considered that they're optional, and also on a many-to-many relation with books.
Some may want them to be top level as part of the tree, but I wouldn't be keen on that due to UX issues in the various cases of shelf use.
I'm thinking the main tree should be kept with books top level, and maybe represent shelves as a tag/property within/on each book.
Tempted to ignore order/sorting for an index, just keep to name. Is there a real use-case for other sorts for an index?
If sorting was provided, with books top level, would you expect sorting to apply to just the top level books or their contents also? Sorting contents goes against how we typically represent book contents elsewhere.
@513ry commented on GitHub (Mar 8, 2025):
My proposal here was to implement a "Tree View"/"Table View" switch in addition to "Grid View" and "List View", which seems natural for UX. Another option I guess is to have it as an optional element on the home page, which seems less invasive but also more detached.
In my implementation, I have so far ignored the many-to-many relation between books and shelves (due to our specific use case), but it does seem challenging to handle correctly in the UI for some instances. What do you think the worst-case scenario would be? Some people may use shelves as a kind of tag system, thus books would get bloated all over the tree - is that the concern?
Your idea of representing shelves as tags seems great for reducing complexity, although the visual aspect of a tree would suffer from it.
If my proposal gets picked up, then integrating it with the homepage sort feature for the top level seems to follow the 'least surprise' principle.
@webkp commented on GitHub (Mar 19, 2025):
Every use case is probably different, but what I would like about the idea is that you have a better overview.
This would be great! For me, the homepage has no use as it is today. I always go straight to the shelves or books.
I would find an index of all content on the homepage helpful and logical. If you want to go directly to a specific level, you can still do this via the menu at the top (Shelves / Books).
I would find it more intuitive if it were displayed as it is everywhere (and shelves would also be displayed if there are any). So if a book is displayed on several shelves, I think it should be the same in the index. Perhaps it was set up this way by a user on purpose so that if someone doesn't have access to shelf A, they can still see the book on the shelf B relevant to their department, for example.
Not necessarily at shelf/book level, but as user, I would expect the sorting of chapters and pages in the index to be identical to the sorting in the book (and this does not necessarily have to be alphabetical).
In reply to @513ry
Things like:
would be very nice and helpful. Especially if you can use it anywhere.
Same for me.
For me as well.