REMARK - Html dialecting.

1. How does it work!
2. Creating the web files...
3. custom tags
3.1. There are two ways to add your own custom html tags:
4. Persistent parsing
5. Is remark a cgi-based solution?
5.1. Not YET!

1. How does it work!

you basically write your html as normal, usually within a text editor. Then you create custom tags. Then you can include those tags into your html and they will be subsituted by the tag definition.

This simplifies the creation of a site so much... you can set it up so that you forget about layout or structure and only care about content.

you can include custom tags within the return markup which your tags generate, this means that you can program your site without really needing to understand cgi! For example, if you setup a custom tag called <date!> then you can simply use it in any html source to have its content placed there.

The beauty lies in that you continue building normal html pages and can extend the html language itself.

You do not have to learn a new mark-up language, use a complex dialect, or fiddle around in a visual editor, which often doesn't help you solve many issues.

2. Creating the web files...

Remark will load all the pages you have in a source html directory structure (which includes an unlimited depth of subdirectories), one file at a time, and will create an exact replica of that file in the destination html output directory, but with all custom tags interpreted and converted to standard html code.

The remark ui will simply allow you to rebuild the whole site, often needed when core custom tags are changed.

It can also rebuild only the files which have been changed since it was last launched, making this much faster to update a site, when the custom tag definitions do not change.

You can also ask it to update ONLY the very latest file, making it really fast to see the effects of any edits you while editing a page.

3. custom tags

3.1. There are two ways to add your own custom html tags:

  • extensions can be created by generating template html files which are included in-line whenever they are encountered. Note that these files are parsed like any other custom tag, so that it can include dynamic tags as if it where part of the current page.
  • evaluated tags can be created which run according to the dialect which is included in the object... basically, you implement a function which evaluates the tag's content and returns a string containing html code. But you are only concerned with that tag locally, and can forget about the rest of the page.

4. Persistent parsing

This is tricky to understand but is where the engine sets itself appart.

Every time a tag is parsed, it checks if the return is different than what sent. If there where changes, it reparses it again, in case more custom tags are part of the returned markup.

This process is done inside out so that the deepest part of a page will always be available when its parent needs it.

In more obvious terms, this means that you can include custom tags as part of the html data a custom tag returns and it will be reparsed. In a sense, its almost as if a web page becomes a self-evaluating cgi-script. I often refer to remark enabled html pages as html applications. It also allows you to have recursive html tags!!!

As an example, the following html source will create this page

<title! An example page. >
<header!>
<toc!>
<itopic! not much of a topic if you ask me>

<p> This is not much content either... But notice that we have 
all the menus, a nav bar on top an links on the bottom.</p>

<p> Also take note that the <header!> tag is not built in one go... it is 
constituted of an assembly of many other dynamic and static tags.</P>

<isubject! The point is you build your own tags>

<p> Although the basic repack distribution can contain some basic 
tags, the point is for you to build your own tags and create the 
layout, look and feel that you want, without having to 
maintain an extensive library of cgi scripts.</p>

<p> scan the html source, you'll see that the page contains a 
lot of nested structured tables which would be extremely complex to
edit manually, especially when you are not using cgi, cause 
you do not need the actual site to be dynamic.</p>

<footer!>

5. Is remark a cgi-based solution?

5.1. Not YET!

remark does not yet have an argument evaluation method. Nor does it have a network "stay alive" mode, which would allow it to return pages faster, cause it would not need to load all the custom tags before parsing the html.

That being said, it would be very easy to add such capabilities and if you ask for it, I might help you into making it what you need.

It would be very easy to set it up as a cgi script which serves a chosen file, and maybe even make it link all the different custom tags into a single source which is faster to execute.

I'm open to your suggestions and would be happy to tailor remark.r to your needs!




last updated: 27-Jul-2004/0:56:45-4:00