Can you make the "noindex" html meta tags optional?

Apparently in reaction to this post Adding Noindex to the Narrated Web Site? - #5 by SNoiraud a noindex was added to basepage.py. So in effect, one person’s desire not to be indexed now forcibly applies to everyone. A more proper solution would have been to make this an optional feature.

1 Like

The author has repeatedly expressed a dislike of Google. So he has no personal interest in doing work to add a preference interface to make noindex optional.

Of course, you can can hack the lines pointed out in the posting to bypass adding interface.

But if you have the skills to make an option, he’d probably accept an enhancement PR submitted through GitHub. (Assuming the patch passed pylint and Blank quality tests.)

While I have 44 years of development experience, Python is not part of my skillset. I do now have a shell script / awk to edit out the authors expressed dislikes in all the generated files, which took about 5 minutes to whip up.

1 Like

I suggest that you add a placeholder person to your tree with a “Gramps” surname. Then add a Note detailing the manual patch and a link to this discussion. And link the awk script as media or (more rot resistantly) paste the script into a Note. You can use a custom Type for the note… like Patch or Hack. Use the Private switch for the placeholder person.

Anytime the report is updated, your patch will revert. So having a workflow documented is helpful.

Have you noticed this Discouse thread:

I hoped that it would become another place where users could share their customizations for Gramps. (So they could recollect what needing tweaking after the next update. )

1 Like

In case you misunderstood: I run my script to patch the generated web report pages, not to patch the python source files.

1 Like

Ahhh. I did misunderstand.

But the suggestion holds true. I may run a report intensely for a few days then not need it again for years. Without a reminder, i have to recall there was a problem, recall the nature of the issue, isolate it, then workout the solution again.

There is a similar issue with Books of Reports. I’ll spend a fair amount of time compiling customized reports into a Book and forget about the objective and that the Book exists. (Then fixing things if the Book used custom filters that have been changed or deleted.)

The best should be to not create the meta tags in the html code.
The lines 1675 and 1676 containing meta5 and meta6

You need to remove these two lines in basepage.py or comment out them as follows:
> # 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=_meta5, indent=False),
        # Html("meta", attr=_meta6, indent=False),
    )
3 Likes

I’d have to repeat that every time a new version of Gramps gets installed. I’ll stick to my own sh / awk, i.e. the old-fashioned unix way, as post-processing after generating a fresh web report. I can also stick a meta description tag in a few select pages in a similar way. Bing still refuses to index any page without that specific tag present, and there’s no way to get into duckduckgo without passing the Bing gauntlet first.

If you want to have the “noindex” an option, please make a feature request.

2 Likes