Skip to content

Commit

Permalink
CONTENTBOX-1462 #resolve
Browse files Browse the repository at this point in the history
Generated Sitemap has broken links
  • Loading branch information
lmajano committed Oct 24, 2023
1 parent 4ae24ff commit 836ea14
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
<li>
<a href="#prc.linkHome#">Home</a>
</li>

<cfloop array="#prc.aPages#" index="content">
<li>
<a href="#prc.siteBaseURL##content[ 'slug' ]#">#content[ 'title' ]#</a>
<a href="#prc.siteBaseURL#/#content[ 'slug' ]#">#content[ 'title' ]#</a>
</li>
</cfloop>

<cfif !prc.disableBlog>
<li><a href="#prc.siteBaseURL##prc.blogEntryPoint#">#left( prc.blogEntryPoint, -1 )#</a>
<cfif !prc.disableBlog>
<li><a href="#prc.siteBaseURL#/#prc.blogEntryPoint#">#left( prc.blogEntryPoint, -1 )#</a>
<ul>
<cfloop array="#prc.aEntries#" index="content">
<li>
<a href="#prc.siteBaseURL##prc.blogEntryPoint##content[ 'slug' ]#">#content[ 'title' ]#</a>
<a href="#prc.siteBaseURL#/#prc.blogEntryPoint##content[ 'slug' ]#">#content[ 'title' ]#</a>
</li>
</cfloop>
</ul>
</li>
</cfif>
</ul>
</ul>
</cfoutput>
</div>
</section>
</section>
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<cfoutput>[
{"loc": "#prc.linkHome#" }
<cfloop array="#prc.aPages#" index="content">
,{
"loc": "#prc.siteBaseURL##content[ 'slug' ]#",
,{
"loc": "#prc.siteBaseURL#/#content[ 'slug' ]#",
"lastmod": "#dateFormat( content[ 'modifiedDate' ], "yyyy-mm-dd" )#"
<cfif len( content.get( "featuredImageURL" ) )>
,"image": {
"loc": "#prc.siteBaseURL & reReplace( content.get( "featuredImageURL" ), "^/", "" )#"
"loc": "#prc.siteBaseURL & "/" & reReplace( content.get( "featuredImageURL" ), "^/", "" )#"
}
</cfif>
</cfif>
}
</cfloop>
<cfif !prc.disableBlog>
<cfif !prc.disableBlog>
,{ "loc": "#prc.siteBaseURL##prc.blogEntryPoint#" }
<cfloop array="#prc.aEntries#" index="content">
,{
"loc": "#prc.siteBaseURL##prc.blogEntryPoint##content[ 'slug' ]#",
,{
"loc": "#prc.siteBaseURL#/#prc.blogEntryPoint##content[ 'slug' ]#",
"lastmod": "#dateFormat( content[ 'modifiedDate' ], "yyyy-mm-dd" )#"
<cfif len( content.get( "featuredImageURL" ) )>
, "image": {
"loc": "#prc.siteBaseURL & reReplace( content.get( "featuredImageURL" ), "^/", "" )#"
"loc": "#prc.siteBaseURL & "/" & reReplace( content.get( "featuredImageURL" ), "^/", "" )#"
}
</cfif>
}
</cfloop>
</cfif>
]
</cfoutput>
</cfoutput>
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<cfoutput><!---
--->#prc.linkHome##chr( 10 )#<!---
---><cfloop array="#prc.aPages#" index="content"><!---
--->#prc.siteBaseURL##content[ 'slug' ]#
--->#prc.siteBaseURL#/#content[ 'slug' ]#
</cfloop><!---
---><cfif !prc.disableBlog><!---
--->#prc.siteBaseURL##prc.blogEntryPoint#
--->#prc.siteBaseURL#/#prc.blogEntryPoint#
<cfloop array="#prc.aEntries#" index="content"><!---
--->#prc.siteBaseURL##prc.blogEntryPoint##content[ 'slug' ]#
--->#prc.siteBaseURL#/#prc.blogEntryPoint##content[ 'slug' ]#
</cfloop><!---
---></cfif>
</cfoutput>
</cfoutput>
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
<url>
<loc>#XMLFormat( prc.linkHome )#</loc>
</url>
</url>
<cfloop array="#prc.aPages#" index="content">
<url>
<loc>#xmlFormat( prc.siteBaseURL & content[ 'slug' ] )#</loc>
<loc>#xmlFormat( prc.siteBaseURL & "/" & content[ 'slug' ] )#</loc>
<lastmod>#dateFormat( content[ 'modifiedDate' ], "yyyy-mm-dd" )#</lastmod>
<cfif len( content.get( "featuredImageURL" ) )>
<image:image>
<image:loc>#xmlFormat( prc.siteBaseURL & reReplace( content.get( "featuredImageURL" ), "^/", "" ) )#</image:loc>
<image:loc>#xmlFormat( prc.siteBaseURL & "/" & reReplace( content.get( "featuredImageURL" ), "^/", "" ) )#</image:loc>
</image:image>
</cfif>
</url>
</cfloop>
<cfif !prc.disableBlog>
<cfif !prc.disableBlog>
<url>
<loc>#xmlFormat( prc.siteBaseURL & prc.blogEntryPoint )#</loc>
</url>
<loc>#xmlFormat( prc.siteBaseURL & "/" & prc.blogEntryPoint )#</loc>
</url>
<cfloop array="#prc.aEntries#" index="content">
<url>
<loc>#xmlFormat( prc.siteBaseURL & prc.blogEntryPoint & content[ 'slug' ] )#</loc>
<loc>#xmlFormat( prc.siteBaseURL & "/" & prc.blogEntryPoint & content[ 'slug' ] )#</loc>
<lastmod>#dateFormat( content[ 'modifiedDate' ], "yyyy-mm-dd" )#</lastmod>
<cfif len( content.get( "featuredImageURL" ) )>
<image:image>
<image:loc>#xmlFormat( prc.siteBaseURL & reReplace( content.get( "featuredImageURL" ), "^/", "" ) )#</image:loc>
<image:loc>#xmlFormat( prc.siteBaseURL & "/" & reReplace( content.get( "featuredImageURL" ), "^/", "" ) )#</image:loc>
</image:image>
</cfif>
</url>
</cfloop>
</cfif>
</urlset>
</cfoutput>
</urlset>
</cfoutput>

0 comments on commit 836ea14

Please sign in to comment.