def _keyterms(config, info):
    """Create list of key terms."""
    lang = config.lang
    to_root = info.to_root
    entries = [x for x in config.gloss_data if x.key in info.keyterms]
    if not entries:
        return ""

    entries.sort(key=lambda x: x[lang, "term"].lower())
    entries = [
        f'<a href="{to_root}/glossary/#{x.key}">{x[lang, "term"]}</a>'
        for x in entries
    ]
    return f'<div class="keyterms"><p>{", ".join(entries)}</p></div>\n'