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
...
for(constitemofdata){content+='<url>\n'content+=`<loc>${item.url}</loc>\n`constlanguages=item.alternates?.languagesif(languages&&Object.keys(languages).length){// Since sitemap is separated from the page rendering, there's not metadataBase accessible yet.// we give the default setting that won't effect the languages resolving.for(constlanguageinlanguages){content+=`<xhtml:link rel="alternate" hreflang="${language}" href="${languages[languageaskeyoftypeoflanguages]}" />\n`}}constmedias=item.alternates?.mediaif(medias&&Object.keys(medias).length){for(constmediainmedias){content+=`<xhtml:link rel="alternate" media="${media}" href="${medias[mediaaskeyoftypeofmedias]}" />\n`}}
...
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
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-Goals
No response
Background
For now, when you we want to add a media alternate in sitemap there is a difference between the static sitemap and the dynamic one.
Proposal
Update the function resolveSitemap
Beta Was this translation helpful? Give feedback.
All reactions