TugboatQA / docs

Tugboat Docs
https://docs.tugboat.qa
MIT License
10 stars 18 forks source link

Annotate yaml configs with comments beside the yaml #367

Open q0rban opened 1 year ago

q0rban commented 1 year ago

GitHub docs uses a yaml annotation formatter that pulls comments off to the side of the yaml and highlights them along with the block of code. This would be great for our config examples!

https://docs.github.com/en/contributing/syntax-and-versioning-for-github-docs/annotating-code-examples#rendered-example

Annotating code examples - GitHub Docs 2023-09-06 11-02-13
q0rban commented 1 year ago

I think this is the JS that's being used: https://github.com/github/docs/blob/774c5d0d9d75f4e62296e1b007c22e4f99010cda/src/content-render/unified/annotate.js#L52

KeyboardCowboy commented 1 year ago

Github Docs is a node module and it's loading annotate.js somewhere in the dependency chain from its package.js file. I don't think that will play very easily with this theme since it's not a node module, but maybe I'm a little out of my tech depth.