Improve SEO by pre-rendering all HTML pages
* Change all internal links to use URLs ending in `/` * Add the prerender script which uses PhantomJS to pre-render the HTML for all possible pages in the system * Change the build process to incorporate the pre-rendered files * Update the sitemap script to generate the new URLs
This commit is contained in:
+6
-6
@@ -19,10 +19,10 @@ itemSlugs = {}
|
||||
base = 'http://crafting-guide.com'
|
||||
|
||||
urls = [
|
||||
base
|
||||
"#{base}/configure"
|
||||
"#{base}/browse"
|
||||
"#{base}/craft"
|
||||
"#{base}/"
|
||||
"#{base}/configure/"
|
||||
"#{base}/browse/"
|
||||
"#{base}/craft/"
|
||||
]
|
||||
|
||||
for modSlug in fs.readdirSync './src/data'
|
||||
@@ -41,11 +41,11 @@ for modSlug in fs.readdirSync './src/data'
|
||||
itemSlugs[item.slug] = item.slug
|
||||
|
||||
for modSlug in _.values(modSlugs).sort()
|
||||
urls.push base + "/browse/#{modSlug}"
|
||||
urls.push base + "/browse/#{modSlug}/"
|
||||
|
||||
for key in _.keys(itemSlugs).sort()
|
||||
itemSlug = itemSlugs[key]
|
||||
urls.push base + "/browse/#{itemSlug.mod}/#{itemSlug.item}"
|
||||
urls.push base + "/browse/#{itemSlug.mod}/#{itemSlug.item}/"
|
||||
|
||||
for url in urls
|
||||
console.log url
|
||||
|
||||
Reference in New Issue
Block a user