Download the PHP package rah/rah_sitemap without Composer

On this page you can find all versions of the php package rah/rah_sitemap. 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 rah_sitemap

h1. rah_sitemap

"Download":https://github.com/gocom/rah_sitemap/releases | "Packagist":https://packagist.org/packages/rah/rah_sitemap | "Issues":https://github.com/gocom/rah_sitemap/issues

Sitemap plugin for "Textpattern CMS":https://textpattern.com. Generates "Sitemaps.org":https://www.sitemaps.org XML(eXtensible Markup Language) sitemaps for your site, which help Google and other search engines to index your content. Maps your categories, sections, articles and even custom URLs of your choosing. No diving into code required, all configuration is done from a graphical user interface.

h2. Install

Using "Composer":https://getcomposer.org:

bc. $ composer require rah/rah_sitemap

Or "download":https://github.com/gocom/rah_sitemap/releases an installer package.

h2. Basics

Rah_sitemap generates a sitemap for your Textpattern website, listing all of its section-, article category- and article-pages. The generated sitemap follows the XML based "Sitemap protocol format":https://www.sitemaps.org/ and is targeted to search engines, opposed to your visitors. The sitemap is meant to help search engines to index your site as it grows and gets more and more various nested pages.

The Sitemap can be configured directly from Textpattern's Preferences panel, making rah_sitemap easy to setup and use.

h3. Accessing the sitemap

The generated sitemap becomes publicly accessible from the site's root. The sitemap can be accessed from two URLs, depending on the site's permanent link mode. If the site is configured to use clean URLs, the sitemap can be accessed using a clean path like @http://example.com/sitemap.xml@, where the @example.com@ would be the site's URL. Additionally a query string version, @http://example.com/?rah_sitemap=sitemap@, is available in both the messy and the clean URL modes, and can be used if the other one isn't available.

h3. Immediate boost to search engine visiblity?

Not exactly. Providing Sitemap is to help crawling, finding your site's pages that could otherwise be hard to discover. Sitemaps itself do not boost content's visibility.

For a simple, almost a static website with just few easily discoverable pages, a sitemap may not be necessary at all. If search engines already can get to your pages, you do not really need rah_sitemap, or Sitemaps in general. Once a page is indexed, that's where sitemap's work ends.

Rah_sitemap is particularly useful when your site has pages that are hard to discover due to being loaded using JavaScript, there is distinct content with little linking, or pages are nested deep in a complex page structures. Rah_sitemap can also help your site to start up when it has very few external links pointing to its pages.

It's common misconception to think that Sitemaps guarantee that pages will be indexed. This is not the case. Sitemap is a map. Whether a place is marked on a map doesn't mean someone will actually go there, or when. Like any map, the map is used to find and learn, to increase the future knowledge. Sitemap's update interval also helps to estimate when your site is updated next and when it should be crawled again.

Normally, you will benefit from submitting a sitemap, but its just one piece in the puzzle. In no case will you get penalized from Sitemap or including wrong content in it.

h2. Configuration

After rah_sitemap is installed, you may want to configure it to fit your site. For instance, you may want to exclude certain irrelevant articles or sections. The plugin's settings can be configured from Textpattern's "Preferences":https://docs.textpattern.com/administration/preferences-panel panel, organized under its own Sitemap section. "Sections":https://docs.textpattern.com/administration/sections-panel and "Categories":https://docs.textpattern.com/administration/categories-panel can be excluded from the sitemap from their respective editors.

h3. Sending the sitemap to search engines

Once you have a sitemap up and running, you may want to inform search engines about its existence. There are few ways you can do it: "Google Search Central":https://developers.google.com/search for Google, you could use a "robots.txt":https://www.robotstxt.org/ directive or search vendor specific pinging.

The recommended way is by using a robots.txt file. To get robots.txt up and running, you will have to add @robots.txt@ file at root of your site's domain, so that its accessible from @https://example.com/robots.txt@. If your Textpattern site has fully functional clean URLs, is installed at the root and you already do not have robots.txt file, rah_sitemap will automatically create the file for you -- or well, serve it dynamically.

If not, you will need to create or edit a file named @robots.txt@ at the root of the domain. In that file you would add a @Sitemap@ directive containing an absolute URL to your sitemap:

bc. Sitemap: https://example.com/?rah_sitemap=sitemap

Where the @https://example.com/@ is your site's location as defined in Textpattern's Preferences panel. The directive should be placed on its own line.

h2. Preferences

Rah_sitemap comes with number of preferences which all can be found from your Preferences panel, organized under a Sitemap section. Rah_sitemap allows excluding sections, categories and articles from the XML sitemap. Following options will be present.

h3. Exclude articles based on fields

The field can be used to exclude articles from the sitemap based on any article field and its value. The option takes a comma-separated list of @articlefield: value@ pairs, where the field is the database field and the value is the field's value that will be excluded. Available fields include @Title@, @AuthorID@, @Body@, @Excerpt@, @Category1@, @Category2@, @Section@, @Keywords@, @url_title@, @custom_1@ to @custom_10@ and @Image@.

Values used in the option support two wildcard characters. An underscore (@_@) matches exactly one character, and a percent sign (@%@) matches zero or more characters.

If you wanted to exclude articles posted to sections named as notes and private or by a user mailer, you could use the following in the field:

bc. Section: notes, Section: private, AuthorID: mailer

h3. Additional URLs

Comma-separated list of additional local site URLs added to the sitemap. Note that a Sitemap only allows local URLs, meaning that any URL used, needs to link to the same domain as where the website itself is located. If a URL is relative and doesn't start with a HTTP or HTTPS protocol, the site's URL is prepended to the URL.

h3. Include future articles?

If set to Yes, articles with future publishing date are visible in the sitemap. Please note that by default the article tag doesn't display future articles, unless its @time@ attribute is explicitly set to @future@ or @any@.

h3. Include published articles?

If set to Yes, published articles are visible in the sitemap. If both this option and Include future articles? are set to No, no articles will be visible in the sitemap.

h3. Include expired articles?

If set to No, expired articles are not visible in the sitemap.

h3. Exclude sticky articles?

If set to Yes, sticky articles are not visible in the sitemap.

h2. For developers

Rah_sitemap offers small set of tools for developers. These tools allow other Textpattern plugins to extend rah_sitemap's functionality by adding new URLs to the sitemap. The plugin is packaged in a class structure that can be extended if needed, and introduces new Textpattern callback events.

h3. Callback

Rah_sitemap introduces a new public-facing callback event to the Textpattern's event library named @rah_sitemap.urlset@. The event is fired before a sitemap is printed out. The callback event can be used with the API to add new URLs to the sitemap.

As with other callback events in Textpattern, hooking to rah_sitemap's event happens using Textpattern's callback handling functions, mainly "register_callback":https://docs.textpattern.com/development/index#callbacks.

bc.. register_callback('abc_function', 'rah_sitemap.urlset', 0, $urls);

fuction abc_function($event, $step, &$urls) { $urls['https://example.com/foo/bar'] = 123456789; $urls['https://example.com/second'] = null; }

p. The above would add @https://example.com/foo/bar@ to the sitemap with UNIX modification timestamp of @123456789@, and @https://example.com/second@ with no modification time.

h3. Custom URL functions

If you are supplying a custom URL function for Textpattern, please note that the URLs the function generates need to meet "RFC 3986":http://www.ietf.org/rfc/rfc3986.txt and "RFC 3987":http://www.ietf.org/rfc/rfc3987.txt. All URLs should also be entity escaped from special syntax characters using Textpattern's @txpspecialchars@ function. All URLs Textpattern itself generates follow these specifications, and so should your custom URL plugin.

As rah_sitemap integrates well with Textpattern's core, it uses the same URL functions as Textpattern. If an URL given to the sitemap doesn't meet those specification, the sitemap will become invalid.

h2. Changelog

h3. Version 4.0.2 - 2023/08/30

h3. Version 4.0.1 - 2023/02/18

h3. Version 4.0.0 - 2022/09/25

h3. Version 3.0.0 - 2022/04/23

h3. Version 2.1.0 - 2020/01/01

h3. Version 2.0.2 - 2020/01/01

h3. Version 2.0.1 - 2019/11/01

h3. Version 2.0.0 - 2019/04/20

h3. Version 1.3.0 - 2014/03/28

h3. Version 1.2 - 2011/03/09

h3. Version 1.1 - 2010/10/30

h3. Version 1.0 - 2010/10/29

h3. Version 0.9 - 2010/08/25

h3. Version 0.8 - 2010/07/27

h3. Version 0.7 - 2010/05/30

h3. Version 0.6 - 2010/05/30

h3. Version 0.5 - 2010/03/01

h3. Version 0.4 - 2009/04/12

h3. Version 0.3.2 - 2008/10/25

h3. Version 0.3 - 2008/10/24

h3. Version 0.2 - 2008/10/22

h3. Version 0.1.2 - 2008/09/12

h3. Version 0.1 - 2008/09/07


All versions of rah_sitemap with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-zlib Version *
textpattern/lock Version >=4.8.8
textpattern/installer Version *
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 rah/rah_sitemap contains the following files

Loading the files please wait ....