forked from phoenix-oss/llama-stack-mirror
feat: automatically update documentation version based on pyproject.toml source of truth
This commit is contained in:
parent
9a3db9a290
commit
6b075e5075
3 changed files with 10 additions and 2 deletions
|
@ -13,6 +13,13 @@
|
|||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||
|
||||
from docutils import nodes
|
||||
import tomli # Import tomli for TOML parsing
|
||||
from pathlib import Path
|
||||
|
||||
# Read version from pyproject.toml
|
||||
with Path(__file__).parent.parent.parent.joinpath("pyproject.toml").open("rb") as f:
|
||||
pyproject = tomli.load(f)
|
||||
llama_stack_version = pyproject["project"]["version"]
|
||||
|
||||
project = "llama-stack"
|
||||
copyright = "2025, Meta"
|
||||
|
@ -66,6 +73,7 @@ myst_enable_extensions = [
|
|||
|
||||
myst_substitutions = {
|
||||
"docker_hub": "https://hub.docker.com/repository/docker/llamastack",
|
||||
"llama_stack_version": llama_stack_version,
|
||||
}
|
||||
|
||||
suppress_warnings = ['myst.header']
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
```{admonition} News
|
||||
:class: tip
|
||||
|
||||
Llama Stack 0.1.4 is now available! See the [release notes](https://github.com/meta-llama/llama-stack/releases/tag/v0.1.4) for more details.
|
||||
Llama Stack {{ llama_stack_version }} is now available! See the [release notes](https://github.com/meta-llama/llama-stack/releases/tag/v{{ llama_stack_version }}) for more details.
|
||||
```
|
||||
|
||||
# Llama Stack
|
||||
|
|
|
@ -74,6 +74,7 @@ docs = [
|
|||
"sphinxcontrib.redoc",
|
||||
"sphinxcontrib.video",
|
||||
"sphinxcontrib.mermaid",
|
||||
"tomli",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue