I get the following error when trying this (after uncommenting the lines 105-109), even after doing it the first time or trying to repeat the procedure:
[12:37:34] Starting 'styles'...
[12:37:34] 'styles' errored after 18 ms
[12:37:34] SyntaxError: /Applications/MAMP/htdocs/roots/wp-content/themes/testbase/sitemap.json: Unexpected token <
at Object.parse (native)
at Object.Module._extensions..json (module.js:450:27)
I suspect that I maybe did step 3 incorrect.
I took the code from the sitemap.php and added it at the bottom of extras.php, just below the clean up excerpt section, is this the correct procedure?
On notice, after successfully (having gulpfile.js 105-109 lines commented) running gulp --production, I get this sitemap:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<title>301 Moved Permanently</title>
<p>The document has moved <a href="http://localhost/roots/?show_sitemap">here</a>.</p>
Does anyone know what the problem might be?