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

Disable list continuation (attributes, conditional processing, and more?) #35

Open
fviolette opened this issue Nov 7, 2019 · 4 comments

Comments

@fviolette
Copy link

fviolette commented Nov 7, 2019

Hello,

I am trying to set up a workflow where product managers iterate on a release notes draft on Google Docs. When it's release time, I want to copy paste the AsciiDoc generated from the extension as-is to a new file and publish using Antora.

To this effect, I place attributes and conditional directives in the Gdoc but, unless I messed up with Docs formatting, the + sign is added to the end of lines with attributes and if macros.

This is a sample of a such a Gdoc (# == Title and ## == Heading 1 in the sample below):

# v2.18.0
:release-date: 2019.10.15
:gh-changelog: https://github.com/Company/app/compare/v2.17.0\...v2.18.0
:asana-changelog: https://app.asana.com/0/1144692386463428/list

ifdef::page-internal[]
include::partial$release-info.adoc[]
endif::[]

## New developments

…

## Other section

…

For information, the release-info partial looks like this:

_**Release date:** {release-date}_

Changes since the last release:

* {asana-changelog}[Asana dashboard]
* {gh-changelog}[GitHub changelog]

This is what I get from the conversion:

= v2.18.0

:release-date: 2019.10.15 +
:gh-changelog: https://github.com/Company/app/compare/v2.17.0\...v2.18.0 +
:asana-changelog: https://app.asana.com/0/1144692386463428/list

ifdef::page-internal[] +
include::partial$release-info.adoc[] +
endif::[]

== New developments

…

== Other section

…

When I publish to Antora, the ifdef macro is not resolved. If I remove the macro and try to output the attributes, I meet the same issue.

I believe you will understand my use case and may provide alternate solutions, if this looks too convoluted, but I have to say I have many more elaborate use cases in mind.

Thanks for your work and thanks in advance - casual contribution for business users is essential to technical docs.

@ggrossetie
Copy link
Owner

I am trying to set up a workflow where product managers iterate on a release notes draft on Google Docs.

👍

To this effect, I place attributes and conditional directives in the Gdoc but, unless I messed up with Docs formatting, the + sign is added to the end of lines with attributes and if macros.

I'm not sure if we should support it or not.
The idea is really to convert an Google Document written using the formatting tools. AsciiDoc attributes and conditional directives are part of the AsciiDoc syntax and, in my opinion, should not be written in a Google Document.

The workflow should be:

  • Product managers iterate/collaborate on Google Document
  • Convert the Google Document to AsciiDoc
  • Add the AsciiDoc attributes and conditional directives
  • Publish to Antora

@fviolette
Copy link
Author

The idea is really to convert an Google Document written using the formatting tools. AsciiDoc attributes and conditional directives are part of the AsciiDoc syntax and, in my opinion, should not be written in a Google Document.

Because of the above, I did not think this would work. Now that it almost works (because AsciiDoc is just plain text), I take a chance. It's a little bit much to ask vs. the current features and intent, yes.

I may post the logic I end up going for here for reference purpose.

@ggrossetie
Copy link
Owner

I think still the list continuation is used too aggressively so we might find a solution but I don't want to introduce too much logic to "understand" plain-text AsciiDoc syntax in a Google Document because I think it's conter-intuitive.
But I'm willing to make some adjustments if it can improve a common workflow.

@fviolette
Copy link
Author

Right! If other community members are interested by this use case or just modifying the list continuation behaviour, please chime in.

I see that I can store the metas in yaml, iterate via gulp and inject them in my files before publishing, so I'll dig this path separately.

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

No branches or pull requests

2 participants