1
0
mirror of https://github.com/avinal/avinal.github.io.git synced 2026-07-03 23:30:09 +05:30
Files
avinal.github.io/posts/development/rst-guide.html
T
2022-03-19 19:37:48 +00:00

284 lines
12 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>reStructuredText in GitHub | Be My SpaceTime
</title>
<link rel="canonical" href="https://avinal.space/posts/development/rst-guide.html">
<link rel="apple-touch-icon" href="https://avinal.space/apple-touch-icon.png" sizes="180x180">
<link rel="icon" type="image/png" href="https://avinal.space/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://avinal.space/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://avinal.space/site.webmanifest">
<meta name="theme-color" content="#333333">
<link rel="stylesheet" href="https://avinal.space/theme/css/bootstrap.min.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/all.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/pygments/manni.min.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/theme.css">
<link rel="stylesheet" href="https://avinal.space/theme/css/space.css">
<link rel="alternate" type="application/atom+xml" title="Full Atom Feed" href="https://avinal.space/feeds/all.atom.xml">
<link rel="alternate" type="application/atom+xml" title="Categories Atom Feed"
href="https://avinal.space/feeds/development.atom.xml">
<meta name="description" content="reStructuredText syntax">
</head>
<body style="font-family:Overpass Mono,monospace;">
<header class="header star">
<div id='stars'></div>
<div id='stars2'></div>
<div id='stars3'></div>
<div class="container text-center">
<div class="row">
<div class="col-sm-12">
<h1 class="title" style="font-family: ExodarOut;font-weight: lighter;"><a href="https://avinal.space/">Be My SpaceTime</a>
</h1>
<!--
<p class="text-muted">눈치</p>
-->
<ul class="list-inline">
<li class="list-inline-item"><a href="https://gsoc.avinal.space" target="_blank">gsoc</a></li>
<li class="list-inline-item text-muted">|</li>
<li class="list-inline-item"><a href="https://avinal.space/pages/about-me.html">About Me</a></li>
<li class=" list-inline-item text-muted">|</li>
<li class="list-inline-item"><a class="fab fa-github" href="https://github.com/avinal" target="_blank"></a></li>
<li class="list-inline-item"><a class="fab fa-linkedin" href="https://www.linkedin.com/in/avinal/" target="_blank"></a></li>
<li class="list-inline-item"><a class="fab fa-instagram" href="https://instagram.com/avinal.k" target="_blank"></a></li>
<li class="list-inline-item"><a class="fab fa-calendar" href="https://meet.avinal.space" target="_blank"></a></li>
<li class="list-inline-item"><a class="fa fa-envelope" href="mailto:blog@avinal.space" target="_blank"></a></li>
</ul>
</div>
</div> </div>
</header>
<div class="main">
<div class="container">
<h1>reStructuredText in GitHub
</h1>
<hr>
<article class="article">
<header>
<ul class="list-inline">
<li class="list-inline-item text-muted" title="2021-02-14T22:47:00+05:30">
<i class="fas fa-clock"></i>
Sun 14 February 2021
</li>
<li class="list-inline-item">
<i class="fas fa-folder-open"></i>
<a href="https://avinal.space/category/development.html">development</a>
</li>
<li class="list-inline-item">
<i class="fas fa-tag"></i>
<a href="https://avinal.space/tag/rst.html">#rst</a>, <a href="https://avinal.space/tag/github.html">#github</a> </li>
</ul>
</header>
<div class="content">
<ul>
<li><p class="first">Headers</p>
<div class="highlight"><pre><span></span><span class="gh">Top Title</span>
<span class="gh">=========</span>
<span class="gh">Sub Title</span>
<span class="gh">---------</span>
<span class="gh">Sub Sub Title</span>
<span class="gh">^^^^^^^^^^^^^</span>
</pre></div>
</li>
<li><p class="first">Images</p>
<ul>
<li><p class="first">Direct</p>
<div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">figure</span><span class="p">::</span> image-path-or-url
<span class="nc">:align:</span> center
<span class="nc">:target:</span> link-to-go-when-image-is-clicked
<span class="nc">:alt:</span> alternative-text-if-any
</pre></div>
</li>
<li><p class="first">Indirect</p>
<div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">|substitution|</span> <span class="ow">image</span><span class="p">::</span> image-path-or-url
<span class="nc">:target:</span> link-to-go-when-image-is-clicked
</pre></div>
<p>You can use <code>|substitution|</code> where you want to put your image.</p>
</li>
</ul>
</li>
<li><p class="first">Links</p>
<div class="highlight"><pre><span></span><span class="s">`Link Text </span><span class="si">&lt;link-itself&gt;</span><span class="s">`__</span>
</pre></div>
</li>
<li><p class="first">Lists</p>
<div class="highlight"><pre><span></span><span class="m">-</span> item 1
<span class="m">-</span> item 2
<span class="m">*</span> item 1
<span class="m">*</span> itme 2
<span class="m">#.</span> item 1
<span class="m">#.</span> item 2
<span class="m">1.</span> item 1
<span class="m">2.</span> item 2
</pre></div>
<p>First two lists are unordered next two are ordered.</p>
</li>
<li><p class="first">Code</p>
<ul>
<li><p class="first">Inline</p>
<div class="highlight"><pre><span></span><span class="na">:code:</span><span class="nv">`your-code`</span>
</pre></div>
</li>
<li><p class="first">Code block</p>
<div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">code-block</span><span class="p">::</span> <span class="k">language(optional)</span>
<span class="s"> Your code</span>
<span class="s"> in multiple lines. You may enable line numbers too.</span>
</pre></div>
</li>
</ul>
</li>
<li><p class="first">Tables</p>
<div class="highlight"><pre><span></span>+----------------+----------------+
<span class="o">|</span> Header Cell | Header Cell |
+================+================+
<span class="o">|</span> Data cell | Data Cell |
+----------------+----------------+
<span class="o">|</span> Header Cell | Header Cell |
+----------------+----------------+
</pre></div>
</li>
<li><p class="first">Raw HTML block</p>
<div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">raw</span><span class="p">::</span> html
&lt;put&gt;
your html code here
&lt;/put&gt;
</pre></div>
</li>
<li><p class="first">Notes, warnings</p>
<div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">note</span><span class="p">::</span>
Put your note here.
<span class="p">..</span> <span class="ow">warning</span><span class="p">::</span>
Put your warning here.
<span class="p">..</span> <span class="ow">important</span><span class="p">::</span>
Put instructions here.
<span class="p">..</span> <span class="ow">admonition</span><span class="p">::</span> custom-text
Custom description here.
</pre></div>
</li>
</ul>
<p>These all are supported by GitHub very well. For more exhautive list specific to Sphinx see <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html">this</a> link.</p>
<div class="section" id="tips">
<h2>Tips</h2>
<ul class="simple">
<li>There must be a blank line before and after any directive. Such as after title or code block, tables etc.</li>
<li>The options and content of a directives must be 1 tab indented to the directives.</li>
</ul>
</div>
<hr>
<p align=center>
This Blog is licensed under <a href="http://creativecommons.org/licenses/by-nc/4.0/?ref=chooser-v1"
target="_blank" rel="license noopener noreferrer">Attribution-NonCommercial 4.0 International<img
style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1"><img
style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1"><img
style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
src="https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1">
</a>
</p>
</div>
</article>
<hr>
<div id="comment-form">
<div class="alert alert-info" role="alert">
Feel free to leave a feedback or question!
</div>
<form action="https://docs.google.com/forms/u/0/d/e/1FAIpQLSfL9T8WBRm-Ac2uyu74lJXSYOqAuF6lLIUAulRArCsuiI1ZRQ/formResponse" target="response" method="POST" id="valid-form">
<div class="form-row align-items-center">
<div class="form-group col-md-5">
<label class="sr-only" for="person-name">Name</label>
<input type="text" class="form-control form-control-sm" id="person-name" placeholder="Your Name (Optional)"
aria-describedby="nameHelp" name="entry.982725972">
<input type="text" id="page-link" name="entry.1641222305" hidden>
<small id="nameHelp" class="form-text text-muted">You may put your GitHub Username.</small>
</div>
<div class="form-group col-md-7">
<label class="sr-only" for="email-address">Email address</label>
<input type="email" class="form-control form-control-sm" id="email-address" aria-describedby="emailHelp"
placeholder="Your Email Address (Optional)" name="entry.1652853191">
<small id="emailHelp" class="form-text text-muted">I'll never share your email with anyone
else.</small>
</div>
</div>
<div class="form-group">
<label class="sr-only" for="comment-section">Your Message</label>
<textarea class="form-control form-control-sm" id="comment-section" rows="3"
placeholder="Please enter your message or feedback. (Required)" aria-describedby="emailHelp"
name="entry.1062656232" required></textarea>
<div class="invalid-feedback">
Please Enter something !
</div>
<small id="textHelp" class="form-text text-muted">Enter upto 200 characters.</small>
</div>
<button class="btn btn-outline-info" type="submit">Send</button>
</form>
<iframe name="response" hidden></iframe>
</div>
<div class="alert alert-info" role="alert" id="comment-message" style="display: none;">
<h4 class="alert-heading">Thanks You 🥳</h4>
<p>Thanks a lot for reading this blog and sending me a feedback. I hope you liked it. I will get back to you
soon if you have added an email.</p>
</div>
<script>
(function () {
'use strict';
window.addEventListener('load', function () {
var form = document.getElementById('valid-form');
form.addEventListener('submit', function (event) {
document.getElementById('page-link').value = window.location.href;
document.getElementById('comment-form').style.display = 'none';
document.getElementById('comment-message').style.display = '';
}, false);
}, false);
})();
</script>
</div>
</div>
<footer class="footer star">
<div id='stars'></div>
<div id='stars2'></div>
<div id='stars3'></div>
<div class="container">
<div class="row">
<ul class="col-sm-6 list-inline">
<li class="list-inline-item"><a
href="https://avinal.space/archives.html">Archives</a></li>
<li class="list-inline-item"><a
href="https://avinal.space/categories.html">Categories</a></li>
<li class="list-inline-item"><a href="https://avinal.space/tags.html">Tags</a></li>
</ul>
<p class="col-sm-6 text-sm-right text-muted">Created with <i class="fa fa-heart" style="color: red;"></i> by <a
href="https://github.com/avinal" target="_blank">Avinal</a>
</p>
</div> </div>
</footer>
</body>
</html>