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

gh-958 Use Asciidoctor's PDF generation #1009

Closed
wants to merge 2 commits into from
Closed

gh-958 Use Asciidoctor's PDF generation #1009

wants to merge 2 commits into from

Conversation

ghillert
Copy link
Contributor

@ghillert ghillert commented Nov 11, 2016

  • Remove docbook-based Maven tool-chain
  • Ensure Spring Cloud Data Flow logo shows up on PDF cover-page
  • Ensure Spring Cloud Data Flow version-number shows up on PDF cover-page
  • Ensure that PDF and HTML docs are bundled up correctly

Resolves #958

* Remove docbook-based Maven tool-chain
* Ensure Spring Cloud Data Flow logo shows up on PDF cover-page
* Ensure Spring Cloud Data Flow version-number shows up on PDF cover-page
* Ensure that PDF and HTML docs are bundled up correctly
@ghillert
Copy link
Contributor Author

Just for reference - Looks like there are a ton of fixes in the underlying asciidoctor-pdf asciidoctor/asciidoctorj#505 incl. better support for SVG.

@@ -361,13 +214,16 @@
</goals>
<configuration>
<target>
<copy file="${project.build.directory}/generated-docs/index.pdf" tofile="${project.build.directory}/contents/reference/pdf/spring-cloud-dataflow-reference.pdf" />
<copy todir="${project.build.directory}/contents/reference/html">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think now that docbook is dropped, it would be better to forget about that contents directory that misleads everyone. Generated docs should be in generated-docs, period. Then, build the zip from there. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could even argue that the assembly plugin is a more natural fit...

@ericbottard
Copy link
Contributor

ericbottard commented Nov 14, 2016

The docbook directory should be removed, shouldn't it? So should the index-docinfo.xml file

@ericbottard
Copy link
Contributor

We definitely need to figure out what's wrong with Part (title 1) titles. They're lacking a pagebreak before:
screen shot 2016-11-14 at 12 43 39

@ericbottard
Copy link
Contributor

See asciidoctor/asciidoctor-pdf#74

@ericbottard
Copy link
Contributor

Could force a page break with <<< for now: http://asciidoctor.org/docs/user-manual/#page-break

@ghillert
Copy link
Contributor Author

Looks like there is a way to configure custom dependency versions:

https://github.com/asciidoctor/asciidoctor-maven-examples/blob/master/asciidoctor-pdf-with-theme-example/pom.xml

* Remove docbook contents
* Add basic theme-template
* Polish theme
@ghillert
Copy link
Contributor Author

Made some changes:

  • Remove docbook contents
  • Add basic theme-template
  • Polish theme

Not sure yet on the section titles.

Also, not sure about using the generated-docs directly - Asciidoctor is placing some not-needed files there.

@ericbottard
Copy link
Contributor

Also, not sure about using the generated-docs directly - Asciidoctor is placing some not-needed files there.

Still, I think we should follow the principle of least astonishment. We can cherry pick the files we want in the zip easily.

Will have a look at this new commit and maybe incorporate the final changes myself (looks like conditional pagebreaks is the best workaround for now)

@@ -168,6 +168,8 @@
<backend>pdf</backend>
<sourceHighlighter>rouge</sourceHighlighter>
<attributes>
<pdf-stylesdir>${project.basedir}/src/main/asciidoc/pdf-theme</pdf-stylesdir>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could move the theme out of the asciidoc directory (maybe as a sibling asciidoc-pdf-theme) so that it does not end up in the generated-docs dir

@ericbottard
Copy link
Contributor

Merged as f707c9b, which includes ericbottard@2e1b093

Seems like asciidoctor-pdf-alpha13 includes a fix for pagebreaks. Sadly, its -J version is not published on maven yet.

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

Successfully merging this pull request may close these issues.

3 participants