Path: Welcome > Misc > txt2doc Site Structure

txt2doc Site Structure

Hints about formatting htxt

1. The basics

A txt2doc project consists of a main project file (.proj) which describes the site structure and a variable number of .htxt files which describe the actual pages. One .htxt file can contain the source for one or more HTML or other files, eg required CSS or XML files (these other files are called raw). The HTML formatting shortcuts available in .htxt files are described in Hints about formatting htxt.

The main project file should contain all project-wide .includes, .defines and .blocks as well as .workdir and .structure commands. The following commands are defined:

    .include <FILE>         includes file FILE.
    .define NAME VALUE      defines macro NAME with value VALUE. Macros are strictly textual. A defined macro
                            is referenced (eg in other .defines) by $(NAME).
    .block NAME             starts a block definition. This can be either a NAMEd block of txt2doc dot commands
                            or a block of Idle code (NAME has to be the string "execute"; these blocks are
                            executed immediately). A block is terminated by .endblock.
    .structure              defines the structure of a website or a section of a website. A block of structure definition
                            is terminated by .endstructure. Every line in a structure definition defines a single web page
                            and its position in the tree of pages: one tab character (\t) for every level. The first (main)
                            page has no tab and so is on level one. A page definition prefixed by "nomap:" appears outside
                            the normal structure and will not be referenced in maps or index pages or anywhere else. A page
                            definition looks like this:
                            _[>OUTF|TITLE|<INF]_ {TAG TAG ...}
                            All parts with the exception of TITLE are optional. >OUTF is the name of the output file, default
                            is TITLE with all blanks replaced by underscores, suffixed by the current extension (see .ext).
                            TITLE is the title of the webpage. INF is the name of the input file, ie the .htxt file that contains
                            the .file command and text for the page. The TAG strings are the tags connected with this page.
    .workdir DIR            defines DIR as the working directory for a section.
    .tags TAG TAG ...       defines the set of available tags.
    .ext .EXTO [.EXTI]      .EXTO determines the extension of non-raw (ie HTML) output files. Optional .EXTI
                            determines the extension of input files (ie .htxt). Defaults are .html and .htxt
                            respectively.
    .gmap                   "clear" clears the current global map. .gmap can also be used inside a page to create a global map.

To upload, go to the local root (either ...\thomaslauer or ...\trvl2), start "upload -s -p" to check and then "upload -s -z" ("-u" will also correct the upload flags). This produces a file called upload.zip. Upload to /home/thomasl/public_html/thomaslauer.com/ or /home/thomasl/public_html/trvl2.com/and unzip from there.


$updated from: Formatting htxt.htxt Sat 18 Jan 2014 13:12:47 thomasl (By Thomas Lauer)$