Skip to content

Commit

Permalink
Merge pull request #3 from ARCANEDEV/feature-laravel_53
Browse files Browse the repository at this point in the history
Adding Laravel 5.3 Support
  • Loading branch information
arcanedev-maroc authored Sep 1, 2016
2 parents 6087409 + b88037d commit ca2198d
Show file tree
Hide file tree
Showing 12 changed files with 69 additions and 53 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/_docs export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
Expand Down
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.idea/
_arcanedev/
build/
vendor/
composer.phar
composer.lock
/build/
/vendor/
/composer.phar
/composer.lock
4 changes: 2 additions & 2 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ checks:

tools:
external_code_coverage:
timeout: 600
runs: 8
timeout: 1200
runs: 9
php_code_sniffer:
enabled: true
config:
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ language: php
sudo: false

php:
- 5.5.9
- 5.5
- 5.6
- 7.0
- 7.1
- nightly
- hhvm

Expand All @@ -17,6 +16,7 @@ matrix:
env:
- TESTBENCH_VERSION=3.1.*
- TESTBENCH_VERSION=3.2.*
- TESTBENCH_VERSION=3.3.*

before_script:
- travis_retry composer self-update
Expand Down
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@

This package is inspired/based on [RoumenDamianoff/laravel-sitemap](https://github.com/RoumenDamianoff/laravel-sitemap).

### Features

* Easy setup & configuration.
* Well documented & IDE Friendly.
* Well tested with maximum code quality.
* Laravel `5.1 | 5.2 | 5.3` are supported.
* Made with :heart: & :coffee:.

## Table of contents

1. [Requirements](_docs/1.Requirements.md)
Expand All @@ -25,12 +33,7 @@ This package is inspired/based on [RoumenDamianoff/laravel-sitemap](https://gith
## TODOS

- [ ] Documentation.
- [ ] 100% Code coverage + Maximum code quality.
- [ ] Laravel 5.3 support.
- [x] Laravel 5.2 support.
- [x] Laravel 5.1 support.
- [ ] Laravel 5.0 support.
- [x] Well documented package (IDE Friendly).
- [ ] 100% Code coverage.

## Contribution

Expand All @@ -46,7 +49,7 @@ If you discover any security related issues, please email arcanedev.maroc@gmail.
- [RoumenDamianoff/laravel-sitemap](https://github.com/RoumenDamianoff/laravel-sitemap)
- [All Contributors][link-contributors]

[badge_laravel]: https://img.shields.io/badge/For-Laravel%205.x-orange.svg?style=flat-square
[badge_laravel]: https://img.shields.io/badge/Laravel-%205.1|5.2|5.3-orange.svg?style=flat-square
[badge_license]: https://img.shields.io/packagist/l/arcanedev/laravel-sitemap.svg?style=flat-square
[badge_build]: https://img.shields.io/travis/ARCANEDEV/LaravelSitemap.svg?style=flat-square
[badge_hhvm]: https://img.shields.io/hhvm/arcanedev/laravel-sitemap.svg?style=flat-square
Expand Down
32 changes: 24 additions & 8 deletions config/sitemap.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,37 @@
<?php

return [
'cache' => [
/* ------------------------------------------------------------------------------------------------
| Cache
| ------------------------------------------------------------------------------------------------
*/
'cache' => [
'enabled' => false,

'key' => 'laravel-sitemap.your-key',

'lifetime' => 3600,
],

'escaping' => true,

'use-limit-size' => false,

'max-size' => null,

'styles' => [
/* ------------------------------------------------------------------------------------------------
| Escaping
| ------------------------------------------------------------------------------------------------
*/
'escaping' => true,

/* ------------------------------------------------------------------------------------------------
| Limit Size
| ------------------------------------------------------------------------------------------------
*/
'use-limit-size' => false,

'max-size' => null,

/* ------------------------------------------------------------------------------------------------
| Styles
| ------------------------------------------------------------------------------------------------
*/
'styles' => [
'enabled' => true,

'location' => null,
Expand Down
10 changes: 4 additions & 6 deletions resources/views/google-news.blade.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
@if ($style)
<?xml-stylesheet href="{{ $style }}" type="text/xsl"?>
<?php echo '<?xml-stylesheet href="'.$style.'" type="text/xsl"?>'; ?>
@endif
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
@foreach ($items as $item)
<?php $googlenews = $item->getGooglenews() ?>
<url>
<loc>{{ $item->getLoc() }}</loc>
@if ($item->getLastmod())
Expand All @@ -17,6 +14,7 @@
<xhtml:link rel="alternate" media="{{ $alternate['media'] }}" href="{{ $alternate['url'] }}" />
@endforeach
@endif
<?php $googlenews = $item->getGooglenews() ?>
<news:news>
<news:publication>
<news:name>{{ $googlenews['sitename'] }}</news:name>
Expand Down
18 changes: 9 additions & 9 deletions resources/views/ror-rdf.blade.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<rdf:RDF xmlns="http://rorweb.com/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<Resource rdf:about="sitemap">
<title>{{ $channel['title'] }}</title>
<url>{{ $channel['link'] }}</url>
<type>sitemap</type>
</Resource>
@foreach ($items as $item)
<Resource>
<url>{{ $item->getLoc() }}</url>
<title>{{ $item->getTitle() }}</title>
<updated>{{ $item->getLastmod() }}</updated>
<updatePeriod>{{ $item->getFreq() }}</updatePeriod>
<sortOrder>{{ $item->getPriority() }}</sortOrder>
<resourceOf rdf:resource="sitemap"/>
</Resource>
<Resource>
<url>{{ $item->getLoc() }}</url>
<title>{{ $item->getTitle() }}</title>
<updated>{{ $item->getLastmod() }}</updated>
<updatePeriod>{{ $item->getFreq() }}</updatePeriod>
<sortOrder>{{ $item->getPriority() }}</sortOrder>
<resourceOf rdf:resource="sitemap"/>
</Resource>
@endforeach
</rdf:RDF>
2 changes: 1 addition & 1 deletion resources/views/ror-rss.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<rss version="2.0" xmlns:ror="http://rorweb.com/0.1/" >
<channel>
<title>{{ $channel['title'] }}</title>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/sitemapindex.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
@if ($style)
<?xml-stylesheet href="{{ $style }}" type="text/xsl"?>
<?php echo '<?xml-stylesheet href="'.$style.'" type="text/xsl"?>'; ?>
@endif
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
@foreach($sitemaps as $sitemap)
Expand Down
16 changes: 8 additions & 8 deletions resources/views/xml-mobile.blade.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
@if ($style)
<?xml-stylesheet href="{{ $style }}" type="text/xsl"?>
<?php echo '<?xml-stylesheet href="'.$style.'" type="text/xsl"?>'; ?>
@endif
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0">
@foreach($items as $item)
<url>
<loc>{{ $item->getLoc() }}</loc>
<mobile:mobile/>
</url>
@endforeach
@foreach($items as $item)
<url>
<loc>{{ $item->getLoc() }}</loc>
<mobile:mobile/>
</url>
@endforeach
</urlset>
4 changes: 2 additions & 2 deletions resources/views/xml.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
@if ($style)
<?xml-stylesheet href="{{ $style }}" type="text/xsl"?>
<?php echo '<?xml-stylesheet href="'.$style.'" type="text/xsl"?>'; ?>
@endif
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
@foreach ($items as $item)
Expand Down

0 comments on commit ca2198d

Please sign in to comment.