Repository navigation
Display main page's Table of Contents when viewed from the index page - #1250
Merged
Merged
Conversation
st0012
force-pushed
the
display-main-page-tocs
branch
from
December 28, 2024 21:15
7b7869e to
b499478
Compare
vinistock
approved these changes
Jan 17, 2025
|
|
||
| index_html = File.binread('index.html') | ||
|
|
||
| # If there is no main page, the index page should not have a table of contents |
Collaborator
There was a problem hiding this comment.
Why not though? Is there a reason why we can't or don't want to display the table of contents every time?
Member
Author
There was a problem hiding this comment.
The lack of main page here means it'll literally only have one title This is the API documentation for My awesome Ruby project. and nothing else.
When the main page document is viewed as a standalone page, Darkfish displays the Table of Contents. When viewed from the index page, it does not. This page changes the behaviour to also display the Table of Contents when the main page document is viewed from the index page.
st0012
force-pushed
the
display-main-page-tocs
branch
from
January 21, 2025 10:31
b499478 to
190c909
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the main page document is viewed as a standalone page, Darkfish displays the Table of Contents. When viewed from the index page, it does not.
This page changes the behaviour to also display the Table of Contents when the main page document is viewed from the index page.
Before
After
In
ruby/ruby