mirror of
https://github.com/avinal/avinal.github.io.git
synced 2026-07-04 07:40:09 +05:30
github rst
This commit is contained in:
@@ -0,0 +1,107 @@
|
|||||||
|
**************************
|
||||||
|
reStructuredText in GitHub
|
||||||
|
**************************
|
||||||
|
|
||||||
|
:date: 2020-14-02 22:47
|
||||||
|
:slug: rst-guide
|
||||||
|
:category: development
|
||||||
|
:tags: rst, github
|
||||||
|
|
||||||
|
- Headers
|
||||||
|
|
||||||
|
.. code-block:: rst
|
||||||
|
|
||||||
|
Top Title
|
||||||
|
=========
|
||||||
|
|
||||||
|
Sub Title
|
||||||
|
---------
|
||||||
|
|
||||||
|
Sub Sub Title
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
- Images
|
||||||
|
|
||||||
|
- Direct
|
||||||
|
|
||||||
|
.. code-block:: rst
|
||||||
|
|
||||||
|
.. figure:: image-path-or-url
|
||||||
|
:align: center
|
||||||
|
:target: link-to-go-when-image-is-clicked
|
||||||
|
:alt: alternative-text-if-any
|
||||||
|
|
||||||
|
- Indirect
|
||||||
|
|
||||||
|
.. code-block:: rst
|
||||||
|
|
||||||
|
.. |substitution| image:: image-path-or-url
|
||||||
|
:target: link-to-go-when-image-is-clicked
|
||||||
|
|
||||||
|
You can use :code:`|substitution|` where you want to put your image.
|
||||||
|
|
||||||
|
- Links
|
||||||
|
|
||||||
|
.. code-block:: rst
|
||||||
|
|
||||||
|
`Link Text <link-itself>`__
|
||||||
|
|
||||||
|
- Lists
|
||||||
|
|
||||||
|
.. code-block:: rst
|
||||||
|
|
||||||
|
- item 1
|
||||||
|
- item 2
|
||||||
|
|
||||||
|
* item 1
|
||||||
|
* itme 2
|
||||||
|
|
||||||
|
#. item 1
|
||||||
|
#. item 2
|
||||||
|
|
||||||
|
1. item 1
|
||||||
|
2. item 2
|
||||||
|
|
||||||
|
First two lists are unordered next two are ordered.
|
||||||
|
|
||||||
|
- Code
|
||||||
|
|
||||||
|
- Inline
|
||||||
|
|
||||||
|
.. code-block:: rst
|
||||||
|
|
||||||
|
:code:`your-code`
|
||||||
|
|
||||||
|
- Code block
|
||||||
|
|
||||||
|
.. code-block:: rst
|
||||||
|
|
||||||
|
.. code-block:: language(optional)
|
||||||
|
|
||||||
|
Your code
|
||||||
|
in multiple lines. You may enable line numbers too.
|
||||||
|
|
||||||
|
- Tables
|
||||||
|
|
||||||
|
.. code-block:: rst
|
||||||
|
|
||||||
|
+----------------+----------------+
|
||||||
|
| Header Cell | Header Cell |
|
||||||
|
+================+================+
|
||||||
|
| Data cell | Data Cell |
|
||||||
|
+----------------+----------------+
|
||||||
|
| Header Cell | Header Cell |
|
||||||
|
+----------------+----------------+
|
||||||
|
|
||||||
|
- Raw HTML block
|
||||||
|
|
||||||
|
.. code-block:: rst
|
||||||
|
|
||||||
|
.. raw:: html
|
||||||
|
|
||||||
|
<put>
|
||||||
|
your html code here
|
||||||
|
</put>
|
||||||
|
|
||||||
|
These all are supported by GitHub very well. For more exhautive list specific to Sphinx see `this <https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>` link.
|
||||||
|
|
||||||
Reference in New Issue
Block a user