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

Add a prototype for asciidoc #41

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
18 changes: 18 additions & 0 deletions prototypes/prototype.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
:author: Han Solo <[email protected]>; Frodo Baggins <[email protected]>
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this duplication? If there is a reason for 'author' and 'state' in adoc attributes, then I say we should drop the jekyll-format frontmatter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@trentm asciidoc does make use of this attribute somehow, somewhere. If you look at the rendered HTML, it has a placeholder for this value:

image

The front-matter for jekyll is purely for Jekyll. asciidoc ignores it completely (and though does save the value for reference, the content of the front-matter is un-indexable by asciidoc thereby rendering it effectively useless to asciidoc). I'm indifferent to its presence despite the fact that it doesn't add any value to the meaning of the content and also doesn't improve Github's rendering of the document (compare GH's rendering of asciidoc vs the actual asciidoctor-rendered version at https://cdn.rawgit.com/joyent/rfd/1bc065db/rfd/0106/README.html). I assumed the front-matter was being used somehow by one of our tools and was therefore a structurally important thing to leave in place for compatibility reasons.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, the front matter is being parsed by the chat bot, and I think by 'make check'. I think I'd prefer we just use the asciidoc attributes, and drop the jekyll front-matter for .adoc RFDs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated rfdlint to validate the titles for .adoc files. rfdlint is using = as its doc title token, not #: https://github.com/joyent/rfd/blob/master/tools/rfdlint#L131-L133

As for the chat bots, I haven't touched them but suspect it would be a similar change.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yup, thanks. I updated the new chatbot (joybot1999) already. I'll get the current jabber bot.

Copy link
Contributor

Choose a reason for hiding this comment

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

I lied, I won't get the current jabber bot. Meh, if we are going to move away from it in the next couple of weeks.

:state: predraft
:revremark: State: {state}
Copy link
Contributor

Choose a reason for hiding this comment

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

I know/suspect this came from RFD 77's example. Do we care to have this? /cc @arekinath
My goal here is to reduce boilerplate we don't need.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

:revmark: is the important attribute. I think @arekinath's example was correct in teasing the :state: attribute out from the :revmark: attribute.


:showtitle:
:toc: left
:numbered:
:icons: font

////
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.

Copyright 2017 <contribution>
////

# RFD <Number> <Title>
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want "# ..." for the h1 or "= ..." as the AsciiDoc user-guide seems to suggest? (Note that 'make check' and the bot tooling don't yet recognize "= ...".)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd advocate for = in order to be idiomatic. The token alias is nice, but we shouldn't rely on it.

When in Rome, do as the Romans do.