Skip to content

Commit

Permalink
Add sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
iaincollins committed Sep 5, 2024
1 parent 5caad2c commit 23db50f
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
42 changes: 42 additions & 0 deletions app/sitemap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { getCommodities } from 'lib/commodities'

export default async function sitemap() {
const commodities = await getCommodities()
const sitemap = [
{
url: 'https://ardent-industry.com',
lastModified: new Date(),
changeFrequency: 'daily',
priority: 1
},
{
url: 'https://ardent-industry.com/commodities',
lastModified: new Date(),
changeFrequency: 'daily',
priority: 0.7
},
{
url: 'https://ardent-industry.com/about',
lastModified: new Date(),
changeFrequency: 'daily',
priority: 0.3
},
{
url: 'https://ardent-industry.com/downloads',
lastModified: new Date(),
changeFrequency: 'daily',
priority: 0.3
}
]

commodities.map(commodity => {
sitemap.push({
url: `https://ardent-industry.com/commodity/${commodity.commodityName}`,
lastModified: new Date(),
changeFrequency: 'daily',
priority: 0.8
})
})

return sitemap
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ardent-www",
"version": "0.38.11",
"version": "0.39.0",
"description": "Ardent Industry",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 23db50f

Please sign in to comment.