From 2cfbb6748522030af23a2ba08208f4b9d2dbab70 Mon Sep 17 00:00:00 2001 From: Onkar Ruikar <87750369+OnkarRuikar@users.noreply.github.com> Date: Tue, 14 May 2024 17:59:10 +0530 Subject: [PATCH] fix(macros): fix URL issues in sidebar macros (#11082) This updates redirected and deleted document locations in sidebar macros. The changes will fix ~800 flaws. --- kumascript/macros/AddonSidebar.ejs | 4 ++-- kumascript/macros/FirefoxSidebar.ejs | 4 ++-- kumascript/macros/GamesSidebar.ejs | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/kumascript/macros/AddonSidebar.ejs b/kumascript/macros/AddonSidebar.ejs index fa378d9855fd..186e497920bf 100644 --- a/kumascript/macros/AddonSidebar.ejs +++ b/kumascript/macros/AddonSidebar.ejs @@ -170,7 +170,7 @@ async function renderItem(slug) { "/docs/Mozilla/Add-ons/WebExtensions/Your_second_WebExtension", "/docs/Mozilla/Add-ons/WebExtensions/Anatomy_of_a_WebExtension", "/docs/Mozilla/Add-ons/WebExtensions/Examples", - "/docs/Mozilla/Add-ons/WebExtensions/What_next_", + "/docs/Mozilla/Add-ons/WebExtensions/What_next", ]) %> @@ -200,7 +200,7 @@ async function renderItem(slug) {
    <%- await renderItems([ "/docs/Mozilla/Add-ons/WebExtensions/user_interface", - "/docs/Mozilla/Add-ons/WebExtensions/user_interface/Browser_action", + "/docs/Mozilla/Add-ons/WebExtensions/user_interface/Toolbar_button", "/docs/Mozilla/Add-ons/WebExtensions/user_interface/Page_actions", "/docs/Mozilla/Add-ons/WebExtensions/user_interface/Sidebars", "/docs/Mozilla/Add-ons/WebExtensions/user_interface/Context_menu_items", diff --git a/kumascript/macros/FirefoxSidebar.ejs b/kumascript/macros/FirefoxSidebar.ejs index 63f1f19015c6..e17ab9531590 100644 --- a/kumascript/macros/FirefoxSidebar.ejs +++ b/kumascript/macros/FirefoxSidebar.ejs @@ -106,8 +106,8 @@ const text = mdn.localStringMap({
    <%=text["Add-ons"]%>
      -
    1. <%-web.smartLink(`${addonsURL}WebExtensions`, null, text["Browser_extensions"])%>
    2. -
    3. <%-web.smartLink(`${addonsURL}Themes`, null, text["Themes"])%>
    4. +
    5. <%-web.smartLink(`${baseURL}Add-ons/WebExtensions`, null, text["Browser_extensions"])%>
    6. +
    7. <%=text["Themes"]%>
    diff --git a/kumascript/macros/GamesSidebar.ejs b/kumascript/macros/GamesSidebar.ejs index 2a85aefe8b8d..7dba26432886 100644 --- a/kumascript/macros/GamesSidebar.ejs +++ b/kumascript/macros/GamesSidebar.ejs @@ -489,9 +489,8 @@ const text = mdn.localStringMap({ <%=text["Techniques"]%>
    1. <%-web.smartLink(`${baseURL}Techniques/Async_scripts`, null, text["Using_async_scripts_for_asm.js"])%>
    2. -
    3. <%-web.smartLink(`${appsURL}Developing/Optimizing_startup_performance`, null, text["Optimizing_startup_performance"])%>
    4. +
    5. <%-web.smartLink(`${webURL}Performance/Optimizing_startup_performance`, null, text["Optimizing_startup_performance"])%>
    6. <%-web.smartLink(`${baseURL}Techniques/WebRTC_data_channels`, null, text["Using_WebRTC_peer-to-peer_data_channels"])%>
    7. -
    8. <%-web.smartLink(`${baseURL}Techniques/Efficient_animation_for_web_games`, null, text["Efficient_animation_for_web_games"])%>
    9. <%-web.smartLink(`${baseURL}Techniques/Audio_for_Web_Games`, null, text["Audio_for_Web_Games"])%>
    10. <%-web.smartLink(`${baseURL}Techniques/2D_collision_detection`, null, text["2D_collision_detection"])%>
    11. <%-web.smartLink(`${baseURL}Techniques/Tilemaps`, null, text["Tiles_and_tilemaps_overview"])%>