fabianmichael / kirby-meta

All-in-one solution to all of your SEO/OpenGraph/JSON-LD needs. 👀
MIT License
65 stars 8 forks source link

Page method : isIndexed #30

Closed Daandelange closed 1 year ago

Daandelange commented 1 year ago

Hey Fabian, I found it useful to have a isIndexedByMeta page method in my setup, you might want to merge this. I use it to generate a site menu from the meta settings.

There's also a collection of indexed pages (you might not want this).

https://github.com/fabianmichael/kirby-meta/compare/main...Daandelange:kirby-meta:page-method-is-indexed

fabianmichael commented 1 year ago

Ineteresting idea, I just think we need to reconsider the name. Something like isIndexible() or isVisibleToRobots() would make a bit more sense to me, since its not really about my plugin but about search engine crawlers.

Just one question: what do you need this for?

Daandelange commented 1 year ago

I'm using it to generate the frontend menu, with some extra conditional exceptions to it.
Not sure if it's robust choice to rely on meta, but it's a perfectly lazy solution that fits my needs, preventing to maintain a 2nd set of very similar settings (excludes, includes, etc...).
I'm also gonna generate a good old "quick-access-rolldown-menu" with it.
Plus I'd like to build a sitemap.html for humans.

isIndexible sounds nicer to me but it's also a more common "name" which might cause conflicts. Let's go for isVisibleToRobots which is very explicit too ?

fabianmichael commented 1 year ago

@Daandelange I don’t bother too much, but if we chose isVisibleToRobots(), we should also rename the sitemap method and all internal references to avoid confusion.

Daandelange commented 1 year ago

I went to change them all, but then I thought that it will add breaking changes if also renaming SiteMeta::isPageIndexible(), so I went for isIndexible. ;)

I think it's good to merge now.

fabianmichael commented 1 year ago

@Daandelange Thanks :-)