Skip to content

Commit 868d987

Browse files
authored
Add redirects for all charmhub pages (16) (#962)
* feat: add rediraffe sphinx extension and discourse redirects for each page * fix: minor style issues in README.md and CONTRIBUTING.md * convert tabs to single space * remove unnecessary redirects
1 parent fed4393 commit 868d987

File tree

5 files changed

+25
-1
lines changed

5 files changed

+25
-1
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ tox # runs 'lint' and 'unit' environments
4040
## Build charm
4141

4242
The build environment assumes that there are preinstalled on the system:
43+
4344
* [tox](https://tox.wiki/) (version 4+ !!!)
4445
* [poetry](https://python-poetry.org/)
4546
* [charmcraft](https://snapcraft.io/charmcraft)
@@ -69,6 +70,7 @@ pipx install charmcraftcache
6970
```
7071

7172
Ensure local pip binaries are in your $PATH (otherwise re-login to your shell):
73+
7274
```shell
7375
charmcraftcache --help
7476
```

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Charmed PostgreSQL VM Operator
2+
23
[![CharmHub Badge](https://charmhub.io/postgresql/badge.svg)](https://charmhub.io/postgresql)
34
[![Release](https://github.com/canonical/postgresql-operator/actions/workflows/release.yaml/badge.svg)](https://github.com/canonical/postgresql-operator/actions/workflows/release.yaml)
45
[![Tests](https://github.com/canonical/postgresql-operator/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/canonical/postgresql-operator/actions/workflows/ci.yaml?query=branch%3Amain)
@@ -131,13 +132,15 @@ juju integrate postgresql <application_name>
131132
```
132133

133134
To remove a relation:
135+
134136
```shell
135137
juju remove-relation postgresql <application_name>
136138
```
137139

138140
#### Legacy `pgsql` interface
139141

140142
We have also added support for the two database legacy relations from the [original version](https://launchpad.net/postgresql-charm) of the charm via the `pgsql` interface. Please note that these relations will be deprecated.
143+
141144
```shell
142145
juju relate postgresql:db mailman3-core
143146
juju relate postgresql:db-admin landscape-server

docs/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,9 @@
193193
# NOTE: If undefined, set to None, or empty,
194194
# the sphinx_reredirects extension will be disabled.
195195

196-
redirects = {}
196+
# redirects = {}
197197

198+
rediraffe_redirects = "redirects.txt"
198199

199200
###########################
200201
# Link checker exceptions #
@@ -258,6 +259,7 @@
258259
"sphinxcontrib.cairosvgconverter",
259260
"sphinx_last_updated_by_git",
260261
"sphinx.ext.intersphinx",
262+
"sphinxext.rediraffe"
261263
]
262264

263265
# Excludes files or directories from processing

docs/redirects.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# The redirects.txt file stores all the redirects for the published docs
2+
# If you change a filename, move or delete a file, you need a redirect here.
3+
# - Comment lines start with a hash (#) and are ignored
4+
# - Each redirect should appear on its own line
5+
6+
# We are using the dirhtml builder, so files are treated as directories:
7+
# - A file is built like `filename/index.html`, not `filename.html`
8+
# - *Do* include a trailing slash at the end of the path
9+
# - *Do not* include a file extension or you'll get errors
10+
# - Paths don't need a slash in front of them
11+
12+
# Example:
13+
# redirect/from/file/ redirect/to/file/
14+
15+
# How-to guides
16+
h-deploy-juju-spaces how-to/deploy/juju-spaces

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
canonical-sphinx[full]
22
sphinxcontrib-svg2pdfconverter[CairoSVG]
33
sphinx-last-updated-by-git
4+
sphinxext-rediraffe

0 commit comments

Comments
 (0)