getgrav / grav-plugin-sitemap

Grav Sitemap Plugin
https://getgrav.org
MIT License
42 stars 42 forks source link

Avoid flex objects from indexing #102

Open xf- opened 2 years ago

xf- commented 2 years ago

Is there any documented way to avoid flex objects from being indexed?

My patch at the moment is

            /** @var Page $page */
            foreach ($pages->all() as $page) {
                if (preg_match("/^[0-9a-f]{32}/", $page->folder())) {
                    $page->header(['sitemap' => ['ignore' => true]]);
                }
            }

But that is very ugly, I saw no attribute on the page that says flex object or property in the blueprint to remove the indexing.