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 this page" link #123

Open
vinniefalco opened this issue Apr 6, 2022 · 8 comments
Open

"Edit this page" link #123

vinniefalco opened this issue Apr 6, 2022 · 8 comments
Assignees

Comments

@vinniefalco
Copy link
Member

Would it be possible to have an "edit this page" link on every generated doc page and in each page of the exposition? I guess it should link to the GitHub repository, I believe GitHub has some API that lets you edit a file in the repo.

@evanlenz
Copy link
Contributor

evanlenz commented Apr 6, 2022

Ooh, that sounds cool (and pretty feasible, I think). However, the trick would be preserving the changes after another doc build. Without some relatively fancy mechanism (and I have no aversion to relatively fancy mechanisms when they do something valuable!), the manual changes would get clobbered in the very next build (and would have to manually get reapplied). Does this all make sense what I’m saying? Or did I misunderstand what you’re asking about?

@vinniefalco
Copy link
Member Author

uhhhhh...GitHub has an inline editor which submits the change as a pull request

@evanlenz
Copy link
Contributor

evanlenz commented Apr 6, 2022

Oh, I think I did misunderstand! You’re talking about editing the source files! Duh, brain is a little slow today. 😅 Yes, we should be able to make this work. Devil in the details, but any obstacles have got to be surmountable.

@vinniefalco
Copy link
Member Author

image

@vinniefalco
Copy link
Member Author

The link is formed like this

https://github.com/boostorg/docca/edit/develop/LICENSE_1_0.txt

@evanlenz evanlenz self-assigned this Apr 6, 2022
@vinniefalco
Copy link
Member Author

it could only apply to the develop branch though.... so if you are trying to edit say, an older Boost version (1.77 for example) when you press the button you will be editing the develop branch version of the file.

@vinniefalco
Copy link
Member Author

This is starting to sound lame... lol

@vinniefalco
Copy link
Member Author

There's no way to bring the edit box focus directly to the line in question, and there's no way for the xslt to know which line in the source file it corresponds to in the first place. Not very streamlined.

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

2 participants