diff --git a/.editorconfig b/.editorconfig index f6ae93a..fc68585 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,7 +6,7 @@ insert_final_newline = true indent_style = space indent_size = 4 -[*.{html,twig,yml}] +[*.{html,twig,yml,xml}] indent_size = 2 [gulpfile.js] diff --git a/app/SculpinKernel.php b/app/SculpinKernel.php new file mode 100644 index 0000000..fbaedcd --- /dev/null +++ b/app/SculpinKernel.php @@ -0,0 +1,14 @@ +=5.5.0" + }, + "require-dev": { + "sculpin/sculpin": ">=2.0.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Nickpeirson\\Sculpin\\Bundle\\SitemapBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nick Peirson", + "email": "nickpeirson@gmail.com" + } + ], + "description": "Sculpin sitemap bundle", + "keywords": [ + "Sitemap", + "sculpin" + ], + "time": "2016-10-07T17:18:47+00:00" + } + ], "aliases": [], "minimum-stability": "stable", "stability-flags": { diff --git a/source/robots.txt b/source/robots.txt index 686bdfb..a0f54f6 100644 --- a/source/robots.txt +++ b/source/robots.txt @@ -1,4 +1,6 @@ --- permalink: none +sitemap: + _exclude: yes --- User-agent: * diff --git a/source/sitemap.xml b/source/sitemap.xml new file mode 100644 index 0000000..e0c3512 --- /dev/null +++ b/source/sitemap.xml @@ -0,0 +1,28 @@ +--- +permalink: none +use: + - sitemap +sitemap: + _exclude: yes +--- + + + {% for url in data.sitemap %} + + + {# Last slash for pretty url #} + {{ site.url }}{{ url.loc != '/.' ? (url.loc ~ '/') : '' }} + + {{ url.lastmod }} + + {% if url.changefreq %} + {{ url.changefreq }} + {% endif %} + + {% if url.priority %} + {{ url.priority }} + {% endif %} + + + {% endfor %} +