deepmodeling / deepmodeling/deepmodeling_sphinx
[Code scan] Inject banner body markup outside <head>
- Dominant language
- CSS
- Stars
- 2
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
This issue is a result of a Codex global code scan of deepmodeling/deepmodeling_sphinx at commit 156679fe55fc61e8ec3b1e9be8a45fde3567b9cb.
Problem
`insert_sidebar()` injects the fully rendered banner immediately before ``, but `banner.html` contains visible body markup such as `
Code references:
https://github.com/deepmodeling/deepmodeling_sphinx/blob/156679fe55fc61e8ec3b1e9be8a45fde3567b9cb/deepmodeling_sphinx/inject.py#L68-L76
https://github.com/deepmodeling/deepmodeling_sphinx/blob/156679fe55fc61e8ec3b1e9be8a45fde3567b9cb/deepmodeling_sphinx/banner.html#L1-L6
https://github.com/deepmodeling/deepmodeling_sphinx/blob/156679fe55fc61e8ec3b1e9be8a45fde3567b9cb/deepmodeling_sphinx/banner.html#L11-L94
Impact
Browsers may recover by implicitly closing ``, but the output is invalid and can interact poorly with themes, crawlers, validators, and scripts that assume a normal head/body structure. In a minimal Sphinx HTML build, the generated page contains the banner `
Suggested fix
Split head-only tags from visible banner markup, or inject the visible banner immediately after the opening `` tag while keeping preconnect/favicon tags in ``. While touching the head tags, the SVG favicon should also use `type="image/svg+xml"` instead of `type="image/png"`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Inspect deepmodeling_sphinx/inject.py around lines 68-76 and the markup in deepmodeling_sphinx/banner.html. Reproduce the issue with a minimal Sphinx HTML build, then verify that visible banner markup is placed inside the body while head-only tags remain in the head and the SVG favicon type is corrected. Confirm the generated page has a valid head/body structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100