diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8e8a53b9..2f638a51 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,6 +21,21 @@ jobs: - name: Checkout source uses: actions/checkout@v4 + - name: Replace stable version with the release version + run: |- + # store the release tag + tag="${{ github.ref_name }}" + + # regex patterns + badge_pattern="s#(readthedocs\.org/projects/glass/badge/\?version=)stable#\1${tag}#g" + url_pattern="s#(glass\.readthedocs\.io.*?)/stable#\1/${tag}#g" + + # perform the replacements + sed --in-place --regexp-extended \ + --expression "$badge_pattern" \ + --expression "$url_pattern" \ + ${{ github.workspace }}/README.md + - name: Build SDist and wheel run: pipx run build diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 09f78990..8d24598d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -78,7 +78,7 @@ rendering documentation on its website. The configuration file (`conf.py`) for `sphinx` can be found [under the `docs` folder](https://github.com/glass-dev/glass/blob/main/docs/conf.py). The documentation is deployed on -[here](https://glass.readthedocs.io/en/latest/). +[here](https://glass.readthedocs.io/latest/). Ideally, with the addition of every new feature to _GLASS_, documentation should be added using comments, docstrings, and `.rst` files. diff --git a/README.md b/README.md index 42fbcbd6..d050615f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![PyPI](https://img.shields.io/pypi/v/glass)](https://pypi.org/project/glass) -[![Documentation](https://readthedocs.org/projects/glass/badge/?version=latest)](https://glass.readthedocs.io/latest) +[![Documentation](https://readthedocs.org/projects/glass/badge/?version=stable)](https://glass.readthedocs.io/stable) [![LICENSE](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) @@ -80,7 +80,7 @@ e.g. a design decision or API change, you can use our [Discussions] page. We also have a public [Slack workspace] for discussions about the project. -[documentation]: https://glass.readthedocs.io/ -[examples]: https://glass.readthedocs.io/projects/examples/ +[documentation]: https://glass.readthedocs.io/stable +[examples]: https://glass.readthedocs.io/stable/examples.html [Discussions]: https://github.com/orgs/glass-dev/discussions [Slack workspace]: https://glass-dev.github.io/slack diff --git a/docs/manual/first-steps.rst b/docs/manual/first-steps.rst index f1ff2ded..37e899e9 100644 --- a/docs/manual/first-steps.rst +++ b/docs/manual/first-steps.rst @@ -1,6 +1,4 @@ First steps =========== -The best way to get started with *GLASS* is to follow the examples__. - -__ https://glass.readthedocs.io/projects/examples/ +The best way to get started with *GLASS* is to follow the :doc:`/examples`. diff --git a/pyproject.toml b/pyproject.toml index 6e510f68..d7c037e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,7 +67,7 @@ test = [ [project.urls] Changelog = "https://glass.readthedocs.io/stable/manual/releases.html" -Documentation = "https://glass.readthedocs.io/" +Documentation = "https://glass.readthedocs.io/stable" Homepage = "https://github.com/glass-dev/glass" Issues = "https://github.com/glass-dev/glass/issues"