-
Notifications
You must be signed in to change notification settings - Fork 335
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 legacy watcher documentation to Asciidoctor #821
Conversation
Switches the core of the documentation build from the unmaintained AsciiDoc project to the actively developer Asciidoctor project.
I pushed a https://github.com/elastic/x-pack/commit/59fcc36005ca9ab364524521c851d811f025dd44 to clean up a few small issues to prepare the docs for Asciidoctor. Here is the diff after those changes: actions.html: - AsciiDoc
+ Asciidoctor
@@ -1579,72 +1579,76 @@
<div class="itemizedlist">
<ul class="itemizedlist" type="disc">
<li class="listitem">
- <p class="simpara">
- When setting the
- <code class="literal">
- body
- </code>
- object, at least one of its
- <code class="literal">
- text
- </code>
- or
- <code class="literal">
- html
- </code>
- fields must be defined.
- </p>
- <div class="variablelist">
- <a id="email-address">
- </a>
- <dl class="variablelist">
- <dt>
- <span class="term">
- Email Address
- </span>
- </dt>
- <dd>
- An email address can contain two possible parts—the address itself and an optional personal name as described in
- <a class="ulink" href="http://www.ietf.org/rfc/rfc822.txt" target="_top">
- RFC 822
- </a>
- . The address can be represented either as a string of the form
- <code class="literal">
- user@host.domain
- </code>
- or
- <code class="literal">
- Personal Name <user@host.domain>
- </code>
- . You can also specify an email address as an object that contains
- <code class="literal">
- name
- </code>
- and
- <code class="literal">
- address
- </code>
- fields.
- </dd>
- <dt>
- <span class="term">
- Address List
- </span>
- </dt>
- <dd>
- A list of addresses can either be specified as a comma-delimited string or as an array:
- <code class="literal">
- 'Personal Name <user1@host.domain>, user2@host.domain'
- </code>
- or
- <code class="literal">
- [ 'Personal Name <user1@host.domain>', 'user2@host.domain' ]
- </code>
- </dd>
- </dl>
- </div>
+ When setting the
+ <code class="literal">
+ body
+ </code>
+ object, at least one of its
+ <code class="literal">
+ text
+ </code>
+ or
+ <code class="literal">
+ html
+ </code>
+ fields must be defined.
</li>
</ul>
+ </div>
+ <div class="variablelist">
+ <a id="email-address">
+ </a>
+ <dl class="variablelist">
+ <dt>
+ <span class="term">
+ Email Address
+ </span>
+ </dt>
+ <dd>
+ An email address can contain two possible parts—the address itself and an optional personal name as described in
+ <a class="ulink" href="http://www.ietf.org/rfc/rfc822.txt" target="_top">
+ RFC 822
+ </a>
+ . The address can be represented either as a string of the form
+ <code class="literal">
+ user@host.domain
+ </code>
+ or
+ <code class="literal">
+ Personal Name <user@host.domain>
+ </code>
+ . You can also specify an email address as an object that contains
+ <code class="literal">
+ name
+ </code>
+ and
+ <code class="literal">
+ address
+ </code>
+ fields.
+ </dd>
+ </dl>
+ </div>
+ <div class="variablelist">
+ <a id="address-list">
+ </a>
+ <dl class="variablelist">
+ <dt>
+ <span class="term">
+ Address List
+ </span>
+ </dt>
+ <dd>
+ A list of addresses can either be specified as a comma-delimited string or as an array: +
+ <code class="literal">
+ 'Personal Name <user1@host.domain>, user2@host.domain'
+ </code>
+ or
+ <code class="literal">
+ [ 'Personal Name <user1@host.domain>', 'user2@host.domain' ]
+ </code>
+ </dd>
+ </dl>
</div>
</div>
</div> It took me a while to see the difference in the rendered page - the variables actions.html: - AsciiDoc
+ Asciidoctor
"throttle_period" : "5m", <a id="CO28-3"></a><span><img alt="" src="images/icons/callouts/3.png"/></span>
"webhook" : {
"method" : "POST", <a id="CO28-4"></a><span><img alt="" src="images/icons/callouts/4.png"/></span>
- "host" : "mylisteningserver", <a id="CO28-5"></a><span><img alt="" src="images/icons/callouts/5.png"/></span>
- "port" : 9200, <a id="CO28-6"></a><span><img alt="" src="images/icons/callouts/6.png"/></span>
+ "host" : "mylisteningserver", <a id="CO28-5"></a><span><img alt="" src="images/icons/callouts/5.png"/></span>
+ "port" : 9200, <a id="CO28-6"></a><span><img alt="" src="images/icons/callouts/6.png"/></span>
"path": ":/{{ctx.watch_id}", <a id="CO28-7"></a><span><img alt="" src="images/icons/callouts/7.png"/></span>
- "body" : "{{ctx.watch_id}}:{{ctx.payload.hits.total}}" <a id="CO28-8"></a><span><img alt="" src="images/icons/callouts/8.png"/></span>
+ "body" : "{{ctx.watch_id}}:{{ctx.payload.hits.total}}" <a id="CO28-8"></a><span><img alt="" src="images/icons/callouts/8.png"/></span>
}
}
}</pre> The tab is carying over into the output. This is fine. It happens a few more times but I'll won't call them out. configuring-hipchat.html: - AsciiDoc
+ Asciidoctor
@@ -832,7 +832,7 @@
</p>
<div class="informalfigure">
<div class="mediaobject">
- <img alt="images/hipchat-generate-room-token.jpg" src="images/hipchat-generate-room-token.jpg"/>
+ <img alt="hipchat generate room token" src="images/hipchat-generate-room-token.jpg"/>
</div>
</div>
</li>
@@ -864,7 +864,7 @@
</p>
<div class="informalfigure">
<div class="mediaobject">
- <img alt="images/hipchat-copy-room-token.jpg" src="images/hipchat-copy-room-token.jpg"/>
+ <img alt="hipchat copy room token" src="images/hipchat-copy-room-token.jpg"/>
</div>
</div>
</li>
@@ -1003,7 +1003,7 @@
</p>
<div class="informalfigure">
<div class="mediaobject">
- <img alt="images/hipchat-generate-user-token.jpg" src="images/hipchat-generate-user-token.jpg"/>
+ <img alt="hipchat generate user token" src="images/hipchat-generate-user-token.jpg"/>
</div>
</div>
</li>
@@ -1044,7 +1044,7 @@
</p>
<div class="informalfigure">
<div class="mediaobject">
- <img alt="images/hipchat-copy-room-token.jpg" src="images/hipchat-copy-room-token.jpg"/>
+ <img alt="hipchat copy room token" src="images/hipchat-copy-room-token.jpg"/>
</div>
</div>
</li>
@@ -1209,7 +1209,7 @@
</p>
<div class="informalfigure">
<div class="mediaobject">
- <img alt="images/hipchat-generate-v1-token.jpg" src="images/hipchat-generate-v1-token.jpg"/>
+ <img alt="hipchat generate v1 token" src="images/hipchat-generate-v1-token.jpg"/>
</div>
</div>
</li>
@@ -1241,7 +1241,7 @@
</p>
<div class="informalfigure">
<div class="mediaobject">
- <img alt="images/hipchat-copy-v1-token.jpg" src="images/hipchat-copy-v1-token.jpg"/>
+ <img alt="hipchat copy v1 token" src="images/hipchat-copy-v1-token.jpg"/>
</div>
</div>
</li> These are ever so slightly better. This happens a few more times. I won't call it out again. troubleshooting.html: - AsciiDoc
+ Asciidoctor
@@ -610,7 +610,7 @@
</ul>
</div>
<h3>
- <a id="_logstash_can_8217_t_connect_to_elasticsearch_after_installing_watcher">
+ <a id="_logstash_cant_connect_to_elasticsearch_after_installing_watcher">
</a>
Logstash Can’t Connect to Elasticsearch after Installing Watcher
</h3> I don't think this kind of thing is a big deal in our legacy docs. watching-time-series-data.html: - AsciiDoc
+ Asciidoctor
@@ -671,17 +671,17 @@
<p>
Checks the feed every hour.
</p>
- <p>
- For more information see
- <a class="ulink" href="http://www.elastic.co/guide/en/logstash/2.0/plugins-outputs-elasticsearch.html" target="_top">
- Elasticsearch output
- </a>
- in the Logstash Reference.
- </p>
</td>
</tr>
</table>
</div>
+ <p class="simpara">
+ For more information see
+ <a class="ulink" href="http://www.elastic.co/guide/en/logstash/2.0/plugins-outputs-elasticsearch.html" target="_top">
+ Elasticsearch output
+ </a>
+ in the Logstash Reference.
+ </p>
</li>
<li class="listitem">
<p class="simpara"> This unindents that paragraph which still looks fine to me. watching-time-series-data.html: - AsciiDoc
+ Asciidoctor
@@ -802,23 +802,23 @@
<p>
The threshold parameter value you want to pass to the script.
</p>
- <div class="note admon">
- <div class="icon">
- <img alt="Note" src="images/icons/note.png"/>
- </div>
- <div class="admon_content">
- <p>
- We recommend using file scripts when possible. To use inline or indexed scripts, you must
- <a class="ulink" href="http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-scripting.html" target="_top">
- enable dynamic scripting
- </a>
- in Elasticsearch.
- </p>
- </div>
- </div>
</td>
</tr>
</table>
+ </div>
+ <div class="note admon">
+ <div class="icon">
+ <img alt="Note" src="images/icons/note.png"/>
+ </div>
+ <div class="admon_content">
+ <p>
+ We recommend using file scripts when possible. To use inline or indexed scripts, you must
+ <a class="ulink" href="http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-scripting.html" target="_top">
+ enable dynamic scripting
+ </a>
+ in Elasticsearch.
+ </p>
+ </div>
</div>
</li>
<li class="listitem"> This unindents that paragraph which still looks fine to me. |
I'm seeing an extra "+" in actions.html in 2.4, but I am not convinced it's a big enough issue to warrant fixing in these out-dated docs: (The left screen is the live documentation, the right is the new output). I've addressed via https://github.com/elastic/x-pack/commit/67bb8e36e3645f75908f738456ed024b927b6010 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It looks like you removed the |
Thanks for reviewing @lcawl! |
Switches the core of the documentation build from the unmaintained
AsciiDoc project to the actively developer Asciidoctor project.