newsdev / archieml.org

The archieml.org website and hub for specification development
Other
81 stars 5 forks source link

Parse unstructured content alongside structured content #11

Open tonyfast opened 9 years ago

tonyfast commented 9 years ago

I have been looking for a client side equivalent to Jekyll pages for a while. Jekyll makes it really nearly any user to combine structured and unstructured data, but it requires a build step.

Archie contains both structured and unstructured information, but only the structured content is returned. Archie creates structured data with keys that a compiler can use later; keys are not important semantic information.

Jekyll pages export an object with the structure YAML front matter as fields and an extra variable content that contains the unstructured text string within the document. Then the structured data is placed in the appropriate places in the text string.

Archie data is already in he appropriate place, so if the keys are removed then only the important unstructured text should be left.

I modified Archie.js just slightly to create the behavior that I am suggesting. Now the archie.load returns a field __content__ that contains the plain Archie text without the keys because they only serve to structure the data, not to enhance the presentation.

This demo uses Archie to create structured HTML and structure JSON simultaneously. Archie is converted to both JSON and Markdown, it transitions nicely some styled Markdown elements.

archietse commented 9 years ago

We are proposing a new format that may do what you're suggesting here: Issue 13