[Kimchi-devel] [PATCH] Add a robots.txt file.

Aline Manera alinefm at linux.vnet.ibm.com
Mon Jan 19 13:59:56 UTC 2015


Please, make sure to update the test cases

The following test is failing after applying this patch:

======================================================================
FAIL: test_kimchi_config (test_config.ConfigTests)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "test_config.py", line 192, in test_kimchi_config
     self.assertEquals(kimchi_config, configObj)


On 16/01/2015 02:29, Julien Goodwin wrote:
> Add a static robots.txt file just prohibiting all crawlers.
>
> Signed-off-by: Julien Goodwin <jgoodwin at studio442.com.au>
> ---
>   src/kimchi/config.py.in | 4 ++++
>   ui/Makefile.am          | 4 ++++
>   ui/robots.txt           | 2 ++
>   3 files changed, 10 insertions(+)
>   create mode 100644 ui/robots.txt
>
> diff --git a/src/kimchi/config.py.in b/src/kimchi/config.py.in
> index 83a5dd0..f36cc32 100644
> --- a/src/kimchi/config.py.in
> +++ b/src/kimchi/config.py.in
> @@ -245,6 +245,10 @@ class KimchiConfig(dict):
>               'tools.staticfile.on': True,
>               'tools.staticfile.filename': '%s/images/logo.ico' % paths.ui_dir
>           },
> +        '/robots.txt': {
> +            'tools.staticfile.on': True,
> +            'tools.staticfile.filename': '%s/robots.txt' % paths.ui_dir
> +        },
>           '/help': {
>               'tools.staticdir.on': True,
>               'tools.staticdir.dir': '%s/ui/pages/help' % paths.prefix,
> diff --git a/ui/Makefile.am b/ui/Makefile.am
> index 5192162..d541355 100644
> --- a/ui/Makefile.am
> +++ b/ui/Makefile.am
> @@ -16,3 +16,7 @@
>   # limitations under the License.
>
>   SUBDIRS = css images js libs pages spice-html5
> +
> +uidir = $(datadir)/kimchi/ui
> +
> +dist_ui_DATA = robots.txt
> diff --git a/ui/robots.txt b/ui/robots.txt
> new file mode 100644
> index 0000000..1f53798
> --- /dev/null
> +++ b/ui/robots.txt
> @@ -0,0 +1,2 @@
> +User-agent: *
> +Disallow: /




More information about the Kimchi-devel mailing list