You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by Dan Haywood <da...@haywood-associates.co.uk> on 2017/03/16 18:09:00 UTC

'Edit' button on the generated docs on our website

Hi folks,

Just to bring to your attention, our Asciidoc-generated website now
features an 'Edit' button for each generated document (or subdocument); see
for example [1].  The magic is done by this asciidoc extension [2].

When you click edit, you should end up at github editing the corresponding
file; hitting save will allow a pull request to be raised.

If you try it out and hit any snags, do say.

Thx
Dan

[1] http://isis.apache.org/guides/ugfun.html#_ugfun_core-concepts
[2] https://github.com/incodehq/asciidoctor-extension-improvethisdoc

Re: 'Edit' button on the generated docs on our website

Posted by Martin Grigorov <mg...@apache.org>.
Hi Dan,

I've tried to make use of your plugin but for some reason it does nothing
for the HTML output. That is, there is no "Edit3" button in the generated
single.html.

But it does something for the generation of the PDF - it breaks the build!

Mar 24, 2017 1:27:41 PM org.asciidoctor.internal.JRubyAsciidoctor renderFile
SEVERE: (NameError) no method 'process' for arguments
(org.jruby.RubyObjectVar9,org.jruby.RubyObjectVar9) on
Java::OrgIncodeAsciidoctorExtensionsImprovethisdoc::ImproveThisDocumentPostprocessor
  available overloads:
    (org.asciidoctor.ast.Document,java.lang.String)
    (org.asciidoctor.ast.DocumentRuby,java.lang.String)

I've updated asciidoc maven plugin itself and all dependencies but this
doesn't help

My changes are in branch 'feature/use-improveme-asciidoc-plugin'' :
https://git1-us-west.apache.org/repos/asf?p=wicket.git;a=commitdiff;h=33d1b241;hp=3179d34971878dc7755b629baf459d1a494601d7

Any hints what is misconfigured ?
Thanks!



Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Sat, Mar 18, 2017 at 2:37 PM, Andrea Del Bene <an...@gmail.com>
wrote:

> Very nice!
>
>
>
> On 17/03/2017 11:58, Martin Grigorov wrote:
>
>> Thanks for the explanation, Dan!
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Fri, Mar 17, 2017 at 11:46 AM, Dan Haywood <
>> dan@haywood-associates.co.uk>
>> wrote:
>>
>> Not that difficult, Martin...  the installation is documented at [1]
>>>
>>> The only issue I foresee is the parsing of the "docfile" attribute to
>>> determine the corresponding path in the github repo.
>>>
>>> In the case of Isis our docs live under "adocs/documentation/..." and so
>>> the value of "docfile" is something like "
>>> C:/APACHE/isis-git-rw/adocs/documentation/src/main/
>>> asciidoc/migration-notes.adoc"
>>>
>>> The configuration properties in the pom.xml [2] specify
>>> "adocs/documentation" and "src/main/asciidoc" as 'anchors', and the regex
>>> in the extension [3] uses these to infer the rest of the path.
>>>
>>> So with a bit of luck you'll just need to register the extension and set
>>> the appropriate "improvethisdoc.xxx" properties.
>>>
>>> HTH
>>> Dan
>>>
>>>
>>> [1]
>>> https://github.com/incodehq/asciidoctor-extension-
>>> improvethisdoc#installation
>>> [2]
>>> https://github.com/apache/isis/blob/master/adocs/
>>> documentation/pom.xml#L220
>>>
>>> [3
>>> https://github.com/incodehq/asciidoctor-extension-
>>> improvethisdoc/blob/master/src/main/java/org/incode/
>>> asciidoctor/extensions/improvethisdoc/ImproveThisDocumentPostprocess
>>> or.java#L203
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Fri, 17 Mar 2017 at 10:38 Martin Grigorov <mg...@apache.org>
>>> wrote:
>>>
>>> Hi,
>>>>
>>>> Do you think this would be useful for the guide ?
>>>>
>>>> The changes in Isis are rather big [3] and I am not sure how much work
>>>> it
>>>> is to do the same for our guide.
>>>>
>>>> 3. https://issues.apache.org/jira/browse/ISIS-1594
>>>>
>>>>
>>>> Martin Grigorov
>>>> Wicket Training and Consulting
>>>> https://twitter.com/mtgrigorov
>>>>
>>>> ---------- Forwarded message ----------
>>>> From: Dan Haywood <da...@haywood-associates.co.uk>
>>>> Date: Thu, Mar 16, 2017 at 7:09 PM
>>>> Subject: 'Edit' button on the generated docs on our website
>>>> To: users <us...@isis.apache.org>
>>>> Cc: dev <de...@isis.apache.org>
>>>>
>>>>
>>>> Hi folks,
>>>>
>>>> Just to bring to your attention, our Asciidoc-generated website now
>>>> features an 'Edit' button for each generated document (or subdocument);
>>>>
>>> see
>>>
>>>> for example [1].  The magic is done by this asciidoc extension [2].
>>>>
>>>> When you click edit, you should end up at github editing the
>>>>
>>> corresponding
>>>
>>>> file; hitting save will allow a pull request to be raised.
>>>>
>>>> If you try it out and hit any snags, do say.
>>>>
>>>> Thx
>>>> Dan
>>>>
>>>> [1] http://isis.apache.org/guides/ugfun.html#_ugfun_core-concepts
>>>> [2] https://github.com/incodehq/asciidoctor-extension-improvethisdoc
>>>>
>>>>
>

Re: 'Edit' button on the generated docs on our website

Posted by Andrea Del Bene <an...@gmail.com>.
Very nice!


On 17/03/2017 11:58, Martin Grigorov wrote:
> Thanks for the explanation, Dan!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Mar 17, 2017 at 11:46 AM, Dan Haywood <da...@haywood-associates.co.uk>
> wrote:
>
>> Not that difficult, Martin...  the installation is documented at [1]
>>
>> The only issue I foresee is the parsing of the "docfile" attribute to
>> determine the corresponding path in the github repo.
>>
>> In the case of Isis our docs live under "adocs/documentation/..." and so
>> the value of "docfile" is something like "
>> C:/APACHE/isis-git-rw/adocs/documentation/src/main/
>> asciidoc/migration-notes.adoc"
>>
>> The configuration properties in the pom.xml [2] specify
>> "adocs/documentation" and "src/main/asciidoc" as 'anchors', and the regex
>> in the extension [3] uses these to infer the rest of the path.
>>
>> So with a bit of luck you'll just need to register the extension and set
>> the appropriate "improvethisdoc.xxx" properties.
>>
>> HTH
>> Dan
>>
>>
>> [1]
>> https://github.com/incodehq/asciidoctor-extension-
>> improvethisdoc#installation
>> [2]
>> https://github.com/apache/isis/blob/master/adocs/
>> documentation/pom.xml#L220
>>
>> [3
>> https://github.com/incodehq/asciidoctor-extension-
>> improvethisdoc/blob/master/src/main/java/org/incode/
>> asciidoctor/extensions/improvethisdoc/ImproveThisDocumentPostprocess
>> or.java#L203
>>
>>
>>
>>
>>
>>
>> On Fri, 17 Mar 2017 at 10:38 Martin Grigorov <mg...@apache.org> wrote:
>>
>>> Hi,
>>>
>>> Do you think this would be useful for the guide ?
>>>
>>> The changes in Isis are rather big [3] and I am not sure how much work it
>>> is to do the same for our guide.
>>>
>>> 3. https://issues.apache.org/jira/browse/ISIS-1594
>>>
>>>
>>> Martin Grigorov
>>> Wicket Training and Consulting
>>> https://twitter.com/mtgrigorov
>>>
>>> ---------- Forwarded message ----------
>>> From: Dan Haywood <da...@haywood-associates.co.uk>
>>> Date: Thu, Mar 16, 2017 at 7:09 PM
>>> Subject: 'Edit' button on the generated docs on our website
>>> To: users <us...@isis.apache.org>
>>> Cc: dev <de...@isis.apache.org>
>>>
>>>
>>> Hi folks,
>>>
>>> Just to bring to your attention, our Asciidoc-generated website now
>>> features an 'Edit' button for each generated document (or subdocument);
>> see
>>> for example [1].  The magic is done by this asciidoc extension [2].
>>>
>>> When you click edit, you should end up at github editing the
>> corresponding
>>> file; hitting save will allow a pull request to be raised.
>>>
>>> If you try it out and hit any snags, do say.
>>>
>>> Thx
>>> Dan
>>>
>>> [1] http://isis.apache.org/guides/ugfun.html#_ugfun_core-concepts
>>> [2] https://github.com/incodehq/asciidoctor-extension-improvethisdoc
>>>


Re: 'Edit' button on the generated docs on our website

Posted by Martin Grigorov <mg...@apache.org>.
Thanks for the explanation, Dan!

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Mar 17, 2017 at 11:46 AM, Dan Haywood <da...@haywood-associates.co.uk>
wrote:

> Not that difficult, Martin...  the installation is documented at [1]
>
> The only issue I foresee is the parsing of the "docfile" attribute to
> determine the corresponding path in the github repo.
>
> In the case of Isis our docs live under "adocs/documentation/..." and so
> the value of "docfile" is something like "
> C:/APACHE/isis-git-rw/adocs/documentation/src/main/
> asciidoc/migration-notes.adoc"
>
> The configuration properties in the pom.xml [2] specify
> "adocs/documentation" and "src/main/asciidoc" as 'anchors', and the regex
> in the extension [3] uses these to infer the rest of the path.
>
> So with a bit of luck you'll just need to register the extension and set
> the appropriate "improvethisdoc.xxx" properties.
>
> HTH
> Dan
>
>
> [1]
> https://github.com/incodehq/asciidoctor-extension-
> improvethisdoc#installation
> [2]
> https://github.com/apache/isis/blob/master/adocs/
> documentation/pom.xml#L220
>
> [3
> https://github.com/incodehq/asciidoctor-extension-
> improvethisdoc/blob/master/src/main/java/org/incode/
> asciidoctor/extensions/improvethisdoc/ImproveThisDocumentPostprocess
> or.java#L203
>
>
>
>
>
>
> On Fri, 17 Mar 2017 at 10:38 Martin Grigorov <mg...@apache.org> wrote:
>
> > Hi,
> >
> > Do you think this would be useful for the guide ?
> >
> > The changes in Isis are rather big [3] and I am not sure how much work it
> > is to do the same for our guide.
> >
> > 3. https://issues.apache.org/jira/browse/ISIS-1594
> >
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > ---------- Forwarded message ----------
> > From: Dan Haywood <da...@haywood-associates.co.uk>
> > Date: Thu, Mar 16, 2017 at 7:09 PM
> > Subject: 'Edit' button on the generated docs on our website
> > To: users <us...@isis.apache.org>
> > Cc: dev <de...@isis.apache.org>
> >
> >
> > Hi folks,
> >
> > Just to bring to your attention, our Asciidoc-generated website now
> > features an 'Edit' button for each generated document (or subdocument);
> see
> > for example [1].  The magic is done by this asciidoc extension [2].
> >
> > When you click edit, you should end up at github editing the
> corresponding
> > file; hitting save will allow a pull request to be raised.
> >
> > If you try it out and hit any snags, do say.
> >
> > Thx
> > Dan
> >
> > [1] http://isis.apache.org/guides/ugfun.html#_ugfun_core-concepts
> > [2] https://github.com/incodehq/asciidoctor-extension-improvethisdoc
> >
>

Re: 'Edit' button on the generated docs on our website

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Not that difficult, Martin...  the installation is documented at [1]

The only issue I foresee is the parsing of the "docfile" attribute to
determine the corresponding path in the github repo.

In the case of Isis our docs live under "adocs/documentation/..." and so
the value of "docfile" is something like "
C:/APACHE/isis-git-rw/adocs/documentation/src/main/asciidoc/migration-notes.adoc"

The configuration properties in the pom.xml [2] specify
"adocs/documentation" and "src/main/asciidoc" as 'anchors', and the regex
in the extension [3] uses these to infer the rest of the path.

So with a bit of luck you'll just need to register the extension and set
the appropriate "improvethisdoc.xxx" properties.

HTH
Dan


[1]
https://github.com/incodehq/asciidoctor-extension-improvethisdoc#installation
[2]
https://github.com/apache/isis/blob/master/adocs/documentation/pom.xml#L220

[3
https://github.com/incodehq/asciidoctor-extension-improvethisdoc/blob/master/src/main/java/org/incode/asciidoctor/extensions/improvethisdoc/ImproveThisDocumentPostprocessor.java#L203






On Fri, 17 Mar 2017 at 10:38 Martin Grigorov <mg...@apache.org> wrote:

> Hi,
>
> Do you think this would be useful for the guide ?
>
> The changes in Isis are rather big [3] and I am not sure how much work it
> is to do the same for our guide.
>
> 3. https://issues.apache.org/jira/browse/ISIS-1594
>
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> ---------- Forwarded message ----------
> From: Dan Haywood <da...@haywood-associates.co.uk>
> Date: Thu, Mar 16, 2017 at 7:09 PM
> Subject: 'Edit' button on the generated docs on our website
> To: users <us...@isis.apache.org>
> Cc: dev <de...@isis.apache.org>
>
>
> Hi folks,
>
> Just to bring to your attention, our Asciidoc-generated website now
> features an 'Edit' button for each generated document (or subdocument); see
> for example [1].  The magic is done by this asciidoc extension [2].
>
> When you click edit, you should end up at github editing the corresponding
> file; hitting save will allow a pull request to be raised.
>
> If you try it out and hit any snags, do say.
>
> Thx
> Dan
>
> [1] http://isis.apache.org/guides/ugfun.html#_ugfun_core-concepts
> [2] https://github.com/incodehq/asciidoctor-extension-improvethisdoc
>

Fwd: 'Edit' button on the generated docs on our website

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Do you think this would be useful for the guide ?

The changes in Isis are rather big [3] and I am not sure how much work it
is to do the same for our guide.

3. https://issues.apache.org/jira/browse/ISIS-1594


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

---------- Forwarded message ----------
From: Dan Haywood <da...@haywood-associates.co.uk>
Date: Thu, Mar 16, 2017 at 7:09 PM
Subject: 'Edit' button on the generated docs on our website
To: users <us...@isis.apache.org>
Cc: dev <de...@isis.apache.org>


Hi folks,

Just to bring to your attention, our Asciidoc-generated website now
features an 'Edit' button for each generated document (or subdocument); see
for example [1].  The magic is done by this asciidoc extension [2].

When you click edit, you should end up at github editing the corresponding
file; hitting save will allow a pull request to be raised.

If you try it out and hit any snags, do say.

Thx
Dan

[1] http://isis.apache.org/guides/ugfun.html#_ugfun_core-concepts
[2] https://github.com/incodehq/asciidoctor-extension-improvethisdoc