Download the PHP package nickpeirson/sculpin-sitemap-bundle without Composer

On this page you can find all versions of the php package nickpeirson/sculpin-sitemap-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sculpin-sitemap-bundle

Sculpin Sitemap Generator Bundle

Sculpin bundle that adds a data provider for sitemap data.

The sitemap generator will iterate over all sculpin sources that aren't used internally by sculpin via a file reference. This is intended to prevent assets from being included.

Known limitations

Installation

Usage

The bundle provides a sculpin data provider called sitemap. To use it, add the following to your YAML frontmatter:

This will make data.sitemap available to your template.

data.sitemap will be populated with an entry for each page, subject to the limitations above. Each entry will have a loc field which is set the the relative URL that sculpin assigns to the source and a lastmod field which is set based either on the last modified time of the file or on the time the sitemap was built if the modified time isn't available.

The generator is currently hardcoded to override the loc field with page.canonical if it exists. This is to ensure only canonical urls are added to the sitemap. In future I intend to make this configurable via maps (see below for more information).

It's also possible to add new parameters, and override the default parameters, in data.sitemap for a given source by defining a sitemap parameter in the sources YAML frontmatter, e.g. the following will override lastmod and add changefreq and priority:

It is also possible to exclude files from the sitemap by adding the _exclude key to the pages sitemap parameter with any truthy value, e.g.:

The primary use case for data.sitemap is for use in an XML sitemap template, but you could also use this data for generating a HTML sitemap if you anotated the sitemap data appropriately.

It's also worth being aware that the sitemap data is keyed by the loc field, so if you have multiple sources that result in the same loc, the last one will be present in the data.

Example sitemap.xml file

---
permalink: none
use:
 - sitemap
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for url in data.sitemap %}
  <url>
    <loc>{{ site.url }}{{ url.loc }}</loc>
    <lastmod>{{ url.lastmod }}</lastmod>
{% if url.changefreq %}
    <changefreq>{{ url.changefreq }}</changefreq>
{% endif %}
{% if url.priority %}
    <priority>{{ url.priority }}</priority>
{% endif %}
  </url>
{% endfor %}
</urlset>

Contributing

PRs greatfully recieved

Roadmap

License

The MIT License (MIT). Please see License File for more information.


All versions of sculpin-sitemap-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nickpeirson/sculpin-sitemap-bundle contains the following files

Loading the files please wait ....