blob: a68fc9ff2274f51b64275231e37f04131e4a5bd0 [file] [log] [blame]
<!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>Working on Documentation &mdash; Apache Cassandra Documentation v4.0-rc2</title>
<script type="text/javascript" src="../_static/js/modernizr.min.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></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="../_static/language_data.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/extra.css" type="text/css" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Jenkins CI Environment" href="ci.html" />
<link rel="prev" title="How-to Commit" href="how_to_commit.html" />
</head>
<body class="wy-body-for-nav">
<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"> Apache Cassandra
</a>
<div class="version">
4.0-rc2
</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="../getting_started/index.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="../new/index.html">New Features in Apache Cassandra 4.0</a></li>
<li class="toctree-l1"><a class="reference internal" href="../architecture/index.html">Architecture</a></li>
<li class="toctree-l1"><a class="reference internal" href="../cql/index.html">The Cassandra Query Language (CQL)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../data_modeling/index.html">Data Modeling</a></li>
<li class="toctree-l1"><a class="reference internal" href="../configuration/index.html">Configuring Cassandra</a></li>
<li class="toctree-l1"><a class="reference internal" href="../operating/index.html">Operating Cassandra</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tools/index.html">Cassandra Tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../troubleshooting/index.html">Troubleshooting</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Contributing to Cassandra</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="gettingstarted.html">Getting Started</a></li>
<li class="toctree-l2"><a class="reference internal" href="ide.html">Building and IDE Integration</a></li>
<li class="toctree-l2"><a class="reference internal" href="testing.html">Testing</a></li>
<li class="toctree-l2"><a class="reference internal" href="patches.html">Contributing Code Changes</a></li>
<li class="toctree-l2"><a class="reference internal" href="code_style.html">Code Style</a></li>
<li class="toctree-l2"><a class="reference internal" href="license_compliance.html">License Compliance</a></li>
<li class="toctree-l2"><a class="reference internal" href="how_to_review.html">Review Checklist</a></li>
<li class="toctree-l2"><a class="reference internal" href="how_to_commit.html">How-to Commit</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Working on Documentation</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#how-cassandra-is-documented">How Cassandra is documented</a></li>
<li class="toctree-l3"><a class="reference internal" href="#github-based-work-flow">GitHub based work flow</a></li>
<li class="toctree-l3"><a class="reference internal" href="#jira-based-work-flow">Jira based work flow</a></li>
<li class="toctree-l3"><a class="reference internal" href="#working-on-documents-locally-using-sphinx">Working on documents locally using Sphinx</a></li>
<li class="toctree-l3"><a class="reference internal" href="#notes-for-committers">Notes for committers</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#publishing">Publishing</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="ci.html">Jenkins CI Environment</a></li>
<li class="toctree-l2"><a class="reference internal" href="dependencies.html">Dependency Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="release_process.html">Release Process</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../faq/index.html">Frequently Asked Questions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../plugins/index.html">Third-Party Plugins</a></li>
<li class="toctree-l1"><a class="reference internal" href="../bugs.html">Reporting Bugs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../contactus.html">Contact us</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">Apache Cassandra</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> &raquo;</li>
<li><a href="index.html">Contributing to Cassandra</a> &raquo;</li>
<li>Working on Documentation</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/development/documentation.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="working-on-documentation">
<h1>Working on Documentation<a class="headerlink" href="#working-on-documentation" title="Permalink to this headline"></a></h1>
<div class="section" id="how-cassandra-is-documented">
<h2>How Cassandra is documented<a class="headerlink" href="#how-cassandra-is-documented" title="Permalink to this headline"></a></h2>
<p>The official Cassandra documentation lives in the project’s git repository. We use a static site generator, <a class="reference external" href="http://www.sphinx-doc.org/">Sphinx</a>, to create pages hosted at <a class="reference external" href="https://cassandra.apache.org/doc/latest/">cassandra.apache.org</a>. You’ll also find developer centric content about Cassandra internals in our retired <a class="reference external" href="https://wiki.apache.org/cassandra">wiki</a> (not covered by this guide).</p>
<p>Using a static site generator often requires to use a markup language instead of visual editors (which some people would call good news). Sphinx, the tool-set we use to generate our documentation, uses <a class="reference external" href="http://www.sphinx-doc.org/en/stable/rest.html">reStructuredText</a> for that. Markup languages allow you to format text by making use of certain syntax elements. Your document structure will also have to follow specific conventions. Feel free to take a look at <a class="reference external" href="..">existing documents</a> to get a better idea how we use reStructuredText to write our documents.</p>
<p>So how do you actually start making contributions?</p>
</div>
<div class="section" id="github-based-work-flow">
<h2>GitHub based work flow<a class="headerlink" href="#github-based-work-flow" title="Permalink to this headline"></a></h2>
<p><em>Recommended for shorter documents and minor changes on existing content (e.g. fixing typos or updating descriptions)</em></p>
<p>Follow these steps to contribute using GitHub. It’s assumed that you’re logged in with an existing account.</p>
<ol class="arabic simple">
<li><p>Fork the GitHub mirror of the <a class="reference external" href="https://github.com/apache/cassandra">Cassandra repository</a></p></li>
</ol>
<img alt="../_images/docs_fork.png" src="../_images/docs_fork.png" />
<ol class="arabic simple" start="2">
<li><p>Create a new branch that you can use to make your edits. It’s recommended to have a separate branch for each of your working projects. It will also make it easier to create a pull request later to when you decide you’re ready to contribute your work.</p></li>
</ol>
<img alt="../_images/docs_create_branch.png" src="../_images/docs_create_branch.png" />
<ol class="arabic simple" start="3">
<li><p>Navigate to document sources <code class="docutils literal notranslate"><span class="pre">doc/source</span></code> to find the <code class="docutils literal notranslate"><span class="pre">.rst</span></code> file to edit. The URL of the document should correspond to the directory structure. New files can be created using the “Create new file” button:</p></li>
</ol>
<img alt="../_images/docs_create_file.png" src="../_images/docs_create_file.png" />
<ol class="arabic simple" start="4">
<li><p>At this point you should be able to edit the file using the GitHub web editor. Start by naming your file and add some content. Have a look at other existing <code class="docutils literal notranslate"><span class="pre">.rst</span></code> files to get a better idea what format elements to use.</p></li>
</ol>
<img alt="../_images/docs_editor.png" src="../_images/docs_editor.png" />
<p>Make sure to preview added content before committing any changes.</p>
<img alt="../_images/docs_preview.png" src="../_images/docs_preview.png" />
<ol class="arabic simple" start="5">
<li><p>Commit your work when you’re done. Make sure to add a short description of all your edits since the last time you committed before.</p></li>
</ol>
<img alt="../_images/docs_commit.png" src="../_images/docs_commit.png" />
<ol class="arabic simple" start="6">
<li><p>Finally if you decide that you’re done working on your branch, it’s time to create a pull request!</p></li>
</ol>
<img alt="../_images/docs_pr.png" src="../_images/docs_pr.png" />
<p>Afterwards the GitHub Cassandra mirror will list your pull request and you’re done. Congratulations! Please give us some time to look at your suggested changes before we get back to you.</p>
</div>
<div class="section" id="jira-based-work-flow">
<h2>Jira based work flow<a class="headerlink" href="#jira-based-work-flow" title="Permalink to this headline"></a></h2>
<p><em>Recommended for major changes</em></p>
<p>Significant changes to the documentation are best managed through our Jira issue tracker. Please follow the same <a class="reference external" href="https://cassandra.apache.org/doc/latest/development/patches.html">contribution guides</a> as for regular code contributions. Creating high quality content takes a lot of effort. It’s therefor always a good idea to create a ticket before you start and explain what you’re planing to do. This will create the opportunity for other contributors and committers to comment on your ideas and work so far. Eventually your patch gets a formal review before it is committed.</p>
</div>
<div class="section" id="working-on-documents-locally-using-sphinx">
<h2>Working on documents locally using Sphinx<a class="headerlink" href="#working-on-documents-locally-using-sphinx" title="Permalink to this headline"></a></h2>
<p><em>Recommended for advanced editing</em></p>
<p>Using the GitHub web interface should allow you to use most common layout elements including images. More advanced formatting options and navigation elements depend on Sphinx to render correctly. Therefor it’s a good idea to setup Sphinx locally for any serious editing. Please follow the instructions in the Cassandra source directory at <code class="docutils literal notranslate"><span class="pre">doc/README.md</span></code>. Setup is very easy (at least on OSX and Linux).</p>
</div>
<div class="section" id="notes-for-committers">
<h2>Notes for committers<a class="headerlink" href="#notes-for-committers" title="Permalink to this headline"></a></h2>
<p>Please feel free to get involved and merge pull requests created on the GitHub mirror if you’re a committer. As this is a read-only repository, you won’t be able to merge a PR directly on GitHub. You’ll have to commit the changes against the Apache repository with a comment that will close the PR when the committ syncs with GitHub.</p>
<p>You may use a git work flow like this:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">remote</span> <span class="n">add</span> <span class="n">github</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">apache</span><span class="o">/</span><span class="n">cassandra</span><span class="o">.</span><span class="n">git</span>
<span class="n">git</span> <span class="n">fetch</span> <span class="n">github</span> <span class="n">pull</span><span class="o">/&lt;</span><span class="n">PR</span><span class="o">-</span><span class="n">ID</span><span class="o">&gt;/</span><span class="n">head</span><span class="p">:</span><span class="o">&lt;</span><span class="n">PR</span><span class="o">-</span><span class="n">ID</span><span class="o">&gt;</span>
<span class="n">git</span> <span class="n">checkout</span> <span class="o">&lt;</span><span class="n">PR</span><span class="o">-</span><span class="n">ID</span><span class="o">&gt;</span>
</pre></div>
</div>
<p>Now either rebase or squash the commit, e.g. for squashing:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">reset</span> <span class="o">--</span><span class="n">soft</span> <span class="n">origin</span><span class="o">/</span><span class="n">trunk</span>
<span class="n">git</span> <span class="n">commit</span> <span class="o">--</span><span class="n">author</span> <span class="o">&lt;</span><span class="n">PR</span> <span class="n">Author</span><span class="o">&gt;</span>
</pre></div>
</div>
<p>Make sure to add a proper commit message including a “Closes #&lt;PR-ID&gt;” text to automatically close the PR.</p>
<div class="section" id="publishing">
<h3>Publishing<a class="headerlink" href="#publishing" title="Permalink to this headline"></a></h3>
<p>Details for building and publishing of the site at cassandra.apache.org can be found <a class="reference external" href="https://github.com/apache/cassandra-website/blob/trunk/README.md">here</a>.</p>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="ci.html" class="btn btn-neutral float-right" title="Jenkins CI Environment" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="how_to_commit.html" class="btn btn-neutral float-left" title="How-to Commit" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2020, The Apache Cassandra team
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/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">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>