Careful organisation of your files will allow you to make changes easily to an individual page, a whole website, or even a collection of websites that you maintain.
These files will provide commands, functions and scripts extending the basic capabilities of your scripting tools, or producing HTML/XML/CSS in general. You may also include information about yourself, e.g. if you want your email address to appear on each page.
When you change these files, you are changing all your websites.
We will assume that you have created these directories:
Holds files to be included by m4, and make. You should set at least set your environment variable MAKEFLAGS to include from this directory. You should also do the same with M4PATH, or run m4 with -Iinclude from a makefile.
For example, you could create the following files:
to hold general macros that extend m4.
to hold context-defining and context-sensitive
macros, such as INLANG and LANG.
to hold macros that process content but not
mark-up, e.g. Qx, gx.
to hold macros that work in HTML but not XHTML,
e.g. PAGE, ELEMEND.
to hold macros that work in XHTML but not HTML,
e.g. PAGE, ELEMEND.
to hold macros that work in both HTML and XHTML (Include this from the above two files.);
to hold macros that work in SVG.
to hold macros that work in CSS.
to hold macros which manipulate URIs and hierarchical filenames .
to hold the generic assembly rules.
Holds executable shell scripts.
Create a directory to hold the source files and configuration of your website, say, mywebsrc, and within it, these directories and files:
Holds site-wide definitions. Create in here these files:
Holds general m4 definitions, e.g.:
include(`uris.m4')dnl include(`resources.m4')dnl include(`ext.m4')dnl include(`ctxt.m4')dnl include(`commands.m4')dnl
Holds m4 definitions for XML/(X)HTML/SVG.
Holds m4 definitions for just HTML.
Holds m4 definitions for just XHTML.
Holds m4 definitions for (X)HTML.
Holds m4 definitions for just SVG.
Holds m4 definitions for CSS.
Holds simple look-up tables.
Holds the scripts for processing the look-up tables.
Works out how to build the final HTML/XML/CSS files.
When you change these files, you are changing all of one website.
Create a directory to shadow the directory and files you're going to create and publish:
Holds the primary source files (one per public file).
The contained files should have a .m4 suffix to enable your text editor to use the correct mode automatically. They should also have:
a type suffix (e.g. .html, .css);
a language suffix (e.g. .eo, .en), unless they are language-independent, or you're generating several language variants from one file.
For example, index.fr.html.m4, in that order.
Updated: 2007-May-11 16:56 GMT
Contact
Steven Simpson
Ĉi tiu paĝo disponeblas ĉi-lingve, laŭ via krozila agordo.