Skip to content

Material for MKdocs + Github pages

Info

Material for MKdocs

  1. Install and Create
    pip install mkdocs-material
    mkdocs new
    
    # Create structure
    .
    ├─ docs/
      └─ index.md
    └─ mkdocs.yml
    
  2. Set up the Minimal configuration
    mkdocs.yml
    theme:
        name: material
    
  3. Verify that you can run mkdocs-web using localhost
    mkdocs serve
    

Github Pages

  1. with GitHub Actions
    You Copy the ci.yml Copy-Link
    And paste ./github/workflows/ci.yml
    mkdir .github/workflows
    cd .github/workflows
    #Paste ci.yml
    vi ci.yml 
    
  2. Github push
  3. Set up Github Pages
    • Under your Mkdocs Repository name, click Settings. 1
    • In the "Code and automation" section of the left sidebar, click Pages.
    • Build and deployment
      2
      • Source: Select Deploy from a branch
      • Branch: use the gh-pages Branch and select a publishing source.
    • Visit your new website