Skip to content

[fix] Update index.jinja2 for relative url path#282

Merged
nemesifier merged 1 commit into
masterfrom
index_redirect_relative_url_fix
May 19, 2026
Merged

[fix] Update index.jinja2 for relative url path#282
nemesifier merged 1 commit into
masterfrom
index_redirect_relative_url_fix

Conversation

@asmodehn

@asmodehn asmodehn commented May 19, 2026

Copy link
Copy Markdown
Member

This resolves #281
After this change the produced index,html should point to the correct /index.html, even if docs_root is not defined.

@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3b2dc0de-2002-49af-b6f2-22227f4c709f

📥 Commits

Reviewing files that changed from the base of the PR and between 93987e7 and 17eb78e.

📒 Files selected for processing (1)
  • _static/index.jinja2
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build
  • GitHub Check: auto-assign-issue / run-bot
  • GitHub Check: Kilo Code Review
🔇 Additional comments (1)
_static/index.jinja2 (1)

4-4: LGTM!


📝 Walkthrough

Walkthrough

The pull request modifies the meta-refresh redirect template in _static/index.jinja2 to guard against missing docs_root values. The template now conditionally includes the docs_root prefix with a trailing slash only when docs_root is present, then appends stable_version/index.html. This prevents malformed redirect URLs when docs_root is not set.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a brief description explaining why the conditional docs_root logic is necessary and what issue it resolves.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: updating index.jinja2 to fix relative URL path handling, which matches the file modification and conditional docs_root inclusion.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Bug Fixes ✅ Passed One-line template fix. Conditionally includes docs_root to prevent double slashes in relative URLs. One-line fixes are exempted from regression test requirements.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch index_redirect_relative_url_fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kilo-code-bot

kilo-code-bot Bot commented May 19, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

This PR makes a clean, minimal fix to support relative URL paths in the index redirect template. The change properly handles the case where docs_root might be empty or undefined by conditionally including the trailing slash only when docs_root has a value.

Files Reviewed (1 file)
  • _static/index.jinja2 - Simple Jinja2 conditional fix for relative URL support

Reviewed by kimi-k2.5 · 85,933 tokens

@nemesifier

Copy link
Copy Markdown
Member

Thanks @asmodehn!

@nemesifier
nemesifier merged commit 2b50816 into master May 19, 2026
7 checks passed
@nemesifier
nemesifier deleted the index_redirect_relative_url_fix branch May 19, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When docs_root is empty the refresh in indexhtml points to a wrong url

2 participants