from pathlib import Path
from typing import Union


def content_type(path: Path) -> Union[None, str]:
    """Return content type based in file extensions."""

    if path.suffix in {'.html', '.htm'}:
        return 'html'
    if path.suffix in {'.md', '.markdown'}:
        return 'markdown'
    return None