mirror of
https://github.com/Hopiu/django-markdownx.git
synced 2026-03-17 05:50:23 +00:00
445 lines
No EOL
16 KiB
HTML
445 lines
No EOL
16 KiB
HTML
|
|
|
|
<!DOCTYPE html>
|
|
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
|
|
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
|
|
<head>
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>Contributions — Django Markdownx 2.0.19 documentation</title>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="index" title="Index"
|
|
href="genindex.html"/>
|
|
<link rel="search" title="Search" href="search.html"/>
|
|
<link rel="top" title="Django Markdownx 2.0.19 documentation" href="index.html"/>
|
|
<link rel="next" title="License" href="license.html"/>
|
|
<link rel="prev" title="Views" href="markdownx/docs/views.html"/>
|
|
|
|
|
|
<script src="_static/js/modernizr.min.js"></script>
|
|
|
|
</head>
|
|
|
|
<body class="wy-body-for-nav" role="document">
|
|
|
|
<div class="wy-grid-for-nav">
|
|
|
|
|
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
|
<div class="wy-side-scroll">
|
|
<div class="wy-side-nav-search">
|
|
|
|
|
|
|
|
<a href="index.html" class="icon icon-home"> Django Markdownx
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
<div class="version">
|
|
2.0
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div role="search">
|
|
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
|
<input type="text" name="q" placeholder="Search docs" />
|
|
<input type="hidden" name="check_keywords" value="yes" />
|
|
<input type="hidden" name="area" value="default" />
|
|
</form>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ul class="current">
|
|
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="example.html">Example</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="customization.html">Customization</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="translation.html">Translation</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="js/js.html">JavaScript</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="markdownx/markdownx.html">MarkdownX Modules</a></li>
|
|
<li class="toctree-l1 current"><a class="current reference internal" href="#">Contributions</a><ul>
|
|
<li class="toctree-l2"><a class="reference internal" href="#quick-reference">Quick Reference</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="#example">Example</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="#tests">Tests</a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
|
|
</ul>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
|
|
|
|
|
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
|
|
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
|
<a href="index.html">Django Markdownx</a>
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
<div class="wy-nav-content">
|
|
<div class="rst-content">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div role="navigation" aria-label="breadcrumbs navigation">
|
|
|
|
<ul class="wy-breadcrumbs">
|
|
|
|
<li><a href="index.html">Docs</a> »</li>
|
|
|
|
<li>Contributions</li>
|
|
|
|
|
|
<li class="wy-breadcrumbs-aside">
|
|
|
|
|
|
<a href="_sources/contribution.rst.txt" rel="nofollow"> View page source</a>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<hr/>
|
|
</div>
|
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
|
<div itemprop="articleBody">
|
|
|
|
<div class="section" id="contributions">
|
|
<h1>Contributions<a class="headerlink" href="#contributions" title="Permalink to this headline">¶</a></h1>
|
|
<p>We welcome and encourage contributions of all nature; from pointing out an error or a potential problem, to
|
|
translations, to feature requests, and pull requests.</p>
|
|
<p>We have a implemented a fully comprehensive developers’ environment that comes with many functionalities, including its
|
|
own <a class="reference external" href="https://www.vagrantup.com">Vagrant</a> and <a class="reference external" href="https://www.docker.com">Docker</a> containers.</p>
|
|
<div class="admonition attention">
|
|
<p class="first admonition-title">Attention</p>
|
|
<p class="last">Developers’ environment is only compatible with Python 3 and is only compatible with Unix-based systems (Linux and
|
|
OS X). There are no plans to extend coverage to Python 2 as we intend to cease our support for Python 2 in the next
|
|
major release. We do not support development on Window through this method.</p>
|
|
</div>
|
|
<p>To set up the developers’ environment, start off by cloning our source code from <a class="reference external" href="https://github.com/neutronX/django-markdownx">GitHub</a>, like so:</p>
|
|
<div class="highlight-bash"><div class="highlight"><pre><span></span>git clone https://github.com/neutronX/django-markdownx.git
|
|
</pre></div>
|
|
</div>
|
|
<p>One that’s done, change to the cloned directory and run:</p>
|
|
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">python3</span> <span class="n">dev</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">h</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>to see the options available.</p>
|
|
<div class="section" id="quick-reference">
|
|
<h2>Quick Reference<a class="headerlink" href="#quick-reference" title="Permalink to this headline">¶</a></h2>
|
|
<p>And here is what you will see:</p>
|
|
<table border="1" class="docutils">
|
|
<colgroup>
|
|
<col width="30%" />
|
|
<col width="70%" />
|
|
</colgroup>
|
|
<thead valign="bottom">
|
|
<tr class="row-odd"><th class="head">Argument</th>
|
|
<th class="head">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr class="row-even"><td><code class="docutils literal"><span class="pre">-h</span></code>, <code class="docutils literal"><span class="pre">--help</span></code></td>
|
|
<td>show the help message and exit.</td>
|
|
</tr>
|
|
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">-v</span></code>, <code class="docutils literal"><span class="pre">--vagrant</span></code></td>
|
|
<td>Install Vagrant development environment (requires
|
|
Vagrant).</td>
|
|
</tr>
|
|
<tr class="row-even"><td><code class="docutils literal"><span class="pre">-d</span></code>, <code class="docutils literal"><span class="pre">--docker</span></code></td>
|
|
<td>Install Docker development environment (requires
|
|
Docker).</td>
|
|
</tr>
|
|
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">-c</span></code>, <code class="docutils literal"><span class="pre">--clean</span></code></td>
|
|
<td>Clean up the development files (only the ones that have
|
|
been automatically created).</td>
|
|
</tr>
|
|
<tr class="row-even"><td><code class="docutils literal"><span class="pre">-run-vagrant</span></code></td>
|
|
<td>Run vagrant development environment (runs <code class="docutils literal"><span class="pre">--vagrant</span></code>
|
|
if the files don’t already exist). Vagrant must be
|
|
installed on your machine.</td>
|
|
</tr>
|
|
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">-run-docker</span></code></td>
|
|
<td>Run docker development environment (runs <code class="docutils literal"><span class="pre">--docker</span></code> if
|
|
the files don’t already exist). Docker must already be
|
|
installed on your machine, and Docker Daemon must be up
|
|
and running.</td>
|
|
</tr>
|
|
<tr class="row-even"><td><code class="docutils literal"><span class="pre">-no-container</span></code></td>
|
|
<td>Create development files without a container-based
|
|
development environment (creates “manage.py” and
|
|
“runtests.py”).</td>
|
|
</tr>
|
|
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">--with-docs</span></code></td>
|
|
<td>Install documentation development environment.</td>
|
|
</tr>
|
|
<tr class="row-even"><td><code class="docutils literal"><span class="pre">--with-npm-settings</span></code></td>
|
|
<td>Install npm installation environment, including
|
|
<code class="docutils literal"><span class="pre">package.json</span></code> for front-end
|
|
(TypeScript) development (requires <code class="docutils literal"><span class="pre">node.js</span></code> and
|
|
<code class="docutils literal"><span class="pre">npm</span></code>).</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<ul class="simple">
|
|
<li><code class="docutils literal"><span class="pre">--with-docs</span></code> and <code class="docutils literal"><span class="pre">--with-npm-settings</span></code> are optional and need to be accompanied by one of the required arguments.</li>
|
|
<li>To save the changes made within the developers’ environment, use <code class="docutils literal"><span class="pre">-c</span></code> or <code class="docutils literal"><span class="pre">--clean</span></code>; and you will be asked if you</li>
|
|
</ul>
|
|
<p>would like to override the existing settings. <strong>Do not commit your changes before doing this</strong>.</p>
|
|
</div>
|
|
<div class="section" id="example">
|
|
<h2>Example<a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h2>
|
|
<p>This will install the following files:</p>
|
|
<ul class="simple">
|
|
<li>manage.py</li>
|
|
<li>runtests.py</li>
|
|
<li>Makefile</li>
|
|
<li>create_docs.py</li>
|
|
</ul>
|
|
<p>It will also install the requirements for compiling the documentations. You do not need to create the documentations
|
|
locally if you do not intend to change them. Although you are welcome to do so, for minor changes, it is probably
|
|
easier to report an issue on GitHub as compiling the documentations can be somewhat tricky.</p>
|
|
<div class="highlight-bash"><div class="highlight"><pre><span></span>python3 dev.py -no-container --with-docs
|
|
</pre></div>
|
|
</div>
|
|
<p>Once done, please run:</p>
|
|
<div class="highlight-bash"><div class="highlight"><pre><span></span>python3 dev.py -c
|
|
</pre></div>
|
|
</div>
|
|
<p>to clean the installed files. If any of them have been altered, you will be asked for additional instructions as to
|
|
whether to save the changes or discard them and hold onto the default.</p>
|
|
</div>
|
|
<div class="section" id="tests">
|
|
<h2>Tests<a class="headerlink" href="#tests" title="Permalink to this headline">¶</a></h2>
|
|
<p>Django packages require <span class="guilabel">manage.py</span> and more often than not, <span class="guilabel">settings.py</span> files to run. This
|
|
introduces a challenge for testing apps outside of a fully constructed project environment. This is one of the reasons
|
|
why we introduced the developers’ environment, which allows for a fully setup container (<a class="reference external" href="https://www.vagrantup.com">Vagrant</a> or <a class="reference external" href="https://www.docker.com">Docker</a>) to create
|
|
an inclusive virtual server that can be used to run <strong>MarkdownX</strong> independently.</p>
|
|
<div class="admonition attention">
|
|
<p class="first admonition-title">Attention</p>
|
|
<p class="last">You need to have either <a class="reference external" href="https://www.vagrantup.com">Vagrant</a> or <a class="reference external" href="https://www.docker.com">Docker</a> along with <a class="reference external" href="https://www.virtualbox.org">Oracle VirtualBox</a> installed and configured to run either
|
|
of these.</p>
|
|
</div>
|
|
<div class="admonition note">
|
|
<p class="first admonition-title">Note</p>
|
|
<p class="last">Vagrant will attempt to download and install Ubuntu Xenial, whilst Docker uses the default operating system if one
|
|
already exists.</p>
|
|
</div>
|
|
<p>To take advantage of this, you should clone the source code from <a class="reference external" href="https://github.com/neutronX/django-markdownx">GitHub</a> as explained above, and depending on your
|
|
container of choice, follow these instructions:</p>
|
|
<table border="1" class="docutils">
|
|
<colgroup>
|
|
<col width="26%" />
|
|
<col width="37%" />
|
|
<col width="37%" />
|
|
</colgroup>
|
|
<thead valign="bottom">
|
|
<tr class="row-odd"><th class="head"> </th>
|
|
<th class="head">Vagrant</th>
|
|
<th class="head">Docker</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr class="row-even"><td><strong>Initialize</strong></td>
|
|
<td><div class="first last highlight-bash"><div class="highlight"><pre><span></span>python3 dev.py --vagrant
|
|
</pre></div>
|
|
</div>
|
|
</td>
|
|
<td><div class="first last highlight-bash"><div class="highlight"><pre><span></span>python3 dev.py --docker
|
|
</pre></div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="row-odd"><td><strong>File created</strong></td>
|
|
<td><ul class="first last simple">
|
|
<li>Vagrantfile</li>
|
|
<li>bootstrap.sh</li>
|
|
<li>runtests.py</li>
|
|
<li>manage.py</li>
|
|
</ul>
|
|
</td>
|
|
<td><ul class="first last simple">
|
|
<li>Dockerfile</li>
|
|
<li>docker-compose.yml</li>
|
|
<li>runtests.py</li>
|
|
<li>manage.py</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<tr class="row-even"><td><strong>Start the container</strong></td>
|
|
<td><div class="first last highlight-bash"><div class="highlight"><pre><span></span>python3 dev.py --run-vagrant
|
|
</pre></div>
|
|
</div>
|
|
</td>
|
|
<td><div class="first last highlight-bash"><div class="highlight"><pre><span></span>python3 dev.py --run-docker
|
|
</pre></div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="row-odd"><td><strong>Runs on</strong></td>
|
|
<td><p class="first"><a class="reference external" href="http://localhost:8000/">http://localhost:8000/</a></p>
|
|
<p>or</p>
|
|
<p class="last"><a class="reference external" href="http://127.0.0.1:8000/">http://127.0.0.1:8000/</a></p>
|
|
</td>
|
|
<td><p class="first"><a class="reference external" href="http://localhost:8000/">http://localhost:8000/</a></p>
|
|
<p>or</p>
|
|
<p class="last"><a class="reference external" href="http://127.0.0.1:8000/">http://127.0.0.1:8000/</a></p>
|
|
</td>
|
|
</tr>
|
|
<tr class="row-even"><td><strong>Exit</strong></td>
|
|
<td><code class="docutils literal"><span class="pre">ctrl+c</span></code></td>
|
|
<td><code class="docutils literal"><span class="pre">ctrl+c</span></code></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="admonition tip">
|
|
<p class="first admonition-title">Tip</p>
|
|
<p class="last">Any changes made to the code whilst the container is up and running is automatically reflected without the need to
|
|
restart the container.</p>
|
|
</div>
|
|
<p>Once done, please run:</p>
|
|
<div class="highlight-bash"><div class="highlight"><pre><span></span>python3 dev.py -c
|
|
</pre></div>
|
|
</div>
|
|
<p>to clean the installed files. If any of them have been altered, you will be asked for additional instructions as to
|
|
whether to save the changes or discard them and hold onto the default.</p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<div class="articleComments">
|
|
|
|
</div>
|
|
</div>
|
|
<footer>
|
|
|
|
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
|
|
|
<a href="license.html" class="btn btn-neutral float-right" title="License" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
|
|
|
|
|
<a href="markdownx/docs/views.html" class="btn btn-neutral" title="Views" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
|
|
|
</div>
|
|
|
|
|
|
<hr/>
|
|
|
|
<div role="contentinfo">
|
|
<p>
|
|
© Copyright 2017 - Adi, Pouria Hadjibagheri.
|
|
|
|
</p>
|
|
</div>
|
|
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
|
|
|
</footer>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
var DOCUMENTATION_OPTIONS = {
|
|
URL_ROOT:'./',
|
|
VERSION:'2.0.19',
|
|
COLLAPSE_INDEX:false,
|
|
FILE_SUFFIX:'.html',
|
|
HAS_SOURCE: true,
|
|
SOURCELINK_SUFFIX: '.txt'
|
|
};
|
|
</script>
|
|
<script type="text/javascript" src="_static/jquery.js"></script>
|
|
<script type="text/javascript" src="_static/underscore.js"></script>
|
|
<script type="text/javascript" src="_static/doctools.js"></script>
|
|
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript" src="_static/js/theme.js"></script>
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
jQuery(function () {
|
|
SphinxRtdTheme.StickyNav.enable();
|
|
});
|
|
</script>
|
|
|
|
|
|
</body>
|
|
</html> |