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

"Edit on GitHub" button with "single-file" solution /README.rst creates edit link for Documentation/README.rst #122

Open
sypets opened this issue Nov 29, 2021 · 5 comments
Assignees
Labels

Comments

@sypets
Copy link
Contributor

sypets commented Nov 29, 2021

I created an extension documentation with a README.rst as main documentation ("single file solution" because I wanted to check it out and also for minimal documentation I find this much more convenient (at least for myself). (And that is not because of problems of dealing with .rst or sphinx!).

I am not 100% sure I tested the "Edit on GitHub" before, so I don't know if this used to work. But it does not work now:

The generated link looks for a README.rst in Documentation (but the README.rst is in the root dir)

@marble
Copy link
Contributor

marble commented Nov 29, 2021

without reading the above: Branch was renamed from master to main. Pleas adjust the links in the Settings.cfg

@sypets
Copy link
Contributor Author

sypets commented Nov 29, 2021

No. That is not the problem. This is about an extension with a branch master.

This has nothing to do with master / main renaming. It is not necessary to make changes in extensions where the branch was not renamed.

The problem is /Documentation/ in the "Edit on GitHub" URL:

https://github.com/sypets/migrate2composer/edit/master/Documentation /README.rst

@marble
Copy link
Contributor

marble commented Nov 30, 2021

ok, thanks, got it. Will see what I can do right now, before I got the whole toolchain refactored.

@marble marble self-assigned this Nov 30, 2021
@marble
Copy link
Contributor

marble commented Apr 22, 2022

I just had a look at it, but there's no solution that I can get a grip on right now. Problems are: For Sphinx the "docstart" is ./Documentation. So I'll have to move the ./Documentation/../README in there. What if README already references media form ./Documentation/_images or alike? So I used to also move everything from ./Documentation to ./Documentation/.Documentation, to keep relative paths alive. PLUS, next problem, I somewhere need to keep the info that I rename and or relocate README and tell Sphinx about it, so that the correct "Edit on GitHub" link can be generated. At the moment I can't solve all this, but nevertheless will try in future. The toolchain is still awaiting a real refactoring. That will be the moment!

@alexander-nitsche
Copy link
Contributor

Maybe it would solve the issue by adding a condition in the Sphinx template at https://github.com/TYPO3-Documentation/sphinx_typo3_theme/blob/develop/sphinx_typo3_theme/breadcrumbs.html#L50, that checks if the path to the current file contains Documentation/ or not, and if not, it does not output any path segment here.

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

No branches or pull requests

3 participants