Giter Club home page Giter Club logo

prestasitemapbundle's Introduction

PrestaSitemapBundle

Build Status Scrutinizer Quality Score

Latest Stable Version Total Downloads

SensioLabsInsight PrestaSitemapBundle on Knpbundles

PrestaSitemapBundle is a Symfony2 xml sitemap generator.

๐Ÿ’ฌ If you want to have some informations about the projet progression you can register to our google group

Overview

For a ready to use demonstration of PrestaSitemap you should check the prestacms-sandox available on github.

Sandbox is also deployed for a live demonstration :

Requirements

Features

  • Sitemapindex
  • Google images, video, mobile and multilang urls
  • Respect constraints (50k items / 10mB per files)
  • No database required
  • Optionnal caching (using LiipDoctrineCacheBundle, disabled by default)

TL;DR

  1. Installation

        //composer.json
        "require": {
            //...
            "presta/sitemap-bundle": "dev-master"
        }
        //app/AppKernel.php
        public function registerBundles()
        {
            $bundles = array(
                //...
                new Presta\SitemapBundle\PrestaSitemapBundle(),
            );
        }
    #app/config/routing.yml
    PrestaSitemapBundle:
        resource: "@PrestaSitemapBundle/Resources/config/routing.yml"
        prefix:   /
  2. Usage

    For static url there's annotation support in your routes :

    /**
     * @Route("/", name="homepage", options={"sitemap" = true})
     */

    For complexe routes, create a Closure or a Service dedicated to your sitemap then add your urls :

        function(SitemapPopulateEvent $event) use ($router){
            //get absolute homepage url
            $url = $router->generate('homepage', array(), true);
    
            //add homepage url to the urlset named default
            $event->getGenerator()->addUrl(
                new UrlConcrete(
                    $url,
                    new \DateTime(),
                    UrlConcrete::CHANGEFREQ_HOURLY,
                    1
                ),
                'default'
            );
        }
  3. Decorated url (images, videos, etc.)

    The doc is already really short ;)

Documentation

You will find the detailed documentation in the following links :

Ask for help

๐Ÿ’ฌ If you need help about this project you can post a message on our google group

Contributing

Pull requests are welcome.

Thanks to everyone who has contributed already.


This project is supported by PrestaConcept

Lead Developer : @alain-flaus

Released under the MIT License

Bitdeli Badge

prestasitemapbundle's People

Contributors

arosslau avatar bitdeli-chef avatar elkangaroo avatar gimler avatar halundran avatar iamdey avatar inmarelibero avatar koc avatar kostiklv avatar mente avatar mikemeier avatar nicolas-bastien avatar pulzarraider avatar tonypiper avatar topwebstudio avatar

Watchers

 avatar  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.