Skip to content

Move to pure Asciidoctor for documentation #12611

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

Closed
wants to merge 6 commits into from
Closed

Move to pure Asciidoctor for documentation #12611

wants to merge 6 commits into from

Conversation

Buzzardo
Copy link

@Buzzardo Buzzardo commented Mar 23, 2018

Per #7447, I have removed Docbook from the document-production tool chain.

I also added a collapsible Table of Contents for all the HTML files, changed the styles to match Spring Framework, added an index page for the multi-file HTML version, and fixed a couple of casing issues (significant words starting with lower case in headings) that I saw along the way. A side effect of moving to Asciidoctor was a substantial reduction in the number of HTML files, because we no longer chunk each file. The collapsible ToC makes the larger HTML files more usable, so it should work out well for our readers.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 23, 2018
@philwebb philwebb added type: task A general task for: merge-with-amendments Needs some changes when we merge and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 27, 2018
@philwebb philwebb added this to the 2.0.x milestone Mar 27, 2018
@snicoll snicoll changed the title Issue 7447 Move to pure Asciidoctor for documentation Apr 4, 2018
@bclozel
Copy link
Member

bclozel commented Apr 4, 2018

Instead of copying over the CSS, JS and docinfo files, I'd rather have that as resources in a shared artifact for all Spring projects. Otherwise we'll have to version and maintain those generated files/libraries.

@philwebb philwebb modified the milestones: 2.0.x, Backlog Apr 4, 2018
@philwebb
Copy link
Member

philwebb commented Apr 4, 2018

I don't know why I added this to 2.0.x, it should be in the backlog and something we consider for 2.1

@bclozel bclozel self-assigned this Apr 10, 2018
@bclozel bclozel added the status: on-hold We can't start working on this issue yet label Apr 10, 2018
@bclozel
Copy link
Member

bclozel commented May 7, 2018

The shared asciidoctor theme has been started, we need to first submit a few PRs there and then publish it as an artifact.

@philwebb philwebb modified the milestones: 2.1.x, 2.x Sep 11, 2018
@philwebb philwebb added the for: team-attention An issue we'd like other members of the team to review label Nov 9, 2018
@bclozel bclozel removed the for: team-attention An issue we'd like other members of the team to review label Nov 9, 2018
Jay Bryant added 6 commits November 16, 2018 10:02
Per issue-7447, I have removed Docbook from the documet-production tool chain.
I also added a collapsible Table of Contents for all the HTML files, changed the styles to match Spring Framework, added an index page for the multi-file HTML version, and fixed a couple of casing issues (significant words starting with lower case in headings) that I saw along the way. A side effect of moving to Asciidoctor was a substantial reduction in the number of HTML files, because we no longer chunk each file. The collapsible ToC makes the larger HTML files more usable, so it should work out well for our readers.
I discovered that we had a .gitignore file that was ignoring HTML and CSS files. That won't work with Asciidoctor, which uses both kinds of files as inputs (not just outputs). I removed the .gitignore file and am adding the necessary HTML and CSS files.
I'm in the middle of making more changes to how Spring Boot's docs get built, and I don't want to lose things, so I'm making an interim commit.
The Asciidoctor Epub3 generator is in Alpha. It is both brittle and missing some features. I had to work around a few things to get reasonable output. Even so, I wound up moving some items in the Epub and the PDF outputs. The information tha was in index-docinfo.xml does not get picked up by the Asciidoctor Epub or PDF generators. I put the author list on the cover and the rest of the information in a file called preamble.adoc, which becomes the first file to be included. That adds one chapter to the Epub and PDF output. I called it legal. It provides the same output as previously for the single-page HTML output.
I was trying to find a better way to re-insert the material we lost by moving to Epub without Asciidoctor (the content of index-docinfo.xml) and forgot to remove the experiment before committing.
While researching how to get the content from index-docinfo.xml into the output, I came across the notion of a colophon, which is a good name for the information in that file. I have consequently changed "Legal" (which I never liked but couldn't think of a better term for at the time) to "Colophon". I also caught that
it should be in all outputs, so I removed the conditional check that made it app
ly to only the Epub output.
@Buzzardo
Copy link
Author

I fixed the merge conflict (which I didn't realize I had, or I would have fixed it long ago). Sorry about that. This should be ready for prime time now.

@Buzzardo
Copy link
Author

The shared asciidoctor theme has been started, we need to first submit a few PRs there and then publish it as an artifact.

I made a project for our shared doc resources: https://github.com/spring-projects/spring-doc-resources, so that the whole Spring portfolio would have a single place for the doc resources (so that we can change things like stylesheets in only one place).

The changes I made to Spring Boot get the doc resources from that project.

@bclozel
Copy link
Member

bclozel commented Nov 16, 2018

@Buzzardo Thanks! Let me review this PR. I’ll probably send a PR myself to the docs resources project because we need it to generate the css files from the original theme rather than storing them.

I’ll let you know if I’ve got questions about it!

@@ -960,6 +969,31 @@
<profiles>
<profile>
<id>full</id>
<dependencies>
<dependency>
<groupId>org.springframework.doc-resources</groupId>
Copy link
Member

Choose a reason for hiding this comment

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

This is quite an unconventional group id due to the - in it. I would have raised an issue for it in https://github.com/spring-projects/spring-doc-resources but issues appear to be disabled and there's no link to an alternative issue tracker in the README. Could it be changed pleased?

Copy link
Author

Choose a reason for hiding this comment

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

Should it be org.springframework.doc.resources?

Copy link
Member

Choose a reason for hiding this comment

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

I think docresources would be more conventional. It would also match other projects like REST Docs (restdocs) and Web Flow (webflow) too.

There’s also a case to be made for it to be io.spring rather than org.springframework. The latter is typically reserved for projects that are used by the community when developing an application, have a programmatic API, etc.

Copy link
Author

Choose a reason for hiding this comment

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

I'll change it to io.spring.docresources once Brian has finished his review. We have four projects (and growing) that use this set of resources now, so I'll have some changes to make.

@bclozel
Copy link
Member

bclozel commented Nov 20, 2018

I've sent a work in progress PR on the doc resources project, see: spring-io/spring-doc-resources#1

I'll update it with stylesheet changes to reflect the Spring Asciidoctor theme, as it's currently just a CSS reset. I'm working with @oodamien on that.

@bclozel bclozel modified the milestones: 2.x, 2.1.x, 2.2.x Nov 21, 2018
bclozel pushed a commit that referenced this pull request Dec 5, 2018
bclozel pushed a commit that referenced this pull request Dec 5, 2018
Remove Guardfile for now; we might reintroduce it later, but it is
currently out of sync with the documentation changes.

Do not ignore html files in the asciidoc directory as those are needed
for docinfo parts.

See gh-12611
bclozel pushed a commit that referenced this pull request Dec 5, 2018
This commit adds an index page for the multi-file HTML version, and
fixed a couple of casing issues (significant words starting with lower
case in headings).

While researching how to get the content from index-docinfo.xml into
the output, I came across the notion of a colophon, which is a good name
for the information in that file. I have consequently changed "Legal"
(which I never liked but couldn't think of a better term for at the
time) to "Colophon".

See gh-12611
@bclozel bclozel closed this in ed3347f Dec 5, 2018
@bclozel bclozel modified the milestones: 2.2.x, 2.2.0.M1 Dec 5, 2018
@bclozel bclozel removed for: merge-with-amendments Needs some changes when we merge status: on-hold We can't start working on this issue yet labels Dec 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants