Skip to content

Commit a583ff1

Browse files
authored
Merge pull request #1869 from input-output-hk/sfa/1867/page_content_duplicated_on_doc_index_html_page
Add a redirection on index.html to clean url
2 parents 7a7396e + cd369d0 commit a583ff1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,8 @@ jobs:
909909
run: |
910910
echo "mithril.network" > ./github-pages/CNAME
911911
echo '<!DOCTYPE html><html><head><meta http-equiv="Refresh" content="0; URL=https://mithril.network/doc"></head></html>' > ./github-pages/index.html
912+
# Remove the index.html from the url to avoid a display issue that duplicates the content of the page
913+
sed -i '1s/^/<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>\n/' ./github-pages/doc/index.html
912914
913915
- name: Mithril / Publish GitHub Pages
914916
uses: peaceiris/actions-gh-pages@v3

0 commit comments

Comments
 (0)