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

Ability to download Themes for Asciidoctor PDF #186

Closed
fwilhe opened this issue Apr 25, 2016 · 6 comments
Closed

Ability to download Themes for Asciidoctor PDF #186

fwilhe opened this issue Apr 25, 2016 · 6 comments
Labels
2.x Issue related to the 2.x series documentation
Milestone

Comments

@fwilhe
Copy link

fwilhe commented Apr 25, 2016

Hello,

we're using a theme for Asciidoctor PDF for our corporate style. Because we don't want to copy the style in each repository that contains documentation, I began to write a plugin which extends the asciidoctor-gradle-plugin. More background is in this issue: asciidoctor/asciidoctor-pdf#420

I don't mind keeping this in a separate plugin, but it occurred to me, that this functionality might actually be useful as part of this plugin.

What do you think about that? Please keep in mind that my current code is just a proof of concept, and if I were to make a PR for this project out of it, I would definitely refactor properly.

@fwilhe
Copy link
Author

fwilhe commented May 2, 2016

For those who are interested, my plugin is published now: https://plugins.gradle.org/plugin/com.github.fwilhe.asciidoctor-pdf-theme

Issues and Pull Requests are welcome :)

@ysb33r ysb33r added documentation 2.x Issue related to the 2.x series labels Jul 1, 2018
@ysb33r
Copy link
Member

ysb33r commented Jul 1, 2018

Should document this for 2.0 and maybe even create a compatibility test

@ysb33r ysb33r added this to the 2.0.0 milestone Jul 1, 2018
@ysb33r ysb33r mentioned this issue Jul 2, 2018
28 tasks
ysb33r added a commit to ysb33r/asciidoctor-gradle-plugin that referenced this issue Jul 27, 2018
Themes are registered via a `pdfThemes` extension. Themes can be local or
downlaodable from GitLab or GitHub repositories. `AsciidoctorJPdfTask`
instances have a `theme` property which refers to a registered theme
on the extension.
ysb33r added a commit to ysb33r/asciidoctor-gradle-plugin that referenced this issue Jul 27, 2018
Themes are registered via a `pdfThemes` extension. Themes can be local or
downlaodable from GitLab or GitHub repositories. `AsciidoctorJPdfTask`
instances have a `theme` property which refers to a registered theme
on the extension.
ysb33r added a commit to ysb33r/asciidoctor-gradle-plugin that referenced this issue Jul 27, 2018
Themes are registered via a `pdfThemes` extension. Themes can be local or
downlaodable from GitLab or GitHub repositories. `AsciidoctorJPdfTask`
instances have a `theme` property which refers to a registered theme
on the extension.
ysb33r added a commit to ysb33r/asciidoctor-gradle-plugin that referenced this issue Jul 27, 2018
Themes are registered via a `pdfThemes` extension. Themes can be local or
downlaodable from GitLab or GitHub repositories. `AsciidoctorJPdfTask`
instances have a `theme` property which refers to a registered theme
on the extension.
@ysb33r
Copy link
Member

ysb33r commented Jul 27, 2018

The first work on this has has been done and should be ready for 2.0-alpha.3 (#251) . An extension called pdfThemes will be added by the org.asciidoctor.jvm.pdf plugin.

The extension can then be used to register local or remote themes.

pdfThemes {
    local 'basic1', { 
        styleDir = file('themes/basic') 
        styleName = 'very-basic' 
    }

    github 'basic2', { 
        organisation = 'fwilhe' 
        repository = 'corporate-theme' 
        relativePath = 'resources/themes' 
        branch = 'master' 
    }

    gitlab 'basic3', { 
        organisation = 'fwilhe' 
        repository = 'corporate-theme' 
        relativePath = 'resources/themes' 
        branch = 'master' 
    }
}

To use the theme just tell the task about the theme

asciidoctorPdf {
  theme 'basic3'
}

ysb33r added a commit to ysb33r/asciidoctor-gradle-plugin that referenced this issue Jul 27, 2018
Themes are registered via a `pdfThemes` extension. Themes can be local or
downlaodable from GitLab or GitHub repositories. `AsciidoctorJPdfTask`
instances have a `theme` property which refers to a registered theme
on the extension.
@fwilhe
Copy link
Author

fwilhe commented Jul 29, 2018

Thanks a lot for your work on this, @ysb33r.

I like the github/gitlab special handle, but I wonder how this would work for private hosted instances of github enterprise or gitlab. Is there an option to provide a plain git url, or would I clone that manually and add it as local?

Very much looking forward to this release 👍

@ysb33r
Copy link
Member

ysb33r commented Jul 29, 2018 via email

@ysb33r
Copy link
Member

ysb33r commented Mar 22, 2019

In final release of 2.0 (Scheduled for last week in March).

@ysb33r ysb33r closed this as completed Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Issue related to the 2.x series documentation
Projects
None yet
Development

No branches or pull requests

2 participants