EnCiv/enciv-home

auto sitelist generatlion

Closed this issue · 1 comments

Generate a site list using https://www.npmjs.com/package/sitemap
find all the iotas with path that exists and turn them into urls in the sitemap

In the sitemap package see the section on Serve a sitemap from a server and periodically update it

To get the Iotas to use for the sitemap use something like (untested):

const iotas=await Iota.find({"path": "$exists": "true"})

create app/routes/sitemap.js see https://github.com/EnCiv/enciv-home/tree/main/app/routes for more info.

To test, run npm run dev and then browse to https://localhost:3011/sitemap.xml

Extra credit would be to figure out how to make a jest test for this - but I'm not sure how at this point.

@WangYufeng1990 I just added some stuff to the description here.