diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 416a8c07..431c682c 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -106,20 +106,20 @@ jobs: - name: ⚙️ Setup - Calculate and assign new version run: | - export CURRENT_VERSION=$(curl -L https://pypi.python.org/pypi/musify/json | jq .info.version) - export CURRENT_MAJOR=$(echo ${CURRENT_VERSION//\"} | sed -r "s|^([0-9]+)\..*|\1|") - export CURRENT_MINOR=$(echo ${CURRENT_VERSION//\"} | sed -r "s|.*\.([0-9]+)\..*|\1|") - export CURRENT_PATCH=$(echo ${CURRENT_VERSION//\"} | sed -r "s|.*\.([0-9]+)$|\1|") + CURRENT_VERSION=$(curl -L https://pypi.python.org/pypi/musify/json | jq .info.version) + CURRENT_MAJOR=$(echo ${CURRENT_VERSION//\"} | sed -r "s|^([0-9]+)\..*|\1|") + CURRENT_MINOR=$(echo ${CURRENT_VERSION//\"} | sed -r "s|.*\.([0-9]+)\..*|\1|") + CURRENT_PATCH=$(echo ${CURRENT_VERSION//\"} | sed -r "s|.*\.([0-9]+)$|\1|") echo Current version = $CURRENT_VERSION echo Major=$CURRENT_MAJOR \| Minor=$CURRENT_MINOR \| Patch=$CURRENT_PATCH if [[ $CURRENT_MAJOR -ne $(date -u "+%Y") || ${CURRENT_MINOR} -ne $(date -u "+%-m") ]] then echo Resetting patch number - export CURRENT_PATCH=-1 + CURRENT_PATCH=-1 fi - export VERSION=$(date -u "+%Y").$(date -u "+%-m").$((CURRENT_PATCH + 1)) + VERSION=$(date -u "+%Y").$(date -u "+%-m").$((CURRENT_PATCH + 1)) echo Assigning new version = $VERSION hatch version $VERSION diff --git a/docs/conf.py b/docs/conf.py index 35fc6542..79440665 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,6 +26,7 @@ "sphinx.ext.inheritance_diagram", "sphinx_autodoc_typehints", "autodocsumm", + "sphinxext.opengraph", ] autodoc_member_order = "bysource" autodoc_default_options = { @@ -48,6 +49,8 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output html_static_path = ["_static"] +html_title = project + html_theme = "sphinx_rtd_theme" html_theme_options = dict( collapse_navigation=False, @@ -67,6 +70,9 @@ conf_py_path=f"/{basename(dirname(__file__))}/", ) +# -- OpenGraph configuration -------------------------------------------------- +ogp_site_url = f"https://{PROGRAM_OWNER_NAME}.github.io/{PROGRAM_NAME.lower()}/" +ogp_use_first_image = False # -- GraphViz configuration -------------------------------------------------- # https://graphviz.org/doc/info/attrs.html diff --git a/pyproject.toml b/pyproject.toml index 8c5d9a40..6fae90e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,6 +50,7 @@ docs = [ "graphviz~=0.20", "sphinx-autodoc-typehints~=1.25", "autodocsumm~=0.2", + "sphinxext-opengraph~=0.9", ] dev = [ "musify[test,docs]",