mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-03 11:22:30 +02:00
chore(v2): remove hardcoded references to config filename
This commit is contained in:
parent
7dae4bd0d1
commit
c46a894a01
8 changed files with 96 additions and 64 deletions
|
@ -5,6 +5,7 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const loadConfig = require('../load/config');
|
||||
const sitemap = require('sitemap');
|
||||
|
||||
module.exports = async function createSitemap({
|
||||
|
@ -22,7 +23,9 @@ module.exports = async function createSitemap({
|
|||
const {url: siteUrl} = siteConfig;
|
||||
|
||||
if (!siteUrl) {
|
||||
throw new Error('Url in docusaurus.config.js cannot be empty/undefined');
|
||||
throw new Error(
|
||||
`Url in ${loadConfig.configFileName} cannot be empty/undefined`,
|
||||
);
|
||||
}
|
||||
|
||||
const urls = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue