# mkdocs-redirects
Open source plugin for Mkdocs page redirects
## Installing
> **Note:** This package requires MkDocs version 1.0.4 or higher.
Install with pip:
```bash
pip install mkdocs-redirects
```
Enable the plugin in your `mkdocs.yml`:
```yaml
plugins:
- search
- redirects
```
## Using
In your `mkdocs.yml`, add a `redirects` block that maps the old page location to the new location:
```
redirects:
'old': 'some/new_location'
'something/before': 'another/moved/file'
```
Note that the `.html` extension should be omitted (and will be automatically appended).
The plugin will dynamically create `old.html` and `something/before.html` in your configured `site_dir` with
HTML that will include a meta redirect to the new page location.
The new location will also be appended with `.html` extension and is assumed to be relative to the root of the site.
For nested subfolders, the plugin will automatically create these directories in the `site_dir`.
## Contributing
- Pull requests are welcome.
- File bugs and suggestions in the Github Issues tracker.
## Releasing
```
make release
```
It will prompt you for your PyPI user and password.
See:
- https://packaging.python.org/tutorials/packaging-projects/
- https://packaging.python.org/guides/migrating-to-pypi-org/
Open source plugin for Mkdocs page redirects
## Installing
> **Note:** This package requires MkDocs version 1.0.4 or higher.
Install with pip:
```bash
pip install mkdocs-redirects
```
Enable the plugin in your `mkdocs.yml`:
```yaml
plugins:
- search
- redirects
```
## Using
In your `mkdocs.yml`, add a `redirects` block that maps the old page location to the new location:
```
redirects:
'old': 'some/new_location'
'something/before': 'another/moved/file'
```
Note that the `.html` extension should be omitted (and will be automatically appended).
The plugin will dynamically create `old.html` and `something/before.html` in your configured `site_dir` with
HTML that will include a meta redirect to the new page location.
The new location will also be appended with `.html` extension and is assumed to be relative to the root of the site.
For nested subfolders, the plugin will automatically create these directories in the `site_dir`.
## Contributing
- Pull requests are welcome.
- File bugs and suggestions in the Github Issues tracker.
## Releasing
```
make release
```
It will prompt you for your PyPI user and password.
See:
- https://packaging.python.org/tutorials/packaging-projects/
- https://packaging.python.org/guides/migrating-to-pypi-org/
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file mkdocs-redirects-0.0.4.tar.gz.
File metadata
- Download URL: mkdocs-redirects-0.0.4.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/1.13.0 pkginfo/1.5.0.1 requests/2.9.2 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.19.5 CPython/2.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
872bbdca75bd95fb5266d20c3e0b01f6ae8ab3ce6435f0bd970ca300bf15f9e1
|
|
| MD5 |
9c0fae2edf4abc3481f8dd22d076d619
|
|
| BLAKE2b-256 |
39ae8acd283353c04fef25eb62dff2878283dad752502bbb9cd0ef5819d047c6
|