# mkdocs_generator.py

**Path:** `src/thedoc/mkdocs_generator.py`

## Classes

### MkDocsGenerator

Generates MkDocs documentation from extracted code documentation.

---

## Methods

### MkDocsGenerator.__init__

Initialize the MkDocs generator.

```python
__init__(self, project_path)
```

**Parameters:**

* `project_path`: Path to the project root

---

### MkDocsGenerator.detect_project_languages

Detect programming languages used in the project.
List of detected programming languages

```python
detect_project_languages(self)
```

---

### MkDocsGenerator.extract_documentation

Extract documentation from all supported files in the project.
Dictionary containing all extracted documentation grouped by language

```python
extract_documentation(self)
```

---

### MkDocsGenerator.generate_markdown

Generate Markdown files from extracted documentation.

```python
generate_markdown(self, documentation)
```

**Parameters:**

* `documentation`: Dictionary containing all extracted documentation

---

### MkDocsGenerator._create_index_file

Create the main index.md file for the documentation.

```python
_create_index_file(self)
```

---

### MkDocsGenerator._create_language_index

Create the index.md file for a specific language.

```python
_create_language_index(self, language, lang_dir, files)
```

**Parameters:**

* `language`: The programming language
* `lang_dir`: The directory for the language documentation
* `files`: Dictionary of files with their documentation items

---

### MkDocsGenerator._create_file_documentation

Create Markdown documentation for a specific file.

```python
_create_file_documentation(self, language, file_path, doc_items, lang_dir)
```

**Parameters:**

* `language`: The programming language
* `file_path`: The path to the source file
* `doc_items`: List of documentation items for the file
* `lang_dir`: The directory for the language documentation

---

### MkDocsGenerator.create_mkdocs_config

Create the MkDocs configuration file.

```python
create_mkdocs_config(self)
```

---

### MkDocsGenerator.generate

Generate the MkDocs documentation.

```python
generate(self)
```

---

## Modules

### mkdocs_generator

MkDocs generator for TheDoc.

This module handles the generation of MkDocs documentation from extracted code documentation.

---

