getgrav / grav-plugin-error

Grav Errors Plugin
https://getgrav.org
MIT License
4 stars 29 forks source link

robots is not properly applied #42

Open NicoHood opened 3 years ago

NicoHood commented 3 years ago

https://github.com/getgrav/grav-plugin-error/blame/develop/pages/error.md#L3

robots: noindex,nofollow

Does not work, and should be instead:

metadata:
    robots: noindex,nofollow

I found no reason why the first one should work, and it does not for me.

PR: https://github.com/getgrav/grav-plugin-error/pull/43

hughbris commented 2 years ago

I also noticed this and came here to report it. However, I subsequently realised that no sane crawler is going to index a page returning a 404 status, so the whole property is unnecessary.

mahagr commented 2 years ago

True, but I guess the fix won't hurt, will it?

hughbris commented 2 years ago

That is also true and at least it will be correct, but as a "less code" guy I'd rather lose it :/

NicoHood commented 2 years ago

I'd keep it. Otherwise someone will want to add it again in 3 years. It is clear and it is correct (in the PR). However it is a nice to know information, maybe we could add a comment?

hughbris commented 2 years ago

Otherwise someone will want to add it again in 3 years

Ha! Fair enough, let's merge this. Easily overridden anyway.