playcanvas / developer.playcanvas.com

Developer resources website for PlayCanvas
https://developer.playcanvas.com/
MIT License
68 stars 40 forks source link

Searching the API manual should be able to take us directly to a function #463

Closed yaustar closed 7 months ago

yaustar commented 1 year ago

For example, Unity gives search results that are only in the API documentation and is able to go directly to the function page

willeastcott commented 1 year ago

Does the Typedoc output give you what you want?

yaustar commented 1 year ago

Looking at the output for PCUI, unfortunately not.

I'm not sure if this is a search engine issue or a document layout. Unity docs have a list of functions/properties like we do here:

https://docs.unity3d.com/ScriptReference/TerrainTools.BrushTransform.html

But clicking on any of them takes you to separate page: https://docs.unity3d.com/ScriptReference/TerrainTools.BrushTransform.GetBrushXYBounds.html

And their search engine (whatever they are using) can index those function pages directly:

image

Whereas in our case, it takes the user to the page for the class but then they have to find the function themselves on the page.

The doc search on Snap feels like the ideal here where they can reference directly to anchor links on the page.

eg https://docs.snap.com/ and search for CreativeKit.Share() that uses https://www.algolia.com/ or self hosted version: https://www.meilisearch.com/

yaustar commented 1 year ago

Related ticket: https://github.com/playcanvas/developer.playcanvas.com/issues/85

willeastcott commented 7 months ago

The new TypeDoc API Reference seems to be able to search for and directly visit a function just fine:

functionsearch

Closing.