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

[FEAT] GitLab IDE: Different BookRepo for edit this page link #414

Open
alwinw opened this issue Jan 31, 2022 · 5 comments
Open

[FEAT] GitLab IDE: Different BookRepo for edit this page link #414

alwinw opened this issue Jan 31, 2022 · 5 comments

Comments

@alwinw
Copy link

alwinw commented Jan 31, 2022

Great template! I'm using this on GitLab pages, and I'm hoping to change the Edit this page link to use the GitLab IDE instead of the normal edit file webpage for a richer user experience.

I understand that I can set BookEditPath: edit/main to get functionality edit a single page, but is there a way I can add -/ide/project between gitlab.com and group/repo for web IDE functionality? Ideally, without changing BookRepo: https://gitlab.com/group/repo as I'm using this for the last modified and edit this page links.

If this is a new piece of functionality required, I'd be happy to try work on it myself and open a PR if you can please give me some guidance on what the new configuration parameter should be called.

Thanks!

@alwinw alwinw changed the title [FEAT] GitLab IDE: Different BookRepo for edit [FEAT] GitLab IDE: Different BookRepo for edit this page link Jan 31, 2022
@alex-shpak
Copy link
Owner

Hi!
Well, as a hack, BookRepo variable is only used to generate edit URL to the page.
so you can try setting BookRepo: https://gitlab.com/-ide/....

@alwinw
Copy link
Author

alwinw commented Feb 1, 2022

I've given it a go, but (apologies if it wasn't clear before) it changes the last modified link as well. Changing BookRepo to include gitlab.com/-ide/... also changes the last modified link to https://gitlab.com/-/ide/project/group/repo/commit/hash which doesn't resolve correctly.

@alex-shpak
Copy link
Owner

Ah, I forgot about that one,
well, footer layout will need to be changed to achieve that.

perhaps we can have templatable value 🤔
like https://domain.com/blahlblah/{{ .Page }} or something similar

@alex-shpak
Copy link
Owner

Unfortunately that will be a backward incompatible change, so need to be careful here.

@MAHDTech
Copy link

MAHDTech commented Apr 25, 2022

What about the creation of a new variable, and then any of this special config could be applied in that case.

Then default it to have the same behavior as now for backwards compatibility.

BookEditType: default

BookEditType: gitlab

BookEditType: gitlab-ide

BookEditType: github

BookEditType: bitbucket

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

No branches or pull requests

3 participants