Skip to content

Conversation

@sfauvel
Copy link
Collaborator

@sfauvel sfauvel commented Jul 30, 2024

Content

When we access to the documentation with index.html at the end of the url (https://mithril.network/doc/index.html), the page content is displayed twice.

We inject a javascript in the doc/index.html to redirect to the clean url without index.htmlat the end.
The script is added at the beginning of the index.html.

<script type="text/javascript"> 
if (window.location.href.endsWith("/index.html")) {
    end_of_clean_url = window.location.href.lastIndexOf("/");
    window.location.href = window.location.href.substring(0, end_of_clean_url);
}
</script>

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • No clippy warnings in the CI
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • Add dev blog post (if relevant)

Comments

The issue is referenced in docusaurus repository: facebook/docusaurus#10059

Issue(s)

Closes #1867

@github-actions
Copy link

github-actions bot commented Jul 30, 2024

Test Results

    4 files  ±0     52 suites  ±0   9m 19s ⏱️ +4s
1 191 tests ±0  1 191 ✅ ±0  0 💤 ±0  0 ❌ ±0 
1 357 runs  ±0  1 357 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit cd369d0. ± Comparison against base commit 7a7396e.

♻️ This comment has been updated with latest results.

@sfauvel sfauvel temporarily deployed to testing-preview July 30, 2024 10:21 — with GitHub Actions Inactive
@sfauvel sfauvel temporarily deployed to testing-sanchonet July 30, 2024 10:21 — with GitHub Actions Inactive
@sfauvel sfauvel requested review from dlachaume and jpraynaud July 30, 2024 13:39
Copy link
Collaborator

@dlachaume dlachaume left a comment

Choose a reason for hiding this comment

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

Just a minor comment, otherwise LGTM 👍

@sfauvel sfauvel force-pushed the sfa/1867/page_content_duplicated_on_doc_index_html_page branch from 0004b6d to cd369d0 Compare July 31, 2024 10:05
@sfauvel sfauvel temporarily deployed to testing-preview July 31, 2024 10:12 — with GitHub Actions Inactive
@sfauvel sfauvel temporarily deployed to testing-sanchonet July 31, 2024 10:12 — with GitHub Actions Inactive
@sfauvel sfauvel marked this pull request as ready for review July 31, 2024 10:47
@sfauvel sfauvel merged commit a583ff1 into main Jul 31, 2024
@sfauvel sfauvel deleted the sfa/1867/page_content_duplicated_on_doc_index_html_page branch July 31, 2024 10:47
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.

Duplicate page on /index.html of website

4 participants