Writing

Using MKDocs is easy—you don't need coding experience. All your content is in the Docs folder.

Getting Started

  • To get started, type this command in your terminal. cd my-project // Use the name for your project
  • For a preview of your site, start the server by running the command mkdocs serve
  • Click on ‘Ctrl’ + http://127.0.0.1:8000/ to view the default web page.

Read the Docs theme preview

Making Changes

To make some changes to your site, follow these steps:

  1. Heading

  2. Change the site name in the mkdocs.yml file and save your changes.

site_name: First Doc Site

  1. Adding pages

  2. Navigate to the docs/ folder and create new files, for example, firstpage.md and secondpage.md. See How to Create Files and Folders in VS Code for more information.

  3. Type in your content using Markdown. For more information, see markdown syntax.
  4. Save your work.
  5. Go to mkdocs.yml, add the newly created files in this format, and save your changes.
  site_name: Getting Started with MkDocs
   nav:
     - Home: index.md
     - About: firstPage.md
     - FAQ: secondpage.md
  1. Nesting

  2. This is grouping pages under a parent page; this makes your site organized and easy to navigate.

  3. Create a new folder in the docs/ folder; this will be the parent page.
  4. Create new markdown (.md) files in the new folder and add the content or text on these pages.
  5. Open the mkdocs.yml file under the nav section and add the parent page and its sub-pages in the format below.

How to nest pages in MkDocs

Remember to indent your YAML file