The page documenting the greenfield API (/docs) in the next release will be protected for logged in users only.
If we want the API reference documentation to be properly indexed by search engine, we need to expose it somewhere public (docs.btcpayserver.org or maybe api.btcpayserver.org?)
What is the best way to achieve that? I was thinking making a static github page that could be "refreshed" by running a script fetching the doc on mainnet.demo.btcpayserver.org and copy/pasting in locally in the repo.
Or maybe in btcpayserver CI, after docker images have been created, automatically updating such repo?
Ping @dennisreimann since you worked on the new documentation system, should we do it there?
api.btcpayserver.org might be confusing, as it implies we're offering a general API there.
docs.btcpayserver.org would be a better fit to host it, especially since we're already planning to integrate dev docs there.
As for the process: If we add it to the docs we can leverage the build process there, which already assembles docs from multiple repos into the docs website. We could build the Swagger docs separately, put them into a distinct folder and link to them via docs.btcpayserver.org/api/greenfield or something like that.
It might get a bit more tricky when we think about how to host docs for different versions of the API, as we'd have to somehow keep the existing docs 鈥撀燽ut I think we can find ways to achieve this too. Then we could point docs.btcpayserver.org/api/greenfield to the latest version and also have docs.btcpayserver.org/api/greenfield/v1.0.4.4 and so on.
I agree the api seems a good place to the docs website.
We don't have to keep all versions really, just last one is enough.
Most helpful comment
api.btcpayserver.orgmight be confusing, as it implies we're offering a general API there.docs.btcpayserver.orgwould be a better fit to host it, especially since we're already planning to integrate dev docs there.As for the process: If we add it to the docs we can leverage the build process there, which already assembles docs from multiple repos into the docs website. We could build the Swagger docs separately, put them into a distinct folder and link to them via
docs.btcpayserver.org/api/greenfieldor something like that.It might get a bit more tricky when we think about how to host docs for different versions of the API, as we'd have to somehow keep the existing docs 鈥撀燽ut I think we can find ways to achieve this too. Then we could point
docs.btcpayserver.org/api/greenfieldto the latest version and also havedocs.btcpayserver.org/api/greenfield/v1.0.4.4and so on.