You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To retrieve routes via API there already exists an awesome routes function which returns a promise.
constaxios=require('axios'){sitemap: {routes: async()=>{const{ data }=awaitaxios.get('https://jsonplaceholder.typicode.com/posts')returndata.map((post)=>"/posts/{post.id}")}}}
However, please enrich this function to be capable to also add lastmod dates to the route. This is highly needed because you don't want the dates to be the current date all the time. This will make Google don't recognize your updated pages.
The function above should take a promise with a dictionary such that you can add url, changefreq, priority and lastmod.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
To retrieve routes via API there already exists an awesome routes function which returns a promise.
However, please enrich this function to be capable to also add lastmod dates to the route. This is highly needed because you don't want the dates to be the current date all the time. This will make Google don't recognize your updated pages.
The function above should take a promise with a dictionary such that you can add
url
,changefreq
,priority
andlastmod
.Else great work!
Kind regards,
Alexander
Beta Was this translation helpful? Give feedback.
All reactions