1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/examples/with-sitemap-and-robots-express-server/server/posts.js
Kelly Burke 3f6834dfec sitemap.xml and robots.txt example (#4163)
This example app shows you how to set up sitemap.xml and robots.txt files for proper indexing by search engine bots.
2018-05-25 14:01:32 +02:00

12 lines
218 B
JavaScript

const posts = () => {
const arrayOfPosts = []
const n = 5
for (let i = 1; i < n + 1; i += 1) {
arrayOfPosts.push({ name: `Post ${i}`, slug: `post-${i}` })
}
return arrayOfPosts
}
module.exports = posts