Adding Noindex to the Narrated Web Site?

Using Gramps 5.1.5 on Linux

The narrated web site reports are wonderful.
Is there an easy way to add a “Noindex” meta tag in the html header of all the Gramps-generated html pages ?
The goal is to prevent Google or other robots from indexing the pages.

At the moment, I think I will use the “sed” command to insert what I want in all those files, but it’s not my favourite solution.

Any idea ?

Thank you,

–yves

and if this is not the most appropriate place to post such a question, please point me to the right forum

Yes, there is an easy way to do that.
You can add the following lines in basepage.py

--- a/gramps/plugins/webreport/basepage.py
+++ b/gramps/plugins/webreport/basepage.py
@@ -1538,12 +1538,16 @@ class BasePage:
         _meta3 = 'name="generator" content="%s %s %s"' % (
             PROGRAM_NAME, VERSION, URL_HOMEPAGE)
         _meta4 = 'name="author" content="%s"' % self.author
+        _meta5 = 'name="robots" content="noindex"'
+        _meta6 = 'name="googlebot" content="noindex"'
 
         # create additional meta tags
         meta = Html("meta", attr=_meta1) + (
             Html("meta", attr=_meta2, indent=False),
             Html("meta", attr=_meta3, indent=False),
-            Html("meta", attr=_meta4, indent=False)
+            Html("meta", attr=_meta4, indent=False),
+            Html("meta", attr=_meta5, indent=False),
+            Html("meta", attr=_meta6, indent=False)
         )
 
         # Link to _NARRATIVESCREEN  stylesheet

Can we implicitly add these guidelines without asking the question?
I don’t want to add a new option to the narrative web.

I vote Yes!

I just modified my code.

May I ask why? Why publish a tree if you don’t want to make it easy to find? You could just put your tree on OneDrive, Google Drive, etc, if you just want select people to be able to access it.

Craig

I don’t want anybody is able to find my data. Only the people I give the URL will be able to see them.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.