-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
268 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
name: Sitemap | ||
version: 1.8.0 | ||
version: 2.0.0 | ||
description: Provide automatically generated XML sitemap. | ||
author: | ||
name: Sergey Romanenko | ||
email: [email protected] | ||
url: https://flextype.org | ||
homepage: https://github.com/flextype-plugins/sitemap | ||
documentation: https://github.com/flextype-plugins/sitemap | ||
changelog: https://github.com/flextype-plugins/sitemap/blob/master/CHANGELOG.md | ||
bugs: https://github.com/flextype-plugins/sitemap/issues | ||
icon: fas fa-map-marked-alt | ||
keywords: sitemap, plugin, xml, map, index | ||
license: MIT | ||
|
||
dependencies: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,19 @@ | ||
# enabled: true or false to disable the plugin | ||
enabled: true | ||
|
||
# Sitemap plugin priority | ||
priority: 95 | ||
|
||
# Route | ||
route: sitemap.xml | ||
|
||
# Ignore list | ||
ignore: | ||
|
||
# Addition list | ||
additions: | ||
|
||
# Default values for entries | ||
default: | ||
changefreq: daily | ||
priority: !!float 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | ||
{% for page in sitemap %} | ||
<url> | ||
<loc>{{ base_url() }}/{{ page.slug }}</loc> | ||
<lastmod>{{ page.date }}</lastmod> | ||
<changefreq>{% if page.changefreq %}{{ page.changefreq }}{% else %}1.0{% endif %}</changefreq> | ||
<priority>1.0</priority> | ||
</url> | ||
<?xml-stylesheet type="text/xsl" href="{{ url() }}/project/plugins/sitemap/templates/sitemap.xsl"?> | ||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"> | ||
{% for entry in sitemap %} | ||
<url> | ||
<loc>{{ url() }}/{{ entry.loc|e }}</loc> | ||
{% if entry.lastmod %} | ||
<lastmod>{{ entry.lastmod|date(registry.get('flextype.settings.date_display_format')) }}</lastmod> | ||
{% endif %} | ||
{% if entry.changefreq %} | ||
<changefreq>{{ entry.changefreq }}</changefreq> | ||
{% endif %} | ||
{% if entry.priority %} | ||
<priority>{{ entry.priority|number_format(1) }}</priority> | ||
{% endif %} | ||
</url> | ||
{% endfor %} | ||
</urlset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
<xsl:stylesheet version="1.0" | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:s="http://www.sitemaps.org/schemas/sitemap/0.9" | ||
exclude-result-prefixes="s" | ||
> | ||
<xsl:template match="/"> | ||
<html> | ||
<head> | ||
<meta name="robots" content="noindex" /> | ||
<title> | ||
XML Sitemap | ||
</title> | ||
<style type="text/css"> | ||
@import url('//cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css'); | ||
@import url('//fonts.googleapis.com/css?family=Roboto:400'); | ||
html { | ||
font-smooth: auto; | ||
text-rendering: auto; | ||
-webkit-font-smoothing: antialiased; | ||
-webkit-text-size-adjust: 100%; | ||
background-color: #fff | ||
} | ||
|
||
body { | ||
font-family: 'Roboto', sans-serif; | ||
font-weight: 400; | ||
font-size: 20px; | ||
line-height: 1.8em; | ||
letter-spacing: 0; | ||
text-align: left; | ||
color: #333; | ||
} | ||
|
||
body { | ||
overflow: auto; | ||
padding: 20px | ||
} | ||
|
||
a, | ||
a:link, | ||
a:visited { | ||
text-decoration: none; | ||
border-bottom: dotted 1px #333; | ||
color: #333; | ||
} | ||
|
||
.table { | ||
margin: 0 auto; | ||
} | ||
|
||
.table th { | ||
border: solid 1px #cbcbcb !important; | ||
text-align: center; | ||
background: #fff; | ||
} | ||
|
||
.table { | ||
border-collapse: collapse; | ||
border-spacing: 0; | ||
empty-cells: show; | ||
border: 1px solid #cbcbcb; | ||
} | ||
|
||
.table caption { | ||
color: #000; | ||
padding: 1em 0; | ||
text-align: center; | ||
} | ||
|
||
.table td, | ||
.table th { | ||
border: 1px solid #cbcbcb; | ||
border-width: 1px; | ||
font-size: inherit; | ||
margin: 0; | ||
overflow: visible; | ||
padding: 0.5em 1em; | ||
} | ||
|
||
.table thead { | ||
background-color: #e0e0e0; | ||
color: #000; | ||
text-align: left; | ||
vertical-align: bottom; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<table class="table" border="0"> | ||
<thead> | ||
<tr> | ||
<th colspan="5">Sitemap</th> | ||
</tr> | ||
<tr> | ||
<th></th> | ||
<th>Location</th> | ||
<th>Last Modified</th> | ||
<th>Update Frequency</th> | ||
<th>Priority</th> | ||
</tr> | ||
</thead> | ||
<tfoot> | ||
</tfoot> | ||
<tbody> | ||
<xsl:for-each select="s:urlset/s:url"> | ||
<xsl:sort select="s:loc" /> | ||
<tr> | ||
<xsl:variable name="loc"><xsl:value-of select="s:loc"/></xsl:variable> | ||
<xsl:variable name="pno"><xsl:value-of select="position()"/></xsl:variable> | ||
<td><xsl:value-of select="$pno"/></td> | ||
<td><a href="{$loc}"><xsl:value-of select="s:loc"/></a></td> | ||
<td><xsl:value-of select="s:lastmod"/></td> | ||
<td><xsl:value-of select="s:changefreq"/></td> | ||
<td><xsl:value-of select="s:priority"/></td> | ||
</tr> | ||
</xsl:for-each> | ||
</tbody> | ||
</table> | ||
</body> | ||
</html> | ||
</xsl:template> | ||
</xsl:stylesheet> |