Skip to content

feat: Implement configurable independent community sub-sites with modular navigation base on verl#111

Merged
zheliuyu merged 3 commits intoAscend:mainfrom
justbin-coder:verl-portal
Mar 23, 2026
Merged

feat: Implement configurable independent community sub-sites with modular navigation base on verl#111
zheliuyu merged 3 commits intoAscend:mainfrom
justbin-coder:verl-portal

Conversation

@justbin-coder
Copy link
Contributor

verview
This PR introduces a generic, highly extensible solution for "independent community sub-sites". Using the verl community 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 the independent_communities dictionary and an update_page_context hook 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.
  • Doc Source Files: Optimized the inclusion method for long documents (using MyST include) to resolve duplicate H1 conflicts and blank rendering issues.

Testing & Effects

  • Navigation Isolation: Navigating to the verl community exclusively displays its own documents in the left sidebar, successfully hiding global unrelated content.
  • Modular Categorization: The sidebar correctly categorizes items into modules like "Getting Started", "Application Guide", etc.
  • Long Document Experience: When opening long Markdown documents (e.g., Ascend Performance Analysis Guide), its inner H2/H3 headings correctly expand and track active highlights in the left sidebar, with the main content rendering completely on the right.

@ascend-robot
Copy link

CLA Signature Pass

justbin-coder, thanks for your pull request. All authors of the commits have signed the CLA. 👍

1 similar comment
@ascend-robot
Copy link

CLA Signature Pass

justbin-coder, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@ascend-robot
Copy link

CLA Signature Pass

justbin-coder, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@ascend-robot
Copy link

CLA Signature Pass

justbin-coder, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@ascend-robot
Copy link

CLA Signature Pass

justbin-coder, thanks for your pull request. All authors of the commits have signed the CLA. 👍

1 similar comment
@ascend-robot
Copy link

CLA Signature Pass

justbin-coder, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@ascend-robot
Copy link

CLA Signature Pass

justbin-coder, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@ascend-robot
Copy link

CLA Signature Pass

justbin-coder, thanks for your pull request. All authors of the commits have signed the CLA. 👍

1 similar comment
@ascend-robot
Copy link

CLA Signature Pass

justbin-coder, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@ascend-robot
Copy link

CLA Signature Pass

justbin-coder, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@ascend-robot
Copy link

CLA Signature Pass

justbin-coder, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@justbin-coder
Copy link
Contributor Author

Uploading verl doc.png…

@tardis-key
Copy link

What's in _static/ascend_config.json, such a huge change

Copy link
Collaborator

@zheliuyu zheliuyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much for bringing usability features to the Ascend/docs. Here are a few review comments for your reference.

In general, we prefer to maintain the original architecture of automated documentation builds without adding excessive local documentation. Ideally, the ./sources folder should only contain directory indexes for the documentation, which would significantly reduce maintenance overhead.

@@ -0,0 +1,2 @@

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These documentation files only contain include directives. Could this functionality be automated during the make stage—for example, by moving it into the Makefile?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation is now configured to reference the official upstream files directly

@@ -0,0 +1,2 @@

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

conf.py Outdated
# ones.
extensions = [
'recommonmark',
# 'recommonmark',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is confirmed that recommonmark is no longer needed, it can be removed directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

conf.py Outdated
'open_source_development': '🔧 开源开发'
}
},
# 未来增加 sglang,只需在这里解除注释即可,不用改代码
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following clean code practices, any temporarily unavailable feature should be deleted, not just commented out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that ascend_config.json turns an automated documentation build into a local one. This approach introduces excessive code and is difficult to maintain. I recommend sticking with the original method.

@ascend-robot
Copy link

CLA Signature Pass

justbin-coder, thanks for your pull request. All authors of the commits have signed the CLA. 👍

1 similar comment
@ascend-robot
Copy link

CLA Signature Pass

justbin-coder, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@ascend-robot
Copy link

CLA Signature Pass

justbin-coder, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@justbin-coder
Copy link
Contributor Author

image

@justbin-coder
Copy link
Contributor Author

What's in _static/ascend_config.json, such a huge change

this large change in _static/ascend_config.json was triggered automatically after updating the Makefile. I have removed the file from the current commit and added it to .gitignore to keep the PR clean. i think it must to refactor the configuration writing logic in a future PR to prevent this issue.

<!-- 快速开始 -->
<h2 class="verl-section-title">🚀 快速开始</h2>
<div class="verl-quick-grid">
<a href="../_generated/sources/verl/quick_start/ascend_quick_start.html" class="verl-quick-card">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that there is an error in the referenced documentation path.

Image Image

@@ -1,12 +1,247 @@
verl
============
verl - 大模型强化学习训练框架
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议去掉标题中的 ”大模型强化学习训练框架“ ,以便和目录中其他项目的名称保持一致。对项目所在应用领域的注解可在文档正文中给出。

@ascend-robot
Copy link

CLA Signature Pass

justbin-coder, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@justbin-coder
Copy link
Contributor Author

image

@ascend-robot
Copy link

CLA Signature Pass

justbin-coder, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@zheliuyu zheliuyu merged commit 1fdc48d into Ascend:main Mar 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants