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

Switch the ECS docs to Asciidoctor #813

Merged
merged 2 commits into from
Apr 17, 2019
Merged

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Apr 12, 2019

Switches the core of the docs build for the ECS docs from the
unmaintained AsciiDoc project to the actively developed Asciidoctor
project.

Switches the core of the docs build for the ECS docs from the
unmaintained AsciiDoc project to the actively developed Asciidoctor
project.
@nik9000 nik9000 mentioned this pull request Apr 12, 2019
@nik9000 nik9000 requested a review from karenzone April 12, 2019 14:09
@nik9000
Copy link
Member Author

nik9000 commented Apr 12, 2019

Needs elastic/ecs#430 to be merged and backported to the 1.0 branch before I can make a diff.

@nik9000 nik9000 marked this pull request as ready for review April 17, 2019 18:03
@nik9000
Copy link
Member Author

nik9000 commented Apr 17, 2019

@webmat, this is what merging the PR would do the generated docs. If you are ok
with these changes then we can merge this and your docs will be regenerated
using Asciidoctor when the docs next build.

ecs-faq.html:

- AsciiDoc
+ Asciidoctor
@@ -739,10 +739,10 @@
            is identical to ingesting the following JSON:
           </p>
           <div class="pre_wrapper">
-           <pre class="programlisting prettyprint lang-json">"user": {
-  "firstname": "Nicolas",
-  "lastname": "Ruflin"
-}</pre>
+           <pre class="programlisting prettyprint lang-json">    "user": {
+      "firstname": "Nicolas",
+      "lastname": "Ruflin"
+    }</pre>
           </div>
           <p>
            In Elasticsearch,

AsciiDoc seems to be eating the leading indentation. If don't mean to have it
the you are better off wrapping the snippet in ----s.

ecs-reference.html:

- AsciiDoc
+ Asciidoctor
@@ -621,7 +621,7 @@
            </ul>
           </div>
           <h3>
-           <a id="_my_events_don_8217_t_map_with_ecs">
+           <a id="_my_events_dont_map_with_ecs">
            </a>
            My events don’t map with ECS
            <a class="edit_me" href="https://github.com/elastic/ecs/edit/1.0/docs/index.asciidoc" rel="nofollow" title="Edit this page on GitHub">

These happen because you aren't explicit about your section titles. AsciiDoc's
rules for building these from the text are kind of weird. Asciidoctor's are
better, but sometimes the produce different output. Like this time. Sometimes
this means we get different page URLs too! Since it is just an anchor I'm
generally ok with changing these. Though you might want to be explicit here.

Copy link
Contributor

@karenzone karenzone left a comment

Choose a reason for hiding this comment

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

Awesome! LGTM

@nik9000 nik9000 merged commit da1548e into elastic:master Apr 17, 2019
@nik9000
Copy link
Member Author

nik9000 commented Apr 17, 2019

Thanks for reviewing @karenzone!

@webmat
Copy link
Contributor

webmat commented Apr 17, 2019

Awesome!

I guess I'll go update the make targets in the ECS repo now 🏃 😂

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