{ "docs": [ { "id": "/", "text": "MkDocs\n\uf0c1\n\n\nProject documentation with\u00a0Markdown.\n\n\n\n\nOverview\n\uf0c1\n\n\nMkDocs is a \nfast\n, \nsimple\n and \ndownright gorgeous\n static site\ngenerator that's geared towards building project documentation. Documentation\nsource files are written in Markdown, and configured with a single YAML\nconfiguration file.\n\n\nHost anywhere\n\uf0c1\n\n\nMkDocs builds completely static HTML sites that you can host on GitHub pages,\nAmazon S3, or \nanywhere\n else you choose.\n\n\nGreat themes available\n\uf0c1\n\n\nThere's a stack of good looking themes available for MkDocs. Choose between\nthe built in themes: \nmkdocs\n and \nreadthedocs\n, select one of the 3rd\nparty themes in the \nMkDocs wiki\n, or \nbuild your own\n.\n\n\nPreview your site as you work\n\uf0c1\n\n\nThe built-in dev-server allows you to preview your documentation as you're\nwriting it. It will even auto-reload and refresh your browser whenever you save\nyour changes.\n\n\nEasy to customize\n\uf0c1\n\n\nGet your project documentation looking just the way you want it by customizing\nthe theme.\n\n\n\n\nInstallation\n\uf0c1\n\n\nInstall with a Package Manager\n\uf0c1\n\n\nIf you have and use a package manager (such as \napt-get\n, \ndnf\n, \nhomebrew\n,\n\nyum\n, \nchocolatey\n, etc.) to install packages on your system, then you may\nwant to search for a \"MkDocs\" package and, if a recent version is available,\ninstall it with your package manager (check your system's documentation for\ndetails). That's it, you're done! Skip down to \nGetting Started\n.\n\n\nIf your package manager does not have a recent \"MkDocs\" package, you can still\nuse your package manager to install \"Python\" and \"pip\". Then you can use pip to\n\ninstall MkDocs\n.\n\n\nManual Installation\n\uf0c1\n\n\nIn order to manually install MkDocs you'll need \nPython\n installed on your\nsystem, as well as the Python package manager, \npip\n. You can check if you have\nthese already installed from the command line:\n\n\n$ python --version\nPython 2.7.2\n$ pip --version\npip 1.5.2\n\n\n\n\nMkDocs supports Python versions 2.7, 3.3, 3.4, 3.5 and pypy.\n\n\nInstalling Python\n\uf0c1\n\n\nInstall \nPython\n by downloading an installer appropriate for your system from\n\npython.org\n and running it.\n\n\n\n\nNote\n\n\nIf you are installing Python on Windows, be sure to check the box to have\nPython added to your PATH if the installer offers such an option (it's\nnormally off by default).\n\n\n\n\n\n\nInstalling pip\n\uf0c1\n\n\nIf you're using a recent version of Python, the Python package manager, \npip\n,\nis most likely installed by default. However, you may need to upgrade pip to the\nlasted version:\n\n\npip install --upgrade pip\n\n\n\n\nIf you need to install \npip\n for the first time, download \nget-pip.py\n.\nThen run the following command to install it:\n\n\npython get-pip.py\n\n\n\n\nInstalling MkDocs\n\uf0c1\n\n\nInstall the \nmkdocs\n package using pip:\n\n\npip install mkdocs\n\n\n\n\nYou should now have the \nmkdocs\n command installed on your system. Run \nmkdocs\n--version\n to check that everything worked okay.\n\n\n$ mkdocs --version\nmkdocs, version 0.15.3\n\n\n\n\n\n\nNote\n\n\nIf you would like manpages installed for MkDocs, the \nclick-man\n tool can\ngenerate and install them for you. Simply run the following two commands:\n\n\npip install click-man\nclick-man --target path/to/man/pages mkdocs\n\n\n\nSee the \nclick-man documentation\n for an explaination of why manpages are\nnot automaticaly generated and installed by pip.\n\n\n\n\n\n\nNote\n\n\nIf you are using Windows, some of the above commands may not work\nout-of-the-box.\n\n\nA quick solution may be to preface every Python command with \npython -m\n\nlike this:\n\n\npython -m pip install mkdocs\npython -m mkdocs\n\n\n\nFor a more permanent solution, you may need to edit your \nPATH\n environment\nvariable to include the \nScripts\n directory of your Python installation.\nRecent versions of Python include a script to do this for you. Navigate to\nyour Python installation directory (for example \nC:\\Python34\\\n), open the\n\nTools\n, then \nScripts\n folder, and run the \nwin_add2path.py\n file by double\nclicking on it. Alternatively, you can \ndownload\n the script and run it\n(\npython win_add2path.py\n).\n\n\n\n\n\n\nGetting Started\n\uf0c1\n\n\nGetting started is super easy.\n\n\nmkdocs new my-project\ncd my-project\n\n\n\n\nTake a moment to review the initial project that has been created for you.\n\n\n\n\nThere's a single configuration file named \nmkdocs.yml\n, and a folder named\n\ndocs\n that will contain your documentation source files. Right now the \ndocs\n\nfolder just contains a single documentation page, named \nindex.md\n.\n\n\nMkDocs comes with a built-in dev-server that lets you preview your documentation\nas you work on it. Make sure you're in the same directory as the \nmkdocs.yml\n\nconfiguration file, and then start the server by running the \nmkdocs serve\n\ncommand:\n\n\n$ mkdocs serve\nINFO - Building documentation...\nINFO - Cleaning site directory\n[I 160402 15:50:43 server:271] Serving on http://127.0.0.1:8000\n[I 160402 15:50:43 handlers:58] Start watching changes\n[I 160402 15:50:43 handlers:60] Start detecting changes\n\n\n\n\nOpen up \nhttp://127.0.0.1:8000/\n in your browser, and you'll see the default\nhome page being displayed:\n\n\n\n\nThe dev-server also supports auto-reloading, and will rebuild your documentation\nwhenever anything in the configuration file, documentation directory, or theme\ndirectory changes.\n\n\nOpen the \ndocs/index.md\n document in your text editor of choice, change the\ninitial heading to \nMkLorum\n, and save your changes. Your browser will\nauto-reload and you should see your updated documentation immediately.\n\n\nNow try editing the configuration file: \nmkdocs.yml\n. Change the\n\nsite_name\n setting to \nMkLorum\n and save the file.\n\n\nsite_name: MkLorum\n\n\n\n\nYour browser should immediately reload, and you'll see your new site name take\neffect.\n\n\n\n\nAdding pages\n\uf0c1\n\n\nNow add a second page to your documentation:\n\n\ncurl 'https://jaspervdj.be/lorem-markdownum/markdown.txt' > docs/about.md\n\n\n\n\nAs our documentation site will include some navigation headers, you may want to\nedit the configuration file and add some information about the order, title, and\nnesting of each page in the navigation header by adding a \npages\n\nsetting:\n\n\nsite_name: MkLorum\npages:\n - Home: index.md\n - About: about.md\n\n\n\n\nSave your changes and you'll now see a navigation bar with \nHome\n and \nAbout\n\nitems on the left as well as \nSearch\n, \nPrevious\n, and \nNext\n items on the\nright.\n\n\n\n\nTry the menu items and navigate back and forth between pages. Then click on\n\nSearch\n. A search dialog will appear, allowing you to search for any text on\nany page. Notice that the search results include every occurrence of the search\nterm on the site and links directly to the section of the page in which the\nsearch term appears. You get of all that with no effort or configuration on your\npart!\n\n\n\n\nTheming our documentation\n\uf0c1\n\n\nNow change the configuration file to alter how the documentation is displayed by\nchanging the theme. Edit the \nmkdocs.yml\n file and add a \ntheme\n setting:\n\n\nsite_name: MkLorum\npages:\n - Home: index.md\n - About: about.md\ntheme: readthedocs\n\n\n\n\nSave your changes, and you'll see the ReadTheDocs theme being used.\n\n\n\n\nChanging the Favicon Icon\n\uf0c1\n\n\nBy default, MkDocs uses the \nMkDocs favicon\n icon. To use a different icon, create\nan \nimg\n subdirectory in your \ndocs_dir\n and copy your custom \nfavicon.ico\n file\nto that directory. MkDocs will automatically detect and use that file as your\nfavicon icon.\n\n\nBuilding the site\n\uf0c1\n\n\nThat's looking good. You're ready to deploy the first pass of your \nMkLorum\n\ndocumentation. First build the documentation:\n\n\nmkdocs build\n\n\n\n\nThis will create a new directory, named \nsite\n. Take a look inside the\ndirectory:\n\n\n$ ls site\nabout fonts index.html license search.html\ncss img js mkdocs sitemap.xml\n\n\n\n\nNotice that your source documentation has been output as two HTML files named\n\nindex.html\n and \nabout/index.html\n. You also have various other media that's\nbeen copied into the \nsite\n directory as part of the documentation theme. You\neven have a \nsitemap.xml\n file and \nmkdocs/search_index.json\n.\n\n\nIf you're using source code control such as \ngit\n you probably don't want to\ncheck your documentation builds into the repository. Add a line containing\n\nsite/\n to your \n.gitignore\n file.\n\n\necho \"site/\" >> .gitignore\n\n\n\n\nIf you're using another source code control tool you'll want to check its\ndocumentation on how to ignore specific directories.\n\n\nAfter some time, files may be removed from the documentation but they will still\nreside in the \nsite\n directory. To remove those stale files, just run \nmkdocs\n\nwith the \n--clean\n switch.\n\n\nmkdocs build --clean\n\n\n\n\nOther Commands and Options\n\uf0c1\n\n\nThere are various other commands and options available. For a complete list of\ncommands, use the \n--help\n flag:\n\n\nmkdocs --help\n\n\n\n\nTo view a list of options available on a given command, use the \n--help\n flag\nwith that command. For example, to get a list of all options available for the\n\nbuild\n command run the following:\n\n\nmkdocs build --help\n\n\n\n\nDeploying\n\uf0c1\n\n\nThe documentation site that you just built only uses static files so you'll be\nable to host it from pretty much anywhere. \nGitHub project pages\n and \nAmazon\nS3\n may be good hosting options, depending upon your needs. Upload the contents\nof the entire \nsite\n directory to wherever you're hosting your website from and\nyou're done. For specific instructions on a number of common hosts, see the\n\nDeploying your Docs\n page.\n\n\nGetting help\n\uf0c1\n\n\nTo get help with MkDocs, please use the \ndiscussion group\n, \nGitHub issues\n or\nthe MkDocs IRC channel \n#mkdocs\n on freenode.", "title": "Home" }, { "id": "/#mkdocs", "text": "Project documentation with\u00a0Markdown.", "title": "MkDocs" }, { "id": "/#overview", "text": "MkDocs is a fast , simple and downright gorgeous static site\ngenerator that's geared towards building project documentation. Documentation\nsource files are written in Markdown, and configured with a single YAML\nconfiguration file.", "title": "Overview" }, { "id": "/#host-anywhere", "text": "MkDocs builds completely static HTML sites that you can host on GitHub pages,\nAmazon S3, or anywhere else you choose.", "title": "Host anywhere" }, { "id": "/#great-themes-available", "text": "There's a stack of good looking themes available for MkDocs. Choose between\nthe built in themes: mkdocs and readthedocs , select one of the 3rd\nparty themes in the MkDocs wiki , or build your own .", "title": "Great themes available" }, { "id": "/#preview-your-site-as-you-work", "text": "The built-in dev-server allows you to preview your documentation as you're\nwriting it. It will even auto-reload and refresh your browser whenever you save\nyour changes.", "title": "Preview your site as you work" }, { "id": "/#easy-to-customize", "text": "Get your project documentation looking just the way you want it by customizing\nthe theme.", "title": "Easy to customize" }, { "id": "/#installation", "text": "", "title": "Installation" }, { "id": "/#install-with-a-package-manager", "text": "If you have and use a package manager (such as apt-get , dnf , homebrew , yum , chocolatey , etc.) to install packages on your system, then you may\nwant to search for a \"MkDocs\" package and, if a recent version is available,\ninstall it with your package manager (check your system's documentation for\ndetails). That's it, you're done! Skip down to Getting Started . If your package manager does not have a recent \"MkDocs\" package, you can still\nuse your package manager to install \"Python\" and \"pip\". Then you can use pip to install MkDocs .", "title": "Install with a Package Manager" }, { "id": "/#manual-installation", "text": "In order to manually install MkDocs you'll need Python installed on your\nsystem, as well as the Python package manager, pip . You can check if you have\nthese already installed from the command line: $ python --version\nPython 2.7.2\n$ pip --version\npip 1.5.2 MkDocs supports Python versions 2.7, 3.3, 3.4, 3.5 and pypy.", "title": "Manual Installation" }, { "id": "/#installing-python", "text": "Install Python by downloading an installer appropriate for your system from python.org and running it. Note If you are installing Python on Windows, be sure to check the box to have\nPython added to your PATH if the installer offers such an option (it's\nnormally off by default).", "title": "Installing Python" }, { "id": "/#installing-pip", "text": "If you're using a recent version of Python, the Python package manager, pip ,\nis most likely installed by default. However, you may need to upgrade pip to the\nlasted version: pip install --upgrade pip If you need to install pip for the first time, download get-pip.py .\nThen run the following command to install it: python get-pip.py", "title": "Installing pip" }, { "id": "/#installing-mkdocs", "text": "Install the mkdocs package using pip: pip install mkdocs You should now have the mkdocs command installed on your system. Run mkdocs\n--version to check that everything worked okay. $ mkdocs --version\nmkdocs, version 0.15.3 Note If you would like manpages installed for MkDocs, the click-man tool can\ngenerate and install them for you. Simply run the following two commands: pip install click-man\nclick-man --target path/to/man/pages mkdocs See the click-man documentation for an explaination of why manpages are\nnot automaticaly generated and installed by pip. Note If you are using Windows, some of the above commands may not work\nout-of-the-box. A quick solution may be to preface every Python command with python -m \nlike this: python -m pip install mkdocs\npython -m mkdocs For a more permanent solution, you may need to edit your PATH environment\nvariable to include the Scripts directory of your Python installation.\nRecent versions of Python include a script to do this for you. Navigate to\nyour Python installation directory (for example C:\\Python34\\ ), open the Tools , then Scripts folder, and run the win_add2path.py file by double\nclicking on it. Alternatively, you can download the script and run it\n( python win_add2path.py ).", "title": "Installing MkDocs" }, { "id": "/#getting-started", "text": "Getting started is super easy. mkdocs new my-project\ncd my-project Take a moment to review the initial project that has been created for you. There's a single configuration file named mkdocs.yml , and a folder named docs that will contain your documentation source files. Right now the docs \nfolder just contains a single documentation page, named index.md . MkDocs comes with a built-in dev-server that lets you preview your documentation\nas you work on it. Make sure you're in the same directory as the mkdocs.yml \nconfiguration file, and then start the server by running the mkdocs serve \ncommand: $ mkdocs serve\nINFO - Building documentation...\nINFO - Cleaning site directory\n[I 160402 15:50:43 server:271] Serving on http://127.0.0.1:8000\n[I 160402 15:50:43 handlers:58] Start watching changes\n[I 160402 15:50:43 handlers:60] Start detecting changes Open up http://127.0.0.1:8000/ in your browser, and you'll see the default\nhome page being displayed: The dev-server also supports auto-reloading, and will rebuild your documentation\nwhenever anything in the configuration file, documentation directory, or theme\ndirectory changes. Open the docs/index.md document in your text editor of choice, change the\ninitial heading to MkLorum , and save your changes. Your browser will\nauto-reload and you should see your updated documentation immediately. Now try editing the configuration file: mkdocs.yml . Change the site_name setting to MkLorum and save the file. site_name: MkLorum Your browser should immediately reload, and you'll see your new site name take\neffect.", "title": "Getting Started" }, { "id": "/#adding-pages", "text": "Now add a second page to your documentation: curl 'https://jaspervdj.be/lorem-markdownum/markdown.txt' > docs/about.md As our documentation site will include some navigation headers, you may want to\nedit the configuration file and add some information about the order, title, and\nnesting of each page in the navigation header by adding a pages \nsetting: site_name: MkLorum\npages:\n - Home: index.md\n - About: about.md Save your changes and you'll now see a navigation bar with Home and About \nitems on the left as well as Search , Previous , and Next items on the\nright. Try the menu items and navigate back and forth between pages. Then click on Search . A search dialog will appear, allowing you to search for any text on\nany page. Notice that the search results include every occurrence of the search\nterm on the site and links directly to the section of the page in which the\nsearch term appears. You get of all that with no effort or configuration on your\npart!", "title": "Adding pages" }, { "id": "/#theming-our-documentation", "text": "Now change the configuration file to alter how the documentation is displayed by\nchanging the theme. Edit the mkdocs.yml file and add a theme setting: site_name: MkLorum\npages:\n - Home: index.md\n - About: about.md\ntheme: readthedocs Save your changes, and you'll see the ReadTheDocs theme being used.", "title": "Theming our documentation" }, { "id": "/#changing-the-favicon-icon", "text": "By default, MkDocs uses the MkDocs favicon icon. To use a different icon, create\nan img subdirectory in your docs_dir and copy your custom favicon.ico file\nto that directory. MkDocs will automatically detect and use that file as your\nfavicon icon.", "title": "Changing the Favicon Icon" }, { "id": "/#building-the-site", "text": "That's looking good. You're ready to deploy the first pass of your MkLorum \ndocumentation. First build the documentation: mkdocs build This will create a new directory, named site . Take a look inside the\ndirectory: $ ls site\nabout fonts index.html license search.html\ncss img js mkdocs sitemap.xml Notice that your source documentation has been output as two HTML files named index.html and about/index.html . You also have various other media that's\nbeen copied into the site directory as part of the documentation theme. You\neven have a sitemap.xml file and mkdocs/search_index.json . If you're using source code control such as git you probably don't want to\ncheck your documentation builds into the repository. Add a line containing site/ to your .gitignore file. echo \"site/\" >> .gitignore If you're using another source code control tool you'll want to check its\ndocumentation on how to ignore specific directories. After some time, files may be removed from the documentation but they will still\nreside in the site directory. To remove those stale files, just run mkdocs \nwith the --clean switch. mkdocs build --clean", "title": "Building the site" }, { "id": "/#other-commands-and-options", "text": "There are various other commands and options available. For a complete list of\ncommands, use the --help flag: mkdocs --help To view a list of options available on a given command, use the --help flag\nwith that command. For example, to get a list of all options available for the build command run the following: mkdocs build --help", "title": "Other Commands and Options" }, { "id": "/#deploying", "text": "The documentation site that you just built only uses static files so you'll be\nable to host it from pretty much anywhere. GitHub project pages and Amazon\nS3 may be good hosting options, depending upon your needs. Upload the contents\nof the entire site directory to wherever you're hosting your website from and\nyou're done. For specific instructions on a number of common hosts, see the Deploying your Docs page.", "title": "Deploying" }, { "id": "/#getting-help", "text": "To get help with MkDocs, please use the discussion group , GitHub issues or\nthe MkDocs IRC channel #mkdocs on freenode.", "title": "Getting help" }, { "id": "/user-guide/writing-your-docs/", "text": "Writing your docs\n\uf0c1\n\n\nHow to write and layout your markdown source files.\n\n\n\n\nConfigure Pages and Navigation\n\uf0c1\n\n\nThe \npages configuration\n in your\n\nmkdocs.yml\n defines which pages are built by MkDocs and how they appear in the\ndocumentation navigation. If not provided, the pages configuration will be\nautomatically created by discovering all the Markdown files in the\n\ndocumentation directory\n. An\nautomatically created pages configuration will always be sorted\nalphanumerically by file name. You will need to manually define your pages\nconfiguration if you would like your pages sorted differently.\n\n\nA simple pages configuration looks like this:\n\n\npages:\n- 'index.md'\n- 'about.md'\n\n\n\n\nWith this example we will build two pages at the top level and they will\nautomatically have their titles inferred from the filename. Assuming \ndocs_dir\n\nhas the default value, \ndocs\n, the source files for this documentation would be\n\ndocs/index.md\n and \ndocs/about.md\n. To provide a custom name for these pages,\nthey can be added before the filename.\n\n\npages:\n- Home: 'index.md'\n- About: 'about.md'\n\n\n\n\nMultilevel documentation\n\uf0c1\n\n\nSubsections can be created by listing related pages together under a section\ntitle. For example:\n\n\npages:\n- Home: 'index.md'\n- User Guide:\n - 'Writing your docs': 'user-guide/writing-your-docs.md'\n - 'Styling your docs': 'user-guide/styling-your-docs.md'\n- About:\n - 'License': 'about/license.md'\n - 'Release Notes': 'about/release-notes.md'\n\n\n\n\nWith the above configuration we have three top level sections: Home, User Guide\nand About. Then under User Guide we have two pages, Writing your docs and\nStyling your docs. Under the About section we also have two pages, License and\nRelease Notes.\n\n\nFile layout\n\uf0c1\n\n\nYour documentation source should be written as regular Markdown files, and\nplaced in a directory somewhere in your project. Normally this directory will be\nnamed \ndocs\n and will exist at the top level of your project, alongside the\n\nmkdocs.yml\n configuration file.\n\n\nThe simplest project you can create will look something like this:\n\n\nmkdocs.yml\ndocs/\n index.md\n\n\n\n\nBy convention your project homepage should always be named \nindex\n. Any of the\nfollowing extensions may be used for your Markdown source files: \nmarkdown\n,\n\nmdown\n, \nmkdn\n, \nmkd\n, \nmd\n.\n\n\nYou can also create multi-page documentation, by creating several markdown\nfiles:\n\n\nmkdocs.yml\ndocs/\n index.md\n about.md\n license.md\n\n\n\n\nThe file layout you use determines the URLs that are used for the generated\npages. Given the above layout, pages would be generated for the following URLs:\n\n\n/\n/about/\n/license/\n\n\n\n\nYou can also include your Markdown files in nested directories if that better\nsuits your documentation layout.\n\n\ndocs/\n index.md\n user-guide/getting-started.md\n user-guide/configuration-options.md\n license.md\n\n\n\n\nSource files inside nested directories will cause pages to be generated with\nnested URLs, like so:\n\n\n/\n/user-guide/getting-started/\n/user-guide/configuration-options/\n/license/\n\n\n\n\nLinking documents\n\uf0c1\n\n\nMkDocs allows you to interlink your documentation by using regular Markdown\nhyperlinks.\n\n\nInternal hyperlinks\n\uf0c1\n\n\nWhen linking between pages in the documentation you can simply use the regular\nMarkdown hyperlinking syntax, including the relative path to the Markdown\ndocument you wish to link to.\n\n\nPlease see the [project license](license.md) for further details.\n\n\n\nWhen the MkDocs build runs, these hyperlinks will automatically be transformed\ninto a hyperlink to the appropriate HTML page.\n\n\nWhen working on your documentation you should be able to open the linked\nMarkdown document in a new editor window simply by clicking on the link.\n\n\nIf the target documentation file is in another directory you'll need to make\nsure to include any relative directory path in the hyperlink.\n\n\nPlease see the [project license](../about/license.md) for further details.\n\n\n\nYou can also link to a section within a target documentation page by using an\nanchor link. The generated HTML will correctly transform the path portion of the\nhyperlink, and leave the anchor portion intact.\n\n\nPlease see the [project license](about.md#license) for further details.\n\n\n\nImages and media\n\uf0c1\n\n\nAs well as the Markdown source files, you can also include other file types in\nyour documentation, which will be copied across when generating your\ndocumentation site. These might include images and other media.\n\n\nFor example, if your project documentation needed to include a \nGitHub pages\nCNAME\nfile\n\nand a PNG formatted screenshot image then your file layout might look as\nfollows:\n\n\nmkdocs.yml\ndocs/\n CNAME\n index.md\n about.md\n license.md\n img/\n screenshot.png\n\n\n\n\nTo include images in your documentation source files, simply use any of the\nregular Markdown image syntaxes:\n\n\nCupcake indexer is a snazzy new project for indexing small cakes.\n\n\n\n*Above: Cupcake indexer in progress*\n\n\n\n\nYou image will now be embedded when you build the documentation, and should also\nbe previewed if you're working on the documentation with a Markdown editor.\n\n\nMarkdown extensions\n\uf0c1\n\n\nMkDocs supports the following Markdown extensions.\n\n\nTables\n\uf0c1\n\n\nA simple table looks like this:\n\n\nFirst Header | Second Header | Third Header\n------------ | ------------- | ------------\nContent Cell | Content Cell | Content Cell\nContent Cell | Content Cell | Content Cell\n\n\n\n\nIf you wish, you can add a leading and tailing pipe to each line of the table:\n\n\n| First Header | Second Header | Third Header |\n| ------------ | ------------- | ------------ |\n| Content Cell | Content Cell | Content Cell |\n| Content Cell | Content Cell | Content Cell |\n\n\n\n\nSpecify alignment for each column by adding colons to separator lines:\n\n\nFirst Header | Second Header | Third Header\n:----------- |:-------------:| -----------:\nLeft | Center | Right\nLeft | Center | Right\n\n\n\n\nFenced code blocks\n\uf0c1\n\n\nThe first line should contain 3 or more backtick (\n`\n) characters, and the\nlast line should contain the same number of backtick characters (\n`\n):\n\n\n```\nFenced code blocks are like Standard\nMarkdown\u2019s regular code blocks, except that\nthey\u2019re not indented and instead rely on\nstart and end fence lines to delimit the\ncode block.\n```\n\n\n\n\nWith this approach, the language can optionally be specified on the first line\nafter the backticks:\n\n\n```python\ndef fn():\n pass\n```", "title": "Writing Your Docs" }, { "id": "/user-guide/writing-your-docs/#writing-your-docs", "text": "How to write and layout your markdown source files.", "title": "Writing your docs" }, { "id": "/user-guide/writing-your-docs/#configure-pages-and-navigation", "text": "The pages configuration in your mkdocs.yml defines which pages are built by MkDocs and how they appear in the\ndocumentation navigation. If not provided, the pages configuration will be\nautomatically created by discovering all the Markdown files in the documentation directory . An\nautomatically created pages configuration will always be sorted\nalphanumerically by file name. You will need to manually define your pages\nconfiguration if you would like your pages sorted differently. A simple pages configuration looks like this: pages:\n- 'index.md'\n- 'about.md' With this example we will build two pages at the top level and they will\nautomatically have their titles inferred from the filename. Assuming docs_dir \nhas the default value, docs , the source files for this documentation would be docs/index.md and docs/about.md . To provide a custom name for these pages,\nthey can be added before the filename. pages:\n- Home: 'index.md'\n- About: 'about.md'", "title": "Configure Pages and Navigation" }, { "id": "/user-guide/writing-your-docs/#multilevel-documentation", "text": "Subsections can be created by listing related pages together under a section\ntitle. For example: pages:\n- Home: 'index.md'\n- User Guide:\n - 'Writing your docs': 'user-guide/writing-your-docs.md'\n - 'Styling your docs': 'user-guide/styling-your-docs.md'\n- About:\n - 'License': 'about/license.md'\n - 'Release Notes': 'about/release-notes.md' With the above configuration we have three top level sections: Home, User Guide\nand About. Then under User Guide we have two pages, Writing your docs and\nStyling your docs. Under the About section we also have two pages, License and\nRelease Notes.", "title": "Multilevel documentation" }, { "id": "/user-guide/writing-your-docs/#file-layout", "text": "Your documentation source should be written as regular Markdown files, and\nplaced in a directory somewhere in your project. Normally this directory will be\nnamed docs and will exist at the top level of your project, alongside the mkdocs.yml configuration file. The simplest project you can create will look something like this: mkdocs.yml\ndocs/\n index.md By convention your project homepage should always be named index . Any of the\nfollowing extensions may be used for your Markdown source files: markdown , mdown , mkdn , mkd , md . You can also create multi-page documentation, by creating several markdown\nfiles: mkdocs.yml\ndocs/\n index.md\n about.md\n license.md The file layout you use determines the URLs that are used for the generated\npages. Given the above layout, pages would be generated for the following URLs: /\n/about/\n/license/ You can also include your Markdown files in nested directories if that better\nsuits your documentation layout. docs/\n index.md\n user-guide/getting-started.md\n user-guide/configuration-options.md\n license.md Source files inside nested directories will cause pages to be generated with\nnested URLs, like so: /\n/user-guide/getting-started/\n/user-guide/configuration-options/\n/license/", "title": "File layout" }, { "id": "/user-guide/writing-your-docs/#linking-documents", "text": "MkDocs allows you to interlink your documentation by using regular Markdown\nhyperlinks.", "title": "Linking documents" }, { "id": "/user-guide/writing-your-docs/#internal-hyperlinks", "text": "When linking between pages in the documentation you can simply use the regular\nMarkdown hyperlinking syntax, including the relative path to the Markdown\ndocument you wish to link to. Please see the [project license](license.md) for further details. When the MkDocs build runs, these hyperlinks will automatically be transformed\ninto a hyperlink to the appropriate HTML page. When working on your documentation you should be able to open the linked\nMarkdown document in a new editor window simply by clicking on the link. If the target documentation file is in another directory you'll need to make\nsure to include any relative directory path in the hyperlink. Please see the [project license](../about/license.md) for further details. You can also link to a section within a target documentation page by using an\nanchor link. The generated HTML will correctly transform the path portion of the\nhyperlink, and leave the anchor portion intact. Please see the [project license](about.md#license) for further details.", "title": "Internal hyperlinks" }, { "id": "/user-guide/writing-your-docs/#images-and-media", "text": "As well as the Markdown source files, you can also include other file types in\nyour documentation, which will be copied across when generating your\ndocumentation site. These might include images and other media. For example, if your project documentation needed to include a GitHub pages\nCNAME\nfile \nand a PNG formatted screenshot image then your file layout might look as\nfollows: mkdocs.yml\ndocs/\n CNAME\n index.md\n about.md\n license.md\n img/\n screenshot.png To include images in your documentation source files, simply use any of the\nregular Markdown image syntaxes: Cupcake indexer is a snazzy new project for indexing small cakes.\n\n\n\n*Above: Cupcake indexer in progress* You image will now be embedded when you build the documentation, and should also\nbe previewed if you're working on the documentation with a Markdown editor.", "title": "Images and media" }, { "id": "/user-guide/writing-your-docs/#markdown-extensions", "text": "MkDocs supports the following Markdown extensions.", "title": "Markdown extensions" }, { "id": "/user-guide/writing-your-docs/#tables", "text": "A simple table looks like this: First Header | Second Header | Third Header\n------------ | ------------- | ------------\nContent Cell | Content Cell | Content Cell\nContent Cell | Content Cell | Content Cell If you wish, you can add a leading and tailing pipe to each line of the table: | First Header | Second Header | Third Header |\n| ------------ | ------------- | ------------ |\n| Content Cell | Content Cell | Content Cell |\n| Content Cell | Content Cell | Content Cell | Specify alignment for each column by adding colons to separator lines: First Header | Second Header | Third Header\n:----------- |:-------------:| -----------:\nLeft | Center | Right\nLeft | Center | Right", "title": "Tables" }, { "id": "/user-guide/writing-your-docs/#fenced-code-blocks", "text": "The first line should contain 3 or more backtick ( ` ) characters, and the\nlast line should contain the same number of backtick characters ( ` ): ```\nFenced code blocks are like Standard\nMarkdown\u2019s regular code blocks, except that\nthey\u2019re not indented and instead rely on\nstart and end fence lines to delimit the\ncode block.\n``` With this approach, the language can optionally be specified on the first line\nafter the backticks: ```python\ndef fn():\n pass\n```", "title": "Fenced code blocks" }, { "id": "/user-guide/styling-your-docs/", "text": "Styling your docs\n\uf0c1\n\n\nHow to style and theme your documentation.\n\n\n\n\nMkDocs includes a couple \nbuilt-in themes\n as well as various \nthird party\nthemes\n, all of which can easily be customized with \nextra CSS or\nJavaScript\n or overridden from the [theme directory][theme_dir]. You\ncan also create your own \ncustom theme\n from the ground up for your\ndocumentation.\n\n\nTo use a theme that is included in MkDocs, simply add this to your\n\nmkdocs.yml\n config file.\n\n\ntheme: readthedocs\n\n\n\nReplace \nreadthedocs\n with any of the \nbuilt-in themes\n listed below.\n\n\nTo create a new custom theme see the \nCustom Themes\n page, or to\nmore heavily customize an existing theme, see\nthe \nCustomizing a Theme\n section below.\n\n\nBuilt-in themes\n\uf0c1\n\n\nmkdocs\n\uf0c1\n\n\nThe default theme, which was built as a custom \nBootstrap\n theme, supports most\nevery feature of MkDocs. It only supports the default\n\ntheme configuration options\n.\n\n\n\n\nreadthedocs\n\uf0c1\n\n\nA clone of the default theme used by the \nRead the Docs\n service. This theme\nonly supports features in its parent theme and does not support any MkDocs\n\ntheme configuration options\n in addition to the defaults.\n\n\n\n\nThird Party Themes\n\uf0c1\n\n\nA list of third party themes can be found in the MkDocs \ncommunity wiki\n. If you\nhave created your own, please feel free to add it to the list.\n\n\nCustomizing a Theme\n\uf0c1\n\n\nIf you would like to make a few tweaks to an existing theme, there is no need to\ncreate your own theme from scratch. For minor tweaks which only require some CSS\nand/or JavaScript, you can use the \ndocs_dir\n. However, for more complex\ncustomizations, including overriding templates, you will need to use the theme\n\ncustom_dir\n setting.\n\n\nUsing the docs_dir\n\uf0c1\n\n\nThe \nextra_css\n and \nextra_javascript\n configuration options can be used to\nmake tweaks and customizations to existing themes. To use these, you simply\nneed to include either CSS or JavaScript files within your \ndocumentation\ndirectory\n.\n\n\nFor example, to change the colour of the headers in your documentation, create\na file called \nextra.css\n and place it next to the documentation Markdown. In\nthat file add the following CSS.\n\n\nh1 {\n color: red;\n}\n\n\n\n\n\n\nNote\n\n\nIf you are deploying your documentation with \nReadTheDocs\n. You will need\nto explicitly list the CSS and JavaScript files you want to include in\nyour config. To do this, add the following to your mkdocs.yml.\n\n\nextra_css: [extra.css]\n\n\n\n\n\nAfter making these changes, they should be visible when you run\n\nmkdocs serve\n - if you already had this running, you should see that the CSS\nchanges were automatically picked up and the documentation will be updated.\n\n\n\n\nNote\n\n\nAny extra CSS or JavaScript files will be added to the generated HTML\ndocument after the page content. If you desire to include a JavaScript\nlibrary, you may have better success including the library by using the\ntheme \ncustom_dir\n.\n\n\n\n\nUsing the theme custom_dir\n\uf0c1\n\n\nThe theme.\ncustom_dir\n configuration option can be used to point to a directory\nof files which override the files in a parent theme. The parent theme would be\nthe theme defined in the theme.\nname\n configuration option. Any file in the\n\ncustom_dir\n with the same name as a file in the parent theme will replace the\nfile of the same name in the parent theme. Any additional files in the\n\ncustom_dir\n will be added to the parent theme. The contents of the \ncustom_dir\n\nshould mirror the directory structure of the parent theme. You may include\ntemplates, JavaScript files, CSS files, images, fonts, or any other media\nincluded in a theme.\n\n\n\n\nNote\n\n\nFor this to work, the theme \nname\n setting must be set to a known installed theme.\nIf the \nname\n setting is instead set to \nnull\n (or not defined), then there\nis no theme to override and the contents of the \ncustom_dir\n must be a\ncomplete, standalone theme. See \nCustom Themes\n for more\ninformation.\n\n\n\n\nFor example, the \nmkdocs\n theme (\nbrowse source\n), contains the following\ndirectory structure (in part):\n\n\n- css\\\n- fonts\\\n- img\\\n - favicon.ico\n - grid.png\n- js\\\n- 404.html\n- base.html\n- content.html\n- nav-sub.html\n- nav.html\n- toc.html\n\n\n\n\nTo override any of the files contained in that theme, create a new directory\nnext to your \ndocs_dir\n:\n\n\nmkdir custom_theme\n\n\n\n\nAnd then point your \nmkdocs.yml\n configuration file at the new directory:\n\n\ntheme:\n name: mkdocs\n custom_dir: custom_theme\n\n\n\n\nTo override the 404 error page (\"file not found\"), add a new template file named\n\n404.html\n to the \ncustom_theme\n directory. For information on what can be\nincluded in a template, review the documentation for building a \ncustom theme\n.\n\n\nTo override the favicon, you can add a new icon file at\n\ncustom_theme/img/favicon.ico\n.\n\n\nTo include a JavaScript library, copy the library to the \ncustom_theme/js/\n\ndirectory.\n\n\nYour directory structure should now look like this:\n\n\n- docs/\n - index.html\n- custom_theme/\n - img/\n - favicon.ico\n - js/\n - somelib.js\n - 404.html\n- config.yml\n\n\n\n\n\n\nNote\n\n\nAny files included in the parent theme (defined in \nname\n) but not included\nin the \ncustom_dir\n will still be utilized. The \ncustom_dir\n will only\noverride/replace files in the parent theme. If you want to remove files, or\nbuild a theme from scratch, then you should review the documentation for\nbuilding a \ncustom theme\n.\n\n\n\n\nOverriding Template Blocks\n\uf0c1\n\n\nThe built-in themes implement many of their parts inside template blocks which\ncan be individually overridden in the \nmain.html\n template. Simply create a\n\nmain.html\n template file in your \ncustom_dir\n and define replacement blocks\nwithin that file. Just make sure that the \nmain.html\n extends \nbase.html\n. For\nexample, to alter the title of the MkDocs theme, your replacement \nmain.html\n\ntemplate would contain the following:\n\n\n{% extends \"base.html\" %}\n\n{% block title %}\n