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

Docs: Diataxis framework templates #25354

Merged
merged 1 commit into from Jun 29, 2022
Merged

Conversation

ebullient
Copy link
Contributor

@ebullient ebullient commented May 4, 2022

The directory structure: diataxis vs asciidoc is temporary, to identify what has been touched and what hasn't. Consider it an internal detail (not surfaced on the website).

the doc-\* pages are intended for those that will be contributing to Quarkus documentation, so they understand the intent/distinction between the four types of docs. This content also provides exemplars of each type: doc-\*-tutorial.adoc for tutorials, doc-\*-howto.adoc for how-tos, doc-\*-concepts.adoc for concepts, and doc-\*-reference.adoc for references.

Resolves #25355

UPDATE:

  • Flattened back into the single asciidoc directory so we can make incremental progress on improving docs. See Docs: generate index.yaml with title + preamble #25952 for a tool that will enumerate the docs that don't fit in any of the target categories or are missing required things so we know what still needs to be done.

ADDITIONAL NOTES (2022-06-29):

  • This does not impact website publishing. New docs following templates will still need to be added manually to be included on the website.
  • Indexes are generated by tools introduced in Docs: generate index.yaml with title + preamble #25952 may allow a bit more automation (to pick up descriptions, and or allow iteration over docs of different types), but that tool is essentially experimental, to allow us to figure out how to then improve the publication process and work towards James' updated design that breaks out documents by type.

@ebullient ebullient requested a review from gsmet May 4, 2022 03:56
@quarkus-bot
Copy link

quarkus-bot bot commented May 4, 2022

Thanks for your pull request!

The title of your pull request does not follow our editorial rules. Could you have a look?

  • title should preferably start with an uppercase character (if it makes sense!)

This message is automatically generated by a bot.

@ebullient ebullient changed the title draft templates Docs: Diataxis framework templates (draft) May 4, 2022
@ebullient ebullient force-pushed the docs branch 6 times, most recently from b02c10d to f606126 Compare May 8, 2022 14:48
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

I added a bunch of comments. Some are minor, some not so much.

@@ -0,0 +1,26 @@
// tag::application[]
Copy link
Member

Choose a reason for hiding this comment

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

I don't think it's such a good idea to have the sources like that.
We won't be able to compile them given the conventions you used so it's not really better than having them in the .adoc.

If we do that, we need to make _examples an appropriate source directory and the content of it a proper thing with packages but...

Problem is that you will end up with a gigantic Quarkus app if all the sources are in the same module. And it probably won't work as some extensions cannot be combined with some others.

Copy link
Contributor Author

@ebullient ebullient May 12, 2022

Choose a reason for hiding this comment

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

We can certainly make a proper src tree under examples if that's what we want to do. The comments alone are fine..

This is something I did want to ask. We could be annotating source from quickstarts (remote sources can still use tagged regions...), but I would like to see if we can get here somehow.

Copy link
Member

Choose a reason for hiding this comment

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

Well, what I'm saying is that what you're suggesting here is not an improvement: it requires more work and is not compilable/compiled.
If you think you can make a proper src tree under examples, then let's demo it because my fear is that you won't be able to make it work properly without some really annoying work i.e. basically reconstructing the quickstarts here.

So my advice would be to get rid of this until we can find a proper solution. Or until you can show me what you did can work and will scale.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

or we acccept that this is a one-off that demonstrates what should be done using source from a quickstart ... I'm not sure I want to create a new quickstart just for this docs example.

I can make it more clear this is a one-off example, and perform a similar markup to the micrometer quickstart?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

One option (aside from this one-off example) is to encourage source samples to come from integration tests..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Long term, I think pulling from integration tests (which are compiled and run) is the right answer. A build-time fetch/copy of referenced source files for use in docs (in the same way we generate config files), but the build/test happens in the integration tests that have the correct dependency configurations.

This kind of code referencing is also optional, but I wanted to have an example of it.

docs/src/main/diataxis/attributes.adoc Outdated Show resolved Hide resolved
docs/src/main/diataxis/doc-concept.adoc Outdated Show resolved Hide resolved
docs/src/main/diataxis/doc-concept.adoc Outdated Show resolved Hide resolved
docs/src/main/diataxis/doc-concept.adoc Outdated Show resolved Hide resolved
@quarkus-bot

This comment has been minimized.

@quarkus-bot

This comment has been minimized.

@ebullient ebullient force-pushed the docs branch 5 times, most recently from 7050c10 to 7566366 Compare June 7, 2022 16:26
@ebullient ebullient changed the title Docs: Diataxis framework templates (draft) Docs: Diataxis framework templates Jun 7, 2022
@ebullient ebullient force-pushed the docs branch 4 times, most recently from 33caba8 to c3a9760 Compare June 8, 2022 22:29

=== Using a source file

We are going to write the code for this tutorial in separate Java files, which brings us the benefit of syntax highlighting and an improved ability to ensure the code we're referencing makes sense as a whole.
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add a blurp stating including directly in adoc is ok?

Copy link
Contributor

@maxandersen maxandersen left a comment

Choose a reason for hiding this comment

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

LGTM.

does not change or affect current layout and let us get moving on getting diataxis doc approach going and evolve to what goes into website/docs sites.

Quarkus Documentation automation moved this from Review pending to Reviewer approved Jun 29, 2022
@maxandersen maxandersen merged commit cc52692 into quarkusio:main Jun 29, 2022
Quarkus Documentation automation moved this from Reviewer approved to Done Jun 29, 2022
@quarkus-bot quarkus-bot bot added this to the 2.11 - main milestone Jun 29, 2022

[source,shell]
----
$ ./mvnw clean install -Dquickly \ #<1>
Copy link
Contributor

Choose a reason for hiding this comment

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

@ebullient clean install is the default goal for the profile quickly, so maybe you could leave it out for taciturnity?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure. new PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in #26664

@ebullient ebullient deleted the docs branch July 6, 2022 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Documentation revision / reorganization
5 participants