[Kimchi-devel] [PATCH] Add a robots.txt file.
Julien Goodwin
jgoodwin at studio442.com.au
Mon Jan 19 23:19:13 UTC 2015
On 20/01/15 00:59, Aline Manera wrote:
>
> Please, make sure to update the test cases
>
> The following test is failing after applying this patch:
Tah, v2 being sent now to fix the test.
> ======================================================================
> 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: /
>
--
Julien Goodwin
Studio442
"Blue Sky Solutioneering"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ovirt.org/pipermail/kimchi-devel/attachments/20150120/52d248cf/attachment.sig>
More information about the Kimchi-devel
mailing list