/usr/share/doc/pubtal/html/quick-start.html is in pubtal 3.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Quick Start Guide for PubTal</title>
<link href="../style/site.css" type="text/css" rel="stylesheet">
</head>
<body>
<h1>Quick Start Guide for PubTal</h1>
<p id="subject">An introduction to how PubTal works.</p>
<div><p>PubTal takes content files (e.g. text files), one or more template files (containing the website's look and feel), and produces corresponding HTML/XHTML files. Several different content formats are supported by default, and more can be added through a plugin mechanism. </p>
<p>This quick start guide is based on the <dfn>HTMLText</dfn> content type which is written in plain text with a limited amount of HTML markup. Each HTMLText file can contain (optional) name-value pairs at the start of the file, which are then available for reference in the template.</p>
<p>The body of an HTMLText file is a mixture of normal text and HTML markup, such as <b> tags for bold, and <a> for links. PubTal will automatically add paragraph tags (<p>) and newline tags (<br>) to the body text when generating the web page.</p>
<p>PubTal <dfn>templates</dfn> are written as normal HTML/XHTML pages, but with <dfn>TAL</dfn> commands added in that tell PubTal where to place content in the generated page. TAL is a simple template language consisting of just 7 commands, and can be easily learnt from the examples. More information on writing PubTal templates can be found in the <a href="conf/templates.html">Template Basics</a> section of this manual.</p>
<p>Here is a simple example of how you can use the most basic features of PubTal. The directory layout for this example site is:</p>
<pre><code>simplesite/site.conf
simplesite/content/index.txt
simplesite/template/template.html
simplesite/dest/index.html
</code></pre>
<p>The site.conf file will be empty because this example uses the default configuration. The file "simplesite/dest/index.html" file is generated by PubTal when we run the following command:</p>
<pre><code>updateSite.py simplesite/site.conf</code></pre>
<p>The file "simplesite/content/index.txt" has the following content, in which a name-value pair of "title" is defined, and two HTML paragraphs are created:</p>
<pre><code>title: My first page.
This is the first paragraph.
And this is a new line in the first paragraph.
The second paragraph shows <b>bold</b> and a <a href="http://www.owlfish.com/">link</a>.
</code></pre>
<p>The file "simplesite/template/template.html" is an example PubTal template containing TAL commands that position the content within the HTML page:</p>
<pre><code><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>An Example</title>
</head>
<body>
<h1 tal:content="page/headers/title">Title</h1>
<div tal:content="structure page/content">Body</div>
<p>Last modified: <b tal:replace="page/lastModifiedDate">Date</b></p>
</body>
</code></pre>
<p>The contents of the H1 heading will be the title taken from the "title:" line of the text file, with the main content appearing in the DIV element. The name-value "title" is just an example; multiple name-values can be used and referenced in the template in the same way as "title". This is the <a href="example/index.html">resulting HTML file</a>. </p>
<p>By separating content from HTML templates in this fashion, adding and maintaining web pages becomes very easy. To change the design of the website simply modify the template and then regenerate the pages with the single command updateSite.py. Different templates can be used in different parts of the site, with common parts shared between them. Default name-value pairs (accessed through the "page/headers/name" TAL path) can be set, and all configuration is inherited down through the directory structure.</p>
<p>To make learning PubTal easier there are several examples included with the download. The easiest one to start with is in the "examples/homepage" directory, which provides a simple example of how to use a PubTal template to build site navigation links.</p>
</div>
<div class="navbar">
<a href="index.html" title="Contents">Contents</a>
</div>
<p id="version">PubTal Version 3.5</p>
<div id="footer">
<p>File: quick-start.txt</p>
<p>Last modified: Fri, 27 Jul 2007 18:34:31 BST</p>
<p>Copyright 2011 Colin Stewart</p>
<p title="PubTal is a template driven web site publisher.">Made with <a href="http://www.owlfish.com/software/PubTal/">PubTal</a> 3.5</p>
</div>
</body>
|