ucsf-education / moodle-theme-ucsf

A Moodle theme for the UCSF CLE site
GNU General Public License v3.0
0 stars 1 forks source link

Adds "noindex" meta tag to header #130

Closed stopfstedt closed 3 years ago

stopfstedt commented 3 years ago

see https://developers.google.com/search/docs/advanced/crawling/block-indexing

Trott commented 3 years ago

Does this omit the tag on the home page? Our robots.txt permits indexing of the home page. (Aside: I'm not seeing the robots.txt in the theme repo or in the UCSF Moodle repo so I'm not sure where it comes from.)

stopfstedt commented 3 years ago

Does this omit the tag on the home page?

as discussed yesterday, it currently doesn't. i'm taking this back to the workbench.

Aside: I'm not seeing the robots.txt in the theme repo or in the UCSF Moodle repo so I'm not sure where it comes from.

Filed as separate issue: https://github.com/ucsf-ckm/moodle/issues/15

stopfstedt commented 3 years ago

For reference, Moodle has settings that will add the noindex meta tag to the header as configured. However, it doesn't have a "exclude everything but the frontpage" option.

image

and it's also doesn't generate a corresponding robots.txt file either.

so our approach to do some custom coding here is legit.

ctam commented 3 years ago

Is there any way we can just add a new option here in the dropdown box?

stopfstedt commented 3 years ago

Is there any way we can just add a new option here in the dropdown box?

not without cracking moodle core open. in other words, unfortunately not.

stopfstedt commented 3 years ago

@ctam - this is ready for review now.