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

Download PDF themes from own repository #733

Open
upeuker opened this issue Jul 22, 2024 · 4 comments
Open

Download PDF themes from own repository #733

upeuker opened this issue Jul 22, 2024 · 4 comments

Comments

@upeuker
Copy link

upeuker commented Jul 22, 2024

I know the feature to load a pdf theme from a Gitlab or a GitHub repository.

For my use case it would be helpful to get the theme from another repository in other words my own local instance of a gitlab repository or some other git repository.

Is this possible and what did I overlooked if yes. Or would that be a common useful feature for users with grouped projects and many documents, which must be created with a consistent styling.

Thx,
Uwe

@ysb33r
Copy link
Member

ysb33r commented Jul 22, 2024

The Git(Hub|Lab) implementation relies on the ZIP download feature that both providers have to offer.

As long as any other service offers that, then it won't be too hard to implement.

For a local-hosted Gitlab, try to set baseUri eg.

pdfThemes {
  gitlab('foo') {
    baseUri = 'https://gitlab.self.hosted.example'.toURI()
  }
}

@upeuker
Copy link
Author

upeuker commented Jul 23, 2024

Thanks for the fast response.

Redefining the gitlab-URI works basically.
The remaining problem: Running the Gradle build via Gitlab-CI works, because the theme and the project instance is the same.
The local build or a build from Jenkins (for example) didn't work because the credentials from the local environment or the Jenkins session are not provided to the asciidoctor task (I think).

Is there a simple solution in the configuration or should I ask my gitlab administrator for open access without necessary credentials?

Many thanks
Uwe

@ysb33r
Copy link
Member

ysb33r commented Jul 23, 2024

It is not ideal but you can set it in the URI for now i.e.

pdfThemes {
  gitlab('foo') {
    baseUri = "https://${System.getenv('YOUR_USER'):${System.getenv('YOUR_TOKEN')}@gitlab.self.hosted.example".toURI()
  }
}

@upeuker
Copy link
Author

upeuker commented Jul 23, 2024

Thx. I'm going to try it.

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