Comments (4)
Actually nevermind. There was a typo in my test and it now works. Sorry to bother.
from mkdocs-redirects.
While this has been reported as resolved, I am also encountering this issue at the moment, using mkdocs-redirects==1.0.4
.
A redirect formulated as 'page_one.md': 'page_two.md#'
correctly redirects from page_one.md
to page_two.md
.
However, the following configuration is ignored:
nav:
- 'Documentation': 'index.md'
- 'Page one': 'page_one.md'
- 'Page two': 'page_two.md'
plugins:
- redirects:
redirect_maps:
'page_one.md#heading': 'page_two.md#heading'
When running mkdocs serve
, the following error message is displayed:
WARNING - redirects plugin: 'page_one.md#heading' is not a valid markdown file!
WARNING - Redirect target 'page_two.md#heading' does not exist!
from mkdocs-redirects.
While this has been reported as resolved, I am also encountering this issue at the moment, using
mkdocs-redirects==1.0.4
.A redirect formulated as
'page_one.md': 'page_two.md#'
correctly redirects frompage_one.md
topage_two.md
. However, the following configuration is ignored:nav: - 'Documentation': 'index.md' - 'Page one': 'page_one.md' - 'Page two': 'page_two.md' plugins: - redirects: redirect_maps: 'page_one.md#heading': 'page_two.md#heading'When running
mkdocs serve
, the following error message is displayed:WARNING - redirects plugin: 'page_one.md#heading' is not a valid markdown file! WARNING - Redirect target 'page_two.md#heading' does not exist!
Don't add headers in the redirects. Just use the normal pages. Any redirects added to the URL will be forwarded to the redirect itself...
That's exactly what I mentioned in my issue.
So in your case 'page_one.md': 'page_two.md'
would redirect page_one#some-header
to page_two#some-header
from mkdocs-redirects.
Thanks for the advice. Do you know, then, if it's possible to create a redirect between two headings? Say, I changed heading "First heading" to "Second heading". 'page_one.md#first-heading': 'page_two.md#second-heading'
will not function, but maybe you've found some other way to handle it?
from mkdocs-redirects.
Related Issues (20)
- Allow to use regular expressions for redirects HOT 10
- Missing LICENSE in PyPI sdist HOT 1
- Installing mkdocs-redirects mentions missing testresources HOT 1
- Handing over maintenance? HOT 13
- Redirect fails with translation plugin HOT 8
- Redirect readme.md to index.md creates redirect loop HOT 3
- html to html redirection HOT 1
- some utf-8 characters break redirects HOT 3
- Uppercase to Lowercase redirect result in weird loop HOT 2
- Computed URLs are not taken into account when resolving target URL
- [Feature request] Use an external file to store redirections mapping HOT 2
- Redirect fails in Material for MkDocs HOT 6
- allow redirecting of .html URLs (without producing a warning) HOT 4
- When I redirect it tries to download the file
- Frontmatter-based redirects? HOT 1
- Use path based redirects HOT 1
- Cannot use variables HOT 6
- `DeprecationWarning` in mkdocs 1.5.3 for use of `warning_filter` HOT 1
- Option to override use_directory_urls for redirect sources
- please provide a wheelon PyPi HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mkdocs-redirects.