feat: make a url var instead of modifying config

This commit is contained in:
Ushie 2023-08-08 03:25:44 +03:00
parent dd7836b572
commit 79c32c1ce4
No known key found for this signature in database
GPG Key ID: B3AAD18842E34632

View File

@ -4,6 +4,8 @@
const lightCodeTheme = require('prism-react-renderer/themes/github'); const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula'); const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const siteUrl = "https://revanced.app"
/** @type {import('@docusaurus/types').Config} */ /** @type {import('@docusaurus/types').Config} */
const config = { const config = {
title: 'ReVanced', title: 'ReVanced',
@ -11,7 +13,7 @@ const config = {
favicon: 'img/favicon.ico', favicon: 'img/favicon.ico',
// Set the production url of your site here // Set the production url of your site here
url: 'https://revanced.app', url: siteUrl,
// Set the /<baseUrl>/ pathname under which your site is served // Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/' // For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/docs', baseUrl: '/docs',
@ -59,7 +61,7 @@ const config = {
logo: { logo: {
alt: 'ReVanced Logo', alt: 'ReVanced Logo',
target: '_self', target: '_self',
src: 'img/logo.svg', href: siteUrl,
width: 22 width: 22
}, },
items: [ items: [
@ -94,6 +96,4 @@ const config = {
}), }),
}; };
config.themeConfig.navbar.logo.href = config.url;
module.exports = config; module.exports = config;