From 92ae9fe6bd2ae3833f179f058300b0593d1c5e19 Mon Sep 17 00:00:00 2001 From: Kevin Kandlbinder Date: Wed, 2 Mar 2022 16:30:32 +0100 Subject: [PATCH] website: Update edit URL --- website/docusaurus.config.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 0308906..fef4748 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -27,12 +27,15 @@ const config = { ({ docs: { sidebarPath: require.resolve('./sidebars.js'), - // Please change this to your repo. - editUrl: 'https://github.com/Unkn0wnCat/matrix-veles/tree/main/website/', + editUrl: ({locale, versionDocsDirPath, docPath}) => { + if (locale !== "en") { + return `https://crowdin.com/project/matrix-veles/${locale}`; + } + return `https://github.com/Unkn0wnCat/matrix-veles/tree/main/website/${versionDocsDirPath}/${docPath}`; + }, }, /*blog: { showReadingTime: true, - // Please change this to your repo. editUrl: 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', },*/