Skip to content

Commit

Permalink
Generate sitemap if any blog post or page exists (#610)
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob authored and yangshun committed Apr 28, 2018
1 parent a9a3981 commit 6c9c7e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/server/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6c9c7e5

Please sign in to comment.