mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-17 11:07:07 +02:00
Generate sitemap if any blog post or page exists (#610)
This commit is contained in:
parent
a9a39817d4
commit
6c9c7e5de5
1 changed files with 1 additions and 1 deletions
|
@ -302,7 +302,7 @@ async function execute() {
|
|||
}
|
||||
|
||||
// create sitemap
|
||||
if (MetadataBlog.length > 0 && Object.keys(Metadata).length > 0) {
|
||||
if (MetadataBlog.length > 0 || Object.keys(Metadata).length > 0) {
|
||||
let targetFile = join(buildDir, 'sitemap.xml');
|
||||
sitemap(xml => {
|
||||
writeFileAndCreateFolder(targetFile, xml);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue