luckyframework / website

The Lucky website
https://luckyframework.org
37 stars 66 forks source link

Validations don't show up in Algolia search #1247

Open wout opened 1 year ago

wout commented 1 year ago

I ran into this a few times already; validations don't show up in the search results. So if you search for uniqueness, inclusion or even the full validate_uniqueness_of for example, there's no link to that page.

I'm not sure what needs to happen to include them, but I'm open to creating a PR if anyone can give me some pointers.

matthewmcgarvey commented 1 year ago

Validations: https://luckyframework.org/guides/database/callbacks-and-validations#validations

I think the solution would be moving away from a table and to separate sections for each. I looked around for an existing pattern to follow in the guides and this looks to be the same basic structure that we could migrate to https://luckyframework.org/guides/frontend/html-forms#input-fields

It's just a matter of whether we want to or not.

wout commented 1 year ago

Right, so that would be migrating to h3's for each validation? Maybe that could even be useful. It would allow more info which can be useful for validations with complicated or multiple options.

jwoertink commented 1 year ago

I think we can tell it how to get the info from tables. We need to check that we're using v3, but there's this https://docsearch.algolia.com/docs/record-extractor