Skip to content

Commit

Permalink
updated sitemap test
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Dec 2, 2023
1 parent 7530a00 commit ce945b9
Showing 1 changed file with 217 additions and 2 deletions.
219 changes: 217 additions & 2 deletions tests/__snapshots__/sitemap.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,11 @@ snapshot[`Sitemap plugin with a multilanguage plugin 1`] = `
"/pages/page1_en.md",
"/pages/page1_gl.md",
"/pagination.page.js",
"/types",
"/types/article.md",
"/types/article_gl.md",
"/types/post.md",
"/types/post_gl.md",
],
}
`;
Expand Down Expand Up @@ -664,6 +669,11 @@ Sitemap: https://example.com/sitemap.xml",
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/page-1/"/>
<xhtml:link rel="alternate" hreflang="gl" href="https://example.com/gl/page-1/"/>
</url>
<url>
<loc>https://example.com/en/types/post/</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/types/post/"/>
<xhtml:link rel="alternate" hreflang="gl" href="https://example.com/gl/types/post_gl/"/>
</url>
<url>
<loc>https://example.com/fr/other-page-french.html</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/other-page-english/"/>
Expand All @@ -685,12 +695,27 @@ Sitemap: https://example.com/sitemap.xml",
<xhtml:link rel="alternate" hreflang="it" href="https://example.com/it/pagina-1/"/>
<xhtml:link rel="alternate" hreflang="gl" href="https://example.com/gl/paxina-1/"/>
</url>
<url>
<loc>https://example.com/gl/types/article_gl/</loc>
<xhtml:link rel="alternate" hreflang="it" href="https://example.com/it/types/article/"/>
<xhtml:link rel="alternate" hreflang="gl" href="https://example.com/gl/types/article_gl/"/>
</url>
<url>
<loc>https://example.com/gl/types/post_gl/</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/types/post/"/>
<xhtml:link rel="alternate" hreflang="gl" href="https://example.com/gl/types/post_gl/"/>
</url>
<url>
<loc>https://example.com/it/pagina-1/</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/page-1/"/>
<xhtml:link rel="alternate" hreflang="it" href="https://example.com/it/pagina-1/"/>
<xhtml:link rel="alternate" hreflang="gl" href="https://example.com/gl/paxina-1/"/>
</url>
<url>
<loc>https://example.com/it/types/article/</loc>
<xhtml:link rel="alternate" hreflang="it" href="https://example.com/it/types/article/"/>
<xhtml:link rel="alternate" hreflang="gl" href="https://example.com/gl/types/article_gl/"/>
</url>
</urlset>',
data: {
basename: "sitemap",
Expand All @@ -717,6 +742,11 @@ Sitemap: https://example.com/sitemap.xml",
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/page-1/"/>
<xhtml:link rel="alternate" hreflang="gl" href="https://example.com/gl/page-1/"/>
</url>
<url>
<loc>https://example.com/en/types/post/</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/types/post/"/>
<xhtml:link rel="alternate" hreflang="gl" href="https://example.com/gl/types/post_gl/"/>
</url>
<url>
<loc>https://example.com/fr/other-page-french.html</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/other-page-english/"/>
Expand All @@ -738,12 +768,27 @@ Sitemap: https://example.com/sitemap.xml",
<xhtml:link rel="alternate" hreflang="it" href="https://example.com/it/pagina-1/"/>
<xhtml:link rel="alternate" hreflang="gl" href="https://example.com/gl/paxina-1/"/>
</url>
<url>
<loc>https://example.com/gl/types/article_gl/</loc>
<xhtml:link rel="alternate" hreflang="it" href="https://example.com/it/types/article/"/>
<xhtml:link rel="alternate" hreflang="gl" href="https://example.com/gl/types/article_gl/"/>
</url>
<url>
<loc>https://example.com/gl/types/post_gl/</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/types/post/"/>
<xhtml:link rel="alternate" hreflang="gl" href="https://example.com/gl/types/post_gl/"/>
</url>
<url>
<loc>https://example.com/it/pagina-1/</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/page-1/"/>
<xhtml:link rel="alternate" hreflang="it" href="https://example.com/it/pagina-1/"/>
<xhtml:link rel="alternate" hreflang="gl" href="https://example.com/gl/paxina-1/"/>
</url>
<url>
<loc>https://example.com/it/types/article/</loc>
<xhtml:link rel="alternate" hreflang="it" href="https://example.com/it/types/article/"/>
<xhtml:link rel="alternate" hreflang="gl" href="https://example.com/gl/types/article_gl/"/>
</url>
</urlset>',
page: [
"src",
Expand Down Expand Up @@ -1050,6 +1095,10 @@ Sitemap: https://example.com/sitemap.xml",
<li>page-gl</li>
<li>article 1</li>
<li>post 1</li>
</body></html>',
data: {
alternates: "Array(2)",
Expand Down Expand Up @@ -1079,7 +1128,7 @@ Sitemap: https://example.com/sitemap.xml",
"previous",
"next",
],
results: "Array(2)",
results: "Array(4)",
search: [],
tags: "Array(0)",
url: "/gl/page-1/",
Expand Down Expand Up @@ -1109,6 +1158,8 @@ Sitemap: https://example.com/sitemap.xml",
<li>page-en</li>
<li>post 1</li>
</body></html>',
data: {
alternates: "Array(2)",
Expand Down Expand Up @@ -1138,7 +1189,7 @@ Sitemap: https://example.com/sitemap.xml",
"previous",
"next",
],
results: "Array(3)",
results: "Array(4)",
search: [],
tags: "Array(0)",
url: "/en/page-1/",
Expand All @@ -1150,5 +1201,169 @@ Sitemap: https://example.com/sitemap.xml",
remote: undefined,
},
},
{
content: \`<!DOCTYPE html>
<html lang="it"><head><link rel="alternate" hreflang="it" href="https://example.com/it/types/article/">
<link rel="alternate" hreflang="gl" href="https://example.com/gl/types/article_gl/">
</head><body><p>Questo è l'articolo 1</p>
</body></html>\`,
data: {
alternates: "Array(2)",
basename: "article",
children: "<p>Questo è l'articolo 1</p>
",
content: "Questo è l'articolo 1
",
date: [],
id: 1,
lang: "it",
mergedKeys: [
"tags",
"en",
"fr",
"it",
"gl",
],
page: [
"src",
"data",
],
paginate: "paginate",
search: [],
tags: "Array(0)",
title: "article 1",
type: "article",
url: "/it/types/article/",
},
src: {
asset: false,
ext: ".md",
path: "/types/article",
remote: undefined,
},
},
{
content: '<!DOCTYPE html>
<html lang="gl"><head><link rel="alternate" hreflang="it" href="https://example.com/it/types/article/">
<link rel="alternate" hreflang="gl" href="https://example.com/gl/types/article_gl/">
</head><body><p>Este é o artigo 1</p>
</body></html>',
data: {
alternates: "Array(2)",
basename: "article_gl",
children: "<p>Este é o artigo 1</p>
",
content: "Este é o artigo 1
",
date: [],
id: 1,
lang: "gl",
mergedKeys: [
"tags",
"en",
"fr",
"it",
"gl",
],
page: [
"src",
"data",
],
paginate: "paginate",
search: [],
tags: "Array(0)",
title: "article 1",
type: "article",
url: "/gl/types/article_gl/",
},
src: {
asset: false,
ext: ".md",
path: "/types/article_gl",
remote: undefined,
},
},
{
content: '<!DOCTYPE html>
<html lang="en"><head><link rel="alternate" hreflang="en" href="https://example.com/en/types/post/">
<link rel="alternate" hreflang="gl" href="https://example.com/gl/types/post_gl/">
</head><body><p>This is the post 1</p>
</body></html>',
data: {
alternates: "Array(2)",
basename: "post",
children: "<p>This is the post 1</p>
",
content: "This is the post 1
",
date: [],
id: 1,
lang: "en",
mergedKeys: [
"tags",
"en",
"fr",
"it",
"gl",
],
page: [
"src",
"data",
],
paginate: "paginate",
search: [],
tags: "Array(0)",
title: "post 1",
type: "post",
url: "/en/types/post/",
},
src: {
asset: false,
ext: ".md",
path: "/types/post",
remote: undefined,
},
},
{
content: '<!DOCTYPE html>
<html lang="gl"><head><link rel="alternate" hreflang="en" href="https://example.com/en/types/post/">
<link rel="alternate" hreflang="gl" href="https://example.com/gl/types/post_gl/">
</head><body><p>Este é o post 1</p>
</body></html>',
data: {
alternates: "Array(2)",
basename: "post_gl",
children: "<p>Este é o post 1</p>
",
content: "Este é o post 1
",
date: [],
id: 1,
lang: "gl",
mergedKeys: [
"tags",
"en",
"fr",
"it",
"gl",
],
page: [
"src",
"data",
],
paginate: "paginate",
search: [],
tags: "Array(0)",
title: "post 1",
type: "post",
url: "/gl/types/post_gl/",
},
src: {
asset: false,
ext: ".md",
path: "/types/post_gl",
remote: undefined,
},
},
]
`;

0 comments on commit ce945b9

Please sign in to comment.