Skip to content

Style Guide

Bharath314 edited this page Nov 14, 2022 · 2 revisions

Links

All links should follow the markdown syntax and make use of relative paths. For urls, it is [link-text](link-to-resource), and for images, it is ![Alt text](../assets/images/img.png). For videos, it is ![type:video](../assets/videos/video.mp4). Note that it is necessary to include the tag type:video for mkdocs to handle it is as a video.

Media Alignment

Media like tables and images should always be center aligned. This should be achieved by by wrapping the content in a div with the class center. For example, the following code centers an image:

<div class="center" markdown>
    ![Some Random Image](../assets/images/random.png)
</div>

You can view the implementation of the div here.

Inline code blocks

Always format inline code blocks by making use of mkdocs-material inline code block formatting capabilities. It is possible to do so by `#!py code-text`. You can skip adding additional formatting if the code is not a built-in object i.e., an imported library function or user-defined variable, or True or False as these will render in white anyways.

Number code blocks

Always number code blocks by adding linenums="1" after specifying the lexer unless they consist of only one line. Modify the number assigned to linenums accordingly if the code block is split up into multiple parts for better explanation.

Clone this wiki locally