def add_package_link(package_name: str) -> str:
    """Replace a tag with a hugo-style link to the package page.

    Args:
        package_name: The name of the package.

    Returns:
        A string with the hugo-style link to the package page.

    >>> add_package_link("foo")
    '<a href="{{< relref "/packages/foo" >}}">foo</a>'
    """
    return f'<a href="{{{{< relref "/packages/{package_name}" >}}}}">{package_name}</a>'