Skip to content

Netlify + GitHub + MKDocs


  • python environment for mkdocs
  • create new mkdocs project
  • edit markdown files in folders

Git & GitHub

  • create new git repository in folder:
    (first make sure you're in the project folder)
    git init
    git add .

  • make the first commit
    git commit -m "first commit message

  • create a new GitHub repository
    i published to github from the github desktop interface

  • make some changes and commit

  • push to GitHub (adding any changes the 'master' branch to github)
    git push origin master


NOTE: Make sure that in the root folder there is a file called requirements.txt that contains the following lines:


mkdocs... is required
mkdocs-material... is for the theme I'm currently using

ALSO add file in the root folder called runtime.txt with only one line (and no newlines):

  • Sign up to Netlify
  • Click on "New site from Git"
  • install the Netlify GitHub app (I installed in repository, not in all github profile)
  • choose the repository to install Netlify on
  • set the build command as mkdocs build
  • choose branch to deploy (I chose master so that it publishes any branch I merge to master)
  • set the publish directory (for mkdocs it is site)
  • click Deploy Site and your site will go live
  • Update site settings such as site name, etc