Skip to content

Asciidoc documentation into 2.x #1956

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 22 commits into from
Closed

Asciidoc documentation into 2.x #1956

wants to merge 22 commits into from

Conversation

russcam
Copy link
Contributor

@russcam russcam commented Mar 24, 2016

The feature/documentation branch is in a position where it would provide value to appear on the elastic docs site for the 2.x client, on a progession over perfection basis. A summary of the changes:

  • references AsciiDoc.dll library located in src/lib/dnx451. I will put this up on github and publish to nuget to reference from there when it is good for alpha (it works for our current purposes but is limited and can only output asciidocs for the moment). This library is used to modify the asciidocs generated from literate tests to perform such actions as adding attribute entries, section titles for usage pages, etc.
  • The structure of the asciidocs has been verified with the docs generation process using
./build_docs.pl --doc ~/docs/asciidoc/index.asciidoc

where ~ is the project root

  • Corrected the spelling of some directory names in the Tests project e.g. ClientConcepts/HighLevel/Inference, and moved the files to the new directory
  • Tidy up and elaborated descriptions for different client options, adding cross reference links where useful
  • Usage examples for all Query DSL and Aggregations calls

When writing out the ExpectJson accessor value, compile an assembly from the anonymous type string in order to serialize the type and get the json for it.
Temporarily checked in AsciiDoc assembly - will release something to MyGet/Nuget for this when MVP is done (e.g. Tables are not yet handled)
Lowercase and hyphenate all files
Support Callouts in documentation
Tidy up names of generated asciidoc files
Start bringing in usage documentation
Apply conventions to add a section title for Fluent DSL, Object Initializer Syntax and Handling Responses source code blocks
Move example json to below the initializer example
Ensure level 2 Section titles have an anchor generated
…hod block

Generate a Section Title and anchor if an asciidoc does not have one
remove named attribute method - the doc generation process expects a linenumbering attribute in index 2 of a source block's attributes.
Asciidoc seems to be picky about wanting the trailing slash in the attribute entry as opposed to being part of the image link
Fix indentation when the first character following the first set of tabs is an opening brace. This is a bit of a hack. there may be a nicer way of doing this but it works fine for the moment.

Add Aggs vs Aggregations section
# Conflicts:
#	src/Tests/Aggregations/Bucket/Filter/FilterAggregationUsageTests.cs
@Mpdreamz
Copy link
Member

🎈 🎉 🎆 🍰

Decent docs! Only 4 years in the making 😄

This new documentation that'll be part of elastic.co is gonna rock! Functionally everything looks good to me to merge however I have some prerequisites before merging this into the master and 2.x integration branches.

  • If AsciiDoc is not in a shape you want to publish it to nuget (prerelease works too here), we need to move the source under Litterateur itself so we can iterate over it. I much rather we publish this under a new github org that we're all part of and throw it on nuget as a prerelease package though, no need to goldplate before opensourcing.
  • Since this is a huge feature PR, I think this needs to be resend from a new branch where you cherry-pick all the actual commits, getting rid of the merge commits, squash them to a degree that makes sense, create a single asciidoc generation commit and send a new PR. This will greatly simplify pulling it into master as well

@gmarz
Copy link
Contributor

gmarz commented Mar 24, 2016

Awesome work @russcam !

Since this is a huge feature PR, I think this needs to be resend from a new branch where you cherry-pick all the actual commits, getting rid of the merge commits, squash them to a degree that makes sense, create a single asciidoc generation commit and send a new PR. This will greatly simplify pulling it into master as well

Would just rebasing against 2.x then squashing to a single commit be the same thing?

@Mpdreamz
Copy link
Member

that would not get rid of the merge commits with 2.x AFAIK

Unnecessary for both viewing asciidocs and generating documentation
@russcam
Copy link
Contributor Author

russcam commented Mar 25, 2016

If AsciiDoc is not in a shape you want to publish it to nuget (prerelease works too here), we need to move the source under Litterateur itself so we can iterate over it. I much rather we publish this under a new github org that we're all part of and throw it on nuget as a prerelease package though, no need to goldplate before opensourcing.

Happy to release to github under an org we can all work on it on - just letting you know it's a little messy in places. Feel free to slash and burn 😄

I'll cherry pick the commits out and squash them into one commit for the PR 👍

@russcam
Copy link
Contributor Author

russcam commented Mar 29, 2016

Closing to open a cherry-picked PR 👍

@russcam russcam closed this Mar 29, 2016
@russcam russcam deleted the feature/documentation branch March 29, 2016 04:28
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