Check out the Red programming language from the same author
En /

Using REBOL's MakeDoc

Cheyenne can invoke any number of formating scripts in an RSP script but this one is about Carl Sassenrath's MakeDoc.

MakeDoc Documentation

The Goal

The goal of using MakeDoc in RSP is to make it easy to add documents to your site.

MakeDoc does this but in its use in applications such as blogging, it is not fully dynamic.

Using MakeDoc with Cheyenne will allow you to:

  • use a text editor with a simple format to create documentation
  • render that content is a good looking format by using MakeDoc

How To Use MakeDoc in Cheyenne

There are a couple of options (provided by Doc)

  1. add a simple script that will parse source content and display HTML
  2. use an alias

As of 25-Sep-2009, the Alias setup is not yet tested.

How to Implement

  1. download makedoc2.r from the REBOL script library and store it where an RSP script will be allowed to invoke it
  2. create an RSP script which will read a text file and print HTML - should be just a few lines

@ <%

        do/args %makedoc2.r 'load-only 
	if all [
		none? validate/full [doc - *]
		exists? file: to-file request/content/doc
	][  
           print second gen-html scan-doc read file
	]

%>@

MakeDoc Invocation

To use make-doc you need to load the script as part of the use demonstrated above.

So:

  • download the current makedoc2.r file
  • store it on your server
  • invoke it using the do-args option to load MakeDoc

Usage

Now you can simply



Page last modified on September 26, 2009, at 12:58 AM
Powered by Cheyenne Web Server - © Softinnov