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

attribute with branch blob path #1331

Open
maxandersen opened this issue Mar 4, 2020 · 1 comment
Open

attribute with branch blob path #1331

maxandersen opened this issue Mar 4, 2020 · 1 comment

Comments

@maxandersen
Copy link

@maxandersen maxandersen commented Mar 4, 2020

at the moment to have image renders reliably with .adoc you need to do something like:

ifdef::env-github[]
:imagesdir: https://github.com/maxandersen/jbang/blob/master
endif::[]

this works great but when you are doing Pull requests and forks your images wont work unless they exist in that master branch.

Suggestion is that there would be a github-location attribute with the https path for the base of the repo, like: https://github.com/maxandersen/jbang/blob/master or if in a branch https://github.com/maxandersen/jbang/blob/custombranch or in a fork https://github.com/ditto/jbang/blob/master

with that rendering would "just work".

@mojavelinux
Copy link
Collaborator

@mojavelinux mojavelinux commented Mar 5, 2020

Here's where that would be added: https://github.com/github/markup/blob/master/lib/github/markups.rb#L40

What I don't know is how we can get the information from the GitHub context. Perhaps the code that calls GitHub markup could pass context information via the options parameter.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.