App-Mowyw

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

mowyw - mowyw writes your websites (or: Moritz writes your websites ;-)

For license of this file see the notice at the end of the file

mowyw is an offline CMS, that means it process sources files and generates
output files from them, usually HTML files, but php files and others are
possible as well (with some limitations though).

For a formal and more complete description see the manpage at
<http://perlgeek.de/software/mowyw.1>

SHORT HOWTO:
-----------

choose an empty directory, and there create the three directories 
includes/
source/
online/

The `source/' directory contains the source files that will be processed by
mowyw. Each file in the `source/' directory is mapped to one file in the 
`online/'  directory. You should not write files into the `online/' directory
since they may be deleted or overwritten, and you should not modify existing
files in that directory since all changes are lost during the next run.
All files that might be included by others (including menus) should be in the
`includes' directory.

Now place a file index.html (or whatever you want it to be called) in the
'source/' directory.

If all your HTML files have a common header/footer, you may want to place them
in in the files `includes/header' and `includes/footer'.

For example `inlcudes/header' may contain

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" media="screen, projection" href="style.css" />
<link rel="stylesheet" type="text/css" media="print" href="print.css" />

and `includes/footer' may contain

	</body>
</html>

and perhaps an additional footer line to be displayed in all pages.

Now write some content in the file `source/index.html' and then run mowyw.
You should get an output like that:

Processing File 'source/index.html'... DONE.

Now point your browser at source/index.html and see if it worked.
Files not ending in .html, .htm, .shtml, .xhtml etc. are not processed, just
copyied.

You can change the default pathes with the following command line options to
mowyw:
	--postfix=html
	--includes-prefix=incl/
	--source-prefix=src/
	--destination-prefix=out/
	--menu-prefix=incl/menu/
Note that if you want the prefixes to be directories you have to include the
trailing slash (or whatever the directory separator on your OS is).

If you didn't change any heaer/footer/included files you can save processing
time by adding the command line option '--make', in which case mowyw will
compare the timestamps of the source file and designated output file and will
only process the source file if it is newer.


INCLUDES:

So far mowyw didn't do much work for you, it just added header and footer
sections to all html files.
But it can do more for you: includes. 
Just use the line

[[[include foo]]]

or 

[% include foo %]

in your files, and the line will be replaced with the  content of the file 
`includes/foo'. It works pretty much like #inlcude "includes/foo" with a C pre
processor or <!-- #include virtual="includes/foo"--> with Server Side Includes
(SSI).

Note that everywhere the [[[ ... ]]] delimiters can be exchanged by [% .. %].



( run in 1.138 second using v1.01-cache-2.11-cpan-39bf76dae61 )