onosproject / onos-docs

Consolidated documentation for the ONOS project.
https://docs.onosproject.org
4 stars 10 forks source link

Use Admonition standard markdown extension #67

Closed adibrastegarnia closed 4 years ago

adibrastegarnia commented 4 years ago

It would be better to use Admonition standard markdown extension for Note, Tip, Warning, Info, etc type of messages.

https://squidfunk.github.io/mkdocs-material/extensions/admonition/

adibrastegarnia commented 4 years ago

@SeanCondon Any comments on this? It makes the docs more beautiful and it is part of markdown standard library (instead of using > or other things to make a note).

SeanCondon commented 4 years ago

Beauty is in the eye of the beholder ;-)

Does it work when viewed on git hub? What happens if there is a command line quoted inside this admonition?

adibrastegarnia commented 4 years ago

@SeanCondon :)

The downside is in the markdown file, it does not show well (It does not show it like ">" (that we have now in the docs), however it is a standard markdown extension not Mkdocs plugin. For command line we should use ```bash thing even if we want to use it in a quote because it is a code snippet. If the website is more important than markdown files then it would be a good option to use because people can distinguish Notes, Info, Warning etc very well in the website.

Look at here as an example: https://github.com/Python-Markdown/markdown/blob/master/docs/extensions/admonition.md

P.S. I don't know what is the best decision here, I am just suggesting.

SeanCondon commented 4 years ago

I thought the website does a reasonably good job of displaying items with >

See https://docs.onosproject.org/onos-config/docs/gnmi/#gnmi_cli-utility-through-onit - specifically

On a deployed cluster the onos-cli ...

this appears with a grey bar and is indented. I think it should be possible to change the colour of the bar with CSS if required. Is it the title that you find appealing with Admonition?

adibrastegarnia commented 4 years ago

@SeanCondon I close this for now.