Skip to content

Getting Started

This guide will help you set up and customize this documentation template for your project.

1. Clone or Fork the Template

You can either clone this repository for a standalone copy or fork it to keep it synced with the original.

To Clone:

git https://github.com/AKissenpfennig/mkdoc-materials-template.git
cd template-repo

  • To Fork:
  • Navigate to the repository on GitHub.
  • Click the Fork button.
  • Clone your fork:
    git clone https://github.com/AKissenpfennig/mkdoc-materials-template.git
    

2. Set Up a Local Python Environment

To develop and preview the documentation locally, ensure you have Python installed, then create a virtual environment:

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt

3. Using MkDocs Commands

After setting up the environment, you can use these commands:

mkdocs serve  # Run a local server for preview
mkdocs build  # Generate the static site
mkdocs gh-deploy  # Deploy to GitHub Pages

4. Changing the Git Remote Origin

If you're using this template for a new project, update the remote repository:

git remote remove origin
git remote add origin https://github.com/your-org/new-repo.git
git push -u origin main

5. Deploying to GitHub Pages using GitHub Actions

This template includes a GitHub Actions workflow to automatically deploy your documentation.

  1. Ensure GitHub Pages is enabled in your repository settings.
  2. Push your changes to the main branch.
  3. GitHub Actions will build and deploy the documentation automatically.