Giter Site home page Giter Site logo

mappy's Introduction

Codacy Badge GitHub issues GitHub license

Mappy - Laravel Site Map Generator

Mappy is a PHP 5.6 + library for Laravel 5+ that generates a sitemap in the background while users utilise the site

The site map will be generated at http://yourdomain.com/sitemap.xml

Installation

  1. The preferred method of installation is via Packagist and Composer. Run the following command to install the package and add it as a requirement to your project's composer.json:

    composer require scopefragger/mappy
  • Add the following to your config/app.php

    scopefragger\mappy\MappyServiceProvider::class
  • Add the following to any middlware you wish to be tracked ( App/Http/Kernel.php ), Typicaly you want this to be your web group

    \scopefragger\mappy\Middleware\MappyMiddleware::class
  • You must then publish a copy ofthe config to your application ( run the following ! ) a new config file config/mappy.php wil be created

    php artisan vendor:publish --tag=mappy --force
  • For this package, no facade is required

Config

As with most Laravel packages, Mappy has the abuilty to define some options

  1. Blacklist | Array This option allows you to stop Mappy from listing routes that start with key words or strings such as admin or login, typicaly used for directorys that will 404 / 500 for users who are not logged in or for directorys that it may be un desirable to allow Google to find.

    'blacklist' => [
         '/admin',
         '/my-account'
    ],
  2. Strip | String Usefull when running development or staging enviroments, Allows you to specify parts of a URL such as `/public/www/yoursite/ that may be part of a sites URL while in development

    'strip' => '/blog/public',
  3. Enable | Bool Usefull for quickly tuning off the package. False will disable the package

    'enable' => 'true',
  4. Domain | String The domain you wish to be recorded and used when generating the .XML like Strip this is usefull for when your running in a dev or staging enviroment

    'domain' => 'http://example.com',

Requirements

  • PHP 5.6
  • LARAVEL 5.1+
  • Mysql / Sqlite or any other DB that has a valid Laravel driver

Final Comments

This Package was created to solve a problem, it has helped in anyway feel free to link back, give a star or recomend the package to others.

If by anychance you find a bug or can reccomend a feature, feel free to log a bug or raise a ticket in the issue tracker

Copyright and license

MIT License

Copyright (c) 2017 Mark Anthony Jones

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

mappy's People

Contributors

scopefragger avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.