Set baseUrl depending on the environment (#1526)

This commit is contained in:
ylemkimon
2018-07-30 03:04:32 +09:00
committed by Kevin Barabash
parent cd80db5ded
commit e97a23ec6d

View File

@@ -8,6 +8,10 @@
// See https://docusaurus.io/docs/site-config.html for all the possible
// site configuration options.
// If BASE_URL environment variable is set, use it as baseUrl.
// If on netlify, use '/'. Otherwise use '/KaTeX/'.
const baseUrl = process.env.BASE_URL || (process.env.CONTEXT ? '/' : '/KaTeX/');
/* List of projects/orgs using your project for the users page */
const users = [
{
@@ -22,7 +26,7 @@ const siteConfig = {
title: 'KaTeX',
tagline: 'The fastest math typesetting library for the web',
url: 'https://khan.github.io',
baseUrl: '/KaTeX/',
baseUrl,
// Used for publishing and more
projectName: 'KaTeX',