I just tried testing this with Discourse version 2.9.0.beta2 and was unable to reproduce the issue. A pinned topic in a category included in Docs appears to be pinned successfully on the docs page, as expected.
This issue might just be related to Discourse version: 2.8.1, and you could try updating Discourse to resolve this.
I can reproduce this with 2.9.0.beta3. The docs index appears to default to recent activity, and doesn’t sort by pinned status; it does, however, show the correct pinned status by icon.
I pinned the first doc I created, hence it is the “oldest”:
Sadly this is quite a major change to both core and the plugin.
Tough we use TopicQuery to get the lists of topics, we handle all ordering outside of TopicQuery in:
To complete this we would probably need to move it so “core” handles ordering here instead of the plugin doing its own thing. It is a very complex change.
On the upside we can potentially remove a bunch of code from the plugin.
Sorry but I got to put this bug on the backburner for now.