Asciidoctor as content managment

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Asciidoctor as content managment

smigielski
Hi, I am thinking of using asciidoc files  in some kind of basic git cms for storing product related content (name, description, files, price and so on). There will be only few products so maintaining it in files make complete sense for me. Because I've already got all html files prepared I plan to use wicket framework for presentation and some simple business logic.

So to clarify the context is asciidoc file -> read by java application and loaded to Product model -> presented in wicket template each part of product description in different places.

And first question is if it is, in your opinion proper use case for asciidoc markup? Maybe I should use xml or any other markup format for that kind of job and put asciidoc fragments only in strictly text content?

I feel like it is good idea to stay with pure asciidoc because of simplicity for content editors so how can I leverage content chunking for that purpose. I've checkout asciidoctor-java-integration but I can't find the way of retrieving different parts of main text based on block role or style. Can it be achieved somehow by manipulating input parameters or by extending java to ruby integration?

I would be glad for any hints or thoughts!

Cheers,
Marek
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor as content managment

LightGuardjp
I don't see a problem doing this as Asciidoc, it should work fine. You should be able to get access to the parsed document via the integration lib, Alex?


On Sun, Oct 6, 2013 at 2:47 AM, smigielski [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi, I am thinking of using asciidoc files  in some kind of basic git cms for storing product related content (name, description, files, price and so on). There will be only few products so maintaining it in files make complete sense for me. Because I've already got all html files prepared I plan to use wicket framework for presentation and some simple business logic.

So to clarify the context is asciidoc file -> read by java application and loaded to Product model -> presented in wicket template each part of product description in different places.

And first question is if it is, in your opinion proper use case for asciidoc markup? Maybe I should use xml or any other markup format for that kind of job and put asciidoc fragments only in strictly text content?

I feel like it is good idea to stay with pure asciidoc because of simplicity for content editors so how can I leverage content chunking for that purpose. I've checkout asciidoctor-java-integration but I can't find the way of retrieving different parts of main text based on block role or style. Can it be achieved somehow by manipulating input parameters or by extending java to ruby integration?

I would be glad for any hints or thoughts!

Cheers,
Marek


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Asciidoctor-as-content-managment-tp723.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor as content managment

mojavelinux
Administrator
In reply to this post by smigielski

Marek,

I think this is a great idea to explore, especially with this statement in mind:

> I feel like it is good idea to stay with pure asciidoc because of simplicity for content editors.

Precisely.

As with anything, the use of AsciiDoc can be taken too far. You just have to pay attention to how it feels. If it begins to feel awkward, even forced, in certain contexts, that's when you need to challenge your assumption that it's a reasonable approach. Ideas, like materials, are strongest when combined.

On Oct 6, 2013 2:47 AM, "smigielski [via Asciidoctor :: Discussion]" <[hidden email]> wrote:

> I've checkout asciidoctor-java-integration but I can't find the way of retrieving different parts of main text based on block role or style. Can it be achieved somehow by manipulating input parameters or by extending java to ruby integration?

As Jason mentioned, this is possible, but not yet exposed out of the box. Java can read any information from Ruby objects, as the extension API integration proves, but it requires some type mappings to be put in place. That's planned for the Java integration. For now, you could study the extensions package to get an idea of how it's done.

I'm very interested to follow your experiment using AsciiDoc for this purpose!

-Dan

Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor as content managment

mojavelinux
Administrator
In reply to this post by smigielski

I'll point out that if you understand how objects get shared between Java and Ruby, you'll quickly become one of the foremost experts on the subject :) This is certainly cutting edge stuff.

-Dan

Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor as content managment

smigielski
It seems that it is high time for me to learn a bit of ruby. Let me see what I can do and if I get to some problems I will ask for help. 

Cheers,
Marek


On 8 October 2013 02:39, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:

I'll point out that if you understand how objects get shared between Java and Ruby, you'll quickly become one of the foremost experts on the subject :) This is certainly cutting edge stuff.

-Dan




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Asciidoctor-as-content-managment-tp723p752.html
To unsubscribe from Asciidoctor as content managment, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor as content managment

smigielski
Actually it wasn't that bad. You can take a look of my changes in branch in github:

https://github.com/smigielski/asciidoctor-java-integration/tree/structureddocuments

https://github.com/smigielski/asciidoctor-java-integration/commit/051ad97ef1efc30a466a3a20230901581a81fcf3


The only problem I had was with the lists that is defined as a block in asciidoc file. Instead of getting content of that block I was getting the list of ListItem because List class overwrites content function. I don't know if it is by purpose or by mistake so I've just render that block into string.

I've also write some test for this feature but I'm not an expert in asciidoc so if you think some more is necessary just suggest what else should be checked.

Cheers,
Marek