diff --git a/en/asgardeo/mkdocs.yml b/en/asgardeo/mkdocs.yml index f11b76a214..97f94ffeed 100644 --- a/en/asgardeo/mkdocs.yml +++ b/en/asgardeo/mkdocs.yml @@ -19,7 +19,7 @@ INHERIT: ../base.yml # Project information site_name: &site_name Asgardeo site_description: Asgardeo Learning Center -site_url: &site_url https://wso2.com/asgardeo/docs +site_url: https://wso2.com/asgardeo/docs # Configuration theme: @@ -29,7 +29,7 @@ theme: favicon: assets/images/asgardeo-favicon.svg extra: - base_path: *site_url + base_path: /asgardeo/docs product: asgardeo product_name: *site_name nav_list: diff --git a/en/theme/material/assets/js/theme.js b/en/theme/material/assets/js/theme.js index ca175bcf54..5d8dc70160 100644 --- a/en/theme/material/assets/js/theme.js +++ b/en/theme/material/assets/js/theme.js @@ -35,4 +35,10 @@ dropdownLink.addEventListener('click', function(event) { dropdown.classList.toggle('open'); // Toggle the "open" class }); - +document.addEventListener('DOMContentLoaded', function () { + // Check if the path does not end with a slash and has no file extension + if (!window.location.pathname.endsWith('/') && !window.location.pathname.split('/').pop().includes('.')) { + var newPath = window.location.pathname + '/' + window.location.search + window.location.hash; + window.history.replaceState({}, document.title, newPath); + } +});