Skip to content

Commit

Permalink
[repo] Update URL for new URL
Browse files Browse the repository at this point in the history
This commit also changes env vars to capitalised values because github
only supports capitals.
  • Loading branch information
andrewnicols committed Jun 2, 2022
1 parent 81f4be4 commit 9838c93
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .env.default
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# The default URL for build content is https://develop.moodle.org.
# For local development you may wish to specify an alternative for your own environment.
#
# url=http://localhost
# url=https://develop.moodle.org
# URL=http://localhost
# URL=https://moodledev.io

# Base URL
# ========
Expand All @@ -14,5 +14,5 @@
# For example, if you have your content hosted locally at http://localhost/devdocs Then the baseUrl would be `devdocs`.
# The default value is `/`.
#
# baseUrl=/devdocs/
# baseUrl=/
# BASEURL=/devdocs/
# BASEURL=/
8 changes: 4 additions & 4 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ const getBaseUrl = () => {
return '/';
}

if (typeof process.env.baseUrl !== 'undefined') {
if (typeof process.env.BASEURL !== 'undefined') {
// Respect the env.
return process.env.baseUrl;
return process.env.BASEURL;
}

// Default is currently '/devdocs'.
Expand All @@ -57,9 +57,9 @@ const getBaseUrl = () => {
const config = {
title: 'Moodle',
tagline: '(Un)official Developer Resources',
// eslint-disable-next-line spaced-comment

// url: 'https://develop.moodle.org',
url: process.env?.url || 'https://moodle.github.io',
url: process.env?.URL || 'https://moodledev.io',
baseUrl: getBaseUrl(),
trailingSlash: false,
onBrokenLinks: 'throw',
Expand Down

0 comments on commit 9838c93

Please sign in to comment.