Source code for uhugo.terminal_commands

import subprocess
from dataclasses import dataclass

from packaging import version


[docs] @dataclass class Hugo: """Dataclass for Hugo""" path: str exists: bool version: version.Version
[docs] def hugo_version_cmd() -> bytes: """ Returns Hugo version :return: Hugo version """ return subprocess.check_output(["hugo", "version"]).strip()