Skip to content

8fold/php-sitemap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

8fold Sitemap for PHP

Generates valid XML document and sitemap elements based on the Sitemap protocol.

Schema Version
0.9 Latest

Installation

composer require 8fold/php-sitemap

Usage

You have received the required metadata in an array; could be the results of a database query.

use Eigthfold\Sitemap\Sitemap;

$sitemap = Sitemap::create('http://yourdomain.com');

$items = // your array of items

foreach ($items as $item) {
  $sitemap = $sitemap->addUrl(
    $item->path
  );
}

(string) $sitemap;

Details

Designed to fit within a loop.

Other

{links or descriptions or license, versioning, and governance}

About

A library for generating sitemap content

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  
  •  

Packages

No packages published

Languages