Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated a few links #942

Merged
merged 1 commit into from
Jul 13, 2021
Merged

Updated a few links #942

merged 1 commit into from
Jul 13, 2021

Conversation

MegaIng
Copy link
Member

@MegaIng MegaIng commented Jul 13, 2021

I believe that the changed link from examples to /examples isn't a problem on readthedocs, but we should check. If it works, this PR fixes #941 .

I believe that the changed link from `examples` to `/examples` isn't a problem on readthedocs, but we should check. If it works, this PR fixes lark-parser#941 .
@erezsh
Copy link
Member

erezsh commented Jul 13, 2021

You can run make on the docs folder to build them and see for yourself.

@MegaIng
Copy link
Member Author

MegaIng commented Jul 13, 2021

@erezsh I am not a 100% sure this will work. The question is how readthedocs deals with rooted links. I would in theory expect him to redirect to latest, but I don't know if it will do that.

@MegaIng
Copy link
Member Author

MegaIng commented Jul 13, 2021

Ok, I just did find something I can test this with. It probably won't work. But I am not sure if there is a nice solution except restructuring the docs.

@erezsh
Copy link
Member

erezsh commented Jul 13, 2021

I don't see how restructuring the docs will help?

The only solution I can think of is interface with sphinx-examples and change the way it produces links.

@erezsh
Copy link
Member

erezsh commented Jul 13, 2021

But if it works when you run make and view it statically, it will probably work on readthedocs.

@MegaIng
Copy link
Member Author

MegaIng commented Jul 13, 2021

Unless readthedocs does page rewriting (which I don't think they do), the final link will be https://lark-parser.readthedocs.io/examples/, which is a 404. It work's locally with a http server served from _build/html, but that is not the actual root on RTD.

@MegaIng
Copy link
Member Author

MegaIng commented Jul 13, 2021

@MegaIng
Copy link
Member Author

MegaIng commented Jul 13, 2021

Can you try to merge this Pr and rebuild readthedocs and test if it works? If not, I think the best solution is to use an Exact redirect like this:

Type: Exact Redirect
From URL: /examples
To URL:   /en/latest/examples

While not ideal (on old versions it will still link to the latest), I think it is the best we are going to get.

@erezsh erezsh merged commit be4a7af into lark-parser:master Jul 13, 2021
@erezsh
Copy link
Member

erezsh commented Jul 13, 2021

404

Try your idea.

@MegaIng
Copy link
Member Author

MegaIng commented Jul 13, 2021

@erezsh You need to follow the steps here.

@erezsh
Copy link
Member

erezsh commented Jul 13, 2021

Funny, even their example uses the examples directory.

@erezsh
Copy link
Member

erezsh commented Jul 13, 2021

It works. Nice one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Link leads to 404 page in JSON tutorial.
2 participants