Koha/debian/docs/koha-sitemap.xml
Tomas Cohen Arazi 4e7734ce33 Bug 16016: Sitemap handling scripts for packages
This patch introduces the koha-sitemap script. This script wraps calls to
the misc/cronjobs/sitemap.pl script so it can be done easily instance-wise.

It sets /var/lib/koha/${instance}/sitemap as the destination directory for
the sitemap files. A followup will make them available through an Apache
configuration entry.

koha-functions.sh is provided with a handy is_sitemap_enabled function so
we can later add filters to other commands (koha-list, koha-foreach, etc).

Exposes sitemap files to apache. This is suitable for including the sitemap in
the robots.txt file as proposed in

  http://www.sitemaps.org/protocol.html#submit_robots

Note: it depends on Apache 2.4+ so we can patch the file as needed. Older
Apache users will be warned that they need to tweak the apache files on their
own.

To test:
- You can build a package out of this patchset, or do the following on a kohadevbox
  cp debian/scripts/koha-functions.sh /usr/share/koha/bin
- Run
  $ debian/scripts/koha-sitemap --help
- Go through all the options (--enable, --disable, generate).
(a) --enable:
  - debian/scripts/koha-sitemap --enable kohadev
=> SUCCESS: /var/lib/koha/kohadev/sitemap.enabled is created
  - call it again, a suitable warning is raised and the file is still there
(b) debian/scripts/koha-sitemap --disable kohadev
=> SUCCESS: /var/lib/koha/kohadev/sitemap.enabled is deleted
  - call it again, a suitable warning is raised and the file does not exist
(c) --generate:
  - debian/scripts/koha-sitemap --generate kohadev
=> SUCCESS: sitemapindex.xml and sitemap000X.xml files are generated in
            /var/lib/koha/kohadev/sitemap/
- Sign off :-D

Sponsored-by: Orex Digital
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-04 13:34:21 +00:00

92 lines
2.5 KiB
XML

<article xmlns='http://docbook.org/ns/docbook'>
<title>koha-sitemap</title>
<info>
<productname>Koha</productname> is the first free software library automation package.
<author>
<orgname>The Koha community</orgname>
<uri>http://koha-community.org/</uri>
</author>
</info>
<refentry xml:id="koha-sitemap">
<refmeta>
<refentrytitle>koha-sitemap</refentrytitle>
<manvolnum>8</manvolnum>
</refmeta>
<refnamediv>
<refname>koha-sitemap</refname>
<refpurpose>Manage sitemaps for Koha instances.</refpurpose>
<refclass>UNIX/Linux</refclass>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>koha-sitemap</command>
<arg choice="req" rep="norepeat">
<option>--enable</option>|
<option>--disable</option>|
<option>--generate</option>|
<option>--help</option>|<option>-h</option>
|<option>--quiet</option>|<option>-q</option>
</arg>
<arg choice="req" rep="repeat"><replaceable>instancename</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1><title>Options</title>
<variablelist>
<varlistentry>
<term><option>--enable</option></term>
<listitem>
<para>Enable sitemap generation for the desired Koha instances.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--disable</option></term>
<listitem>
<para>Disable sitemap generation for the desired Koha instances.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--generate</option></term>
<listitem>
<para>Generate sitemap for the desired Koha instances.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--quiet|-q</option></term>
<listitem>
<para>Make the script quiet about non existent instance names or missing directories. Useful when calling <command>koha-sitemap</command> from another scripts.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--help|-h</option></term>
<listitem>
<para>Show usage information.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1><title>Description</title>
<para>The <command>koha-sitemap</command> script lets you manage your Koha instances sitemaps.</para>
</refsect1>
<refsect1><title>See also</title>
<simplelist type="inline">
<member><command>/etc/default/koha-common</command></member>
</simplelist>
</refsect1>
</refentry>
</article>