diff --git a/frontend/docusaurus.config.ts b/frontend/docusaurus.config.ts index 846650861ac..cc1dba2323e 100644 --- a/frontend/docusaurus.config.ts +++ b/frontend/docusaurus.config.ts @@ -170,8 +170,14 @@ const config: Config = { }, // Please change this to your repo. // Remove this to remove the "edit this page" links. - editUrl: - "https://github.com/openmultiplayer/web/edit/master/frontend/", + editUrl: ({ locale, version, versionDocsDirPath, docPath }) => { + const baseUrl = + "https://github.com/openmultiplayer/web/edit/master/frontend/"; + if (locale === "en") { + return `${baseUrl}${versionDocsDirPath}/${docPath}`; + } + return `${baseUrl}i18n/${locale}/docusaurus-plugin-content-docs/${version}/${docPath}`; + }, }, blog: { showReadingTime: true,