---
version: "1.0"
date: "2025-01-15"
author: "DWS Foldsite Team"
title: "Develop Foldsite"
description: "Contributing to Foldsite development"
summary: "Guidelines for contributing code, documentation, themes, and ideas to the Foldsite project."
quick_tips:
- "Start with documentation or small bug fixes"
- "Discuss major changes in issues before implementing"
- "Follow existing code style and patterns"
---
# Develop Foldsite
Want to contribute to Foldsite? We welcome contributions of all kinds!
## Ways to Contribute
### 1. Documentation
**Impact:** High | **Difficulty:** Low
Improving documentation helps everyone:
- Fix typos and unclear explanations
- Add missing examples
- Create tutorials
- Translate to other languages
**How to start:**
1. Find documentation that confused you
2. Fork the repository
3. Edit markdown files in `docs/content/`
4. Submit pull request
No coding required!
### 2. Bug Fixes
**Impact:** High | **Difficulty:** Low to Medium
Fix issues others are experiencing:
- Browse [GitHub Issues](https://github.com/DWSresearch/foldsite/issues)
- Look for "good first issue" label
- Fix the bug
- Add test if possible
- Submit pull request
### 3. New Features
**Impact:** High | **Difficulty:** Medium to High
Add new capabilities:
- Discuss in issue first
- Get feedback on approach
- Implement feature
- Add documentation
- Add tests
- Submit pull request
### 4. Templates & Themes
**Impact:** Medium | **Difficulty:** Medium
Create reusable designs:
- Build complete theme
- Document installation
- Submit to theme gallery
- Help others customize
### 5. Testing
**Impact:** Medium | **Difficulty:** Low
Help ensure quality:
- Test new releases
- Report bugs with details
- Verify fixes work
- Test on different platforms
## Development Setup
### Prerequisites
- Python 3.10 or higher
- Git
- Text editor or IDE
### Getting Started
```bash
# Clone repository
git clone https://github.com/DWSresearch/foldsite.git
cd foldsite
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Install development dependencies
pip install -r requirements-dev.txt # If exists
# Run tests
python -m pytest # If tests exist
# Run Foldsite
python main.py --config config.toml
```
### Development Workflow
1. **Create branch** for your changes:
```bash
git checkout -b feature/my-feature
```
2. **Make changes** following code style
3. **Test changes**:
```bash
# Manual testing
python main.py --config config.toml
# Run tests if available
python -m pytest
```
4. **Commit changes**:
```bash
git add .
git commit -m "Add feature: description"
```
5. **Push and create PR**:
```bash
git push origin feature/my-feature
```
## Code Style
### Python
Follow [PEP 8](https://pep8.org/) with these specifics:
**Formatting:**
- 4 spaces for indentation
- Max line length: 100 characters
- Use type hints where helpful
- Docstrings for public functions
**Example:**
```python
def render_page(
path: Path,
base_path: Path = Path("./"),
template_path: Path = Path("./"),
) -> str:
"""
Renders a web page based on the provided path.
Args:
path: The path to the target file or directory
base_path: The base path for relative paths
template_path: Path to directory containing templates
Returns:
Rendered HTML content of the page
"""
# Implementation...
```
**Naming:**
- `snake_case` for functions and variables
- `PascalCase` for classes
- `UPPER_CASE` for constants
### HTML Templates
- 2 spaces for indentation
- Close all tags
- Use semantic HTML
- Comment complex logic
```html
{{ metadata.title }}
{# Loop through tags #}
{% if metadata.tags %}
{% endif %}
{% endif %}