Skip to content

Conversation

@bmordan
Copy link
Collaborator

@bmordan bmordan commented May 27, 2016

This little script just helps google to index the site.

I see this tool becoming more sophisticated over time and becoming an XML file with images etc. But this is the first iteration.

npm run build:sitemap

Searches the /pages dir for folder names, excludes any folder called 'home' and creates a file /dist/sitemap.txt with the most simple content a sitemap can have:

https://somewebsite.com/about
https://somewebsite.com/contact
https://somewebsite.com/products
https://somewebsite.com/blog

build/sitemap.js Outdated
function filter (contents, done) {
var pages = contents.filter(function (item) {
var pathToFile = path.join(inputDir, item)
return fs.statSync(pathToFile).isDirectory()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alanshaw
Copy link
Member

Just a note, but we'll need to extend this to play nicely with sub pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants