Files
mkdocs-quickstart/tutorial/installation/index.html

232 lines
9.2 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 http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://michaelcurrin.github.io/mkdocs-quickstart/tutorial/installation/">
<link rel="shortcut icon" href="../../img/favicon.ico">
<title>Installation - MkDocs Quickstart</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700" />
<link rel="stylesheet" href="../../css/theme.css" />
<link rel="stylesheet" href="../../css/theme_extra.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css" />
<script>
// Current page data
var mkdocs_page_name = "Installation";
var mkdocs_page_input_path = "tutorial/installation.md";
var mkdocs_page_url = "/mkdocs-quickstart/tutorial/installation/";
</script>
<script src="../../js/jquery-2.1.1.min.js" defer></script>
<script src="../../js/modernizr-2.8.3.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</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 stickynav">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="../.." class="icon icon-home"> MkDocs Quickstart</a>
<div role="search">
<form id ="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" title="Type search term here" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../..">Home</a>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../about-mkdocs/">About MkDocs</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Tutorial</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../tldr/">TL;DR</a>
</li>
<li class="toctree-l1 current"><a class="reference internal current" href="./">Installation</a>
<ul class="current">
<li class="toctree-l2"><a class="reference internal" href="#requirements">Requirements</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#install-system-dependencies">Install system dependencies</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#set-up-a-new-repo">Set up a new repo</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#install-project-dependencies">Install project dependencies</a>
<ul>
<li class="toctree-l3"><a class="reference internal" href="#install-in-a-virtual-environment">Install in a virtual environment</a>
</li>
<li class="toctree-l3"><a class="reference internal" href="#install-globally">Install globally</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../setup-project/">Set up project</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../advanced/">Advanced</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../usage/">Usage</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../deploy/">Deploy</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="../..">MkDocs Quickstart</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="../..">Docs</a> &raquo;</li>
<li>Tutorial &raquo;</li>
<li>Installation</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/MichaelCurrin/mkdocs-quickstart/edit/master/docs/docs/tutorial/installation.md"
class="icon icon-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main">
<div class="section">
<h1 id="installation">Installation</h1>
<blockquote>
<p>How to install MkDocs locally.</p>
</blockquote>
<h2 id="requirements">Requirements</h2>
<ul>
<li><a href="https://www.python.org/">Python 3</a></li>
<li><a href="https://www.gnu.org/software/make/">Make</a> - standard on macOS and Linux but can be installed on Windows too.</li>
</ul>
<h2 id="install-system-dependencies">Install system dependencies</h2>
<script src="https://gist.github.com/MichaelCurrin/57caae30bd7b0991098e9804a9494c23.js"></script>
<h2 id="set-up-a-new-repo">Set up a new repo</h2>
<p>Follow the Tutorial page to set up a project from scratch.</p>
<p>Or click this create your own copy of the repo.</p>
<p><a href="https://github.com/MichaelCurrin/mkdocs-quickstart/generate"><img alt="Use this template" src="https://img.shields.io/badge/Use_this_template-2ea44f?style=for-the-badge&amp;logo=github" /></a></p>
<p>Then clone your repo.</p>
<p>e.g.</p>
<pre><code class="language-sh">$ git clone git@github.com:MichaelCurrin/mkdocs-quickstart.git
$ cd mkdocs-quickstart
</code></pre>
<h2 id="install-project-dependencies">Install project dependencies</h2>
<blockquote>
<p>Install MkDocs locally</p>
</blockquote>
<p>For more info, see the <a href="https://www.mkdocs.org/#installation">Installation</a> page on the MkDocs site.</p>
<h3 id="install-in-a-virtual-environment">Install in a virtual environment</h3>
<p>Create a virtual environment at the project root - this is used to isolate project packages from the global packages.</p>
<pre><code class="language-sh">$ python3 -m venv venv
</code></pre>
<p>Activate the environment.</p>
<pre><code class="language-sh">$ source venv/bin/activate
</code></pre>
<p>Install <code>mkdocs</code> - this is covered in the project requirements file.</p>
<pre><code class="language-sh">$ cd docs
$ make install
</code></pre>
<p>Note - <code>mkdocs</code> 1.2 causes a break on force pushes, so this is excluded in the requirements. See issue <a href="https://github.com/mkdocs/mkdocs/issues/2447">#2447</a>.</p>
<h3 id="install-globally">Install globally</h3>
<p>If you prefer to install MkDocs once and reuse it across projects, then you can install it globally instead.</p>
<p>MkDocs is available using package managers like <code>apt-get</code>, <code>homebrew</code> and <code>yum</code>.</p>
<p>Or you can install like this:</p>
<pre><code class="language-sh">$ python3 -m pip install mkdocs
</code></pre>
<p>If you get prompted for <code>sudo</code> use, then cancel and run again with <code>-U</code> flag for user-level install.</p>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../setup-project/" class="btn btn-neutral float-right" title="Set up project">Next <span class="icon icon-circle-arrow-right"></span></a>
<a href="../tldr/" class="btn btn-neutral" title="TL;DR"><span class="icon icon-circle-arrow-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<!-- Copyright etc -->
</div>
Built with <a href="https://www.mkdocs.org/">MkDocs</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>
<div class="rst-versions" role="note" aria-label="versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span>
<a href="https://github.com/MichaelCurrin/mkdocs-quickstart/" class="fa fa-github" style="color: #fcfcfc"> GitHub</a>
</span>
<span><a href="../tldr/" style="color: #fcfcfc">&laquo; Previous</a></span>
<span><a href="../setup-project/" style="color: #fcfcfc">Next &raquo;</a></span>
</span>
</div>
<script>var base_url = '../..';</script>
<script src="../../js/theme_extra.js" defer></script>
<script src="../../js/theme.js" defer></script>
<script src="../../search/main.js" defer></script>
<script defer>
window.onload = function () {
SphinxRtdTheme.Navigation.enable(true);
};
</script>
</body>
</html>