feat: Implement configurable independent community sub-sites with modular navigation base on verl#111
Open
justbin-coder wants to merge 1 commit intoAscend:mainfrom
Open
feat: Implement configurable independent community sub-sites with modular navigation base on verl#111justbin-coder wants to merge 1 commit intoAscend:mainfrom
justbin-coder wants to merge 1 commit intoAscend:mainfrom
Conversation
…ular navigation base on verl
CLA Signature Passjustbin-coder, thanks for your pull request. All authors of the commits have signed the CLA. 👍 |
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.
verview
This PR introduces a generic, highly extensible solution for "independent community sub-sites". Using the
verlcommunity as the first use case, it achieves sidebar content isolation, modular navigation based on the developer journey, and dynamic extraction of in-page TOCs for long documents. Future communities can be onboarded seamlessly by simply updating a configuration dict without any code changes.Core Modifications
conf.py: Added theindependent_communitiesdictionary and anupdate_page_contexthook to intercept paths during build and dynamically inject community configs to the frontend._templates/layout.html: Utilized JS to dynamically reconstruct the DOM. It extracts the current community's directory tree, generates native-compliant category captions, and smartly elevates deep TOC levels to display inner headings._static/custom.css: Added dedicated styles for#independent-sidebar, perfectly inheriting the active highlights and collapsible interactions of the native Sphinx RTD theme.include) to resolve duplicate H1 conflicts and blank rendering issues.Testing & Effects
verlcommunity exclusively displays its own documents in the left sidebar, successfully hiding global unrelated content.