This is how to organize your raw contents. The contents are held in plain text files. The order in which they will appear is set by the organization of the files and folders in the "contents" subfolder.
Every folder (or subfolder) compiles to a HTML document that is named like the folder with ".html" as suffix. For example, a folder named "index" will compile to "index.html" in the destination folder. The content of "index.html" will be assembled from the content of the folder "index". (See top level content files folder for the index example.)
As another example, we'd like to create a welcome page. So let's create a folder named "welcome" in "D:\scot\example\contents". The resulting path is "D:\scot\example\contents\welcome".
There is a special folder named "default". This folder will result in the default HTML document that is displayed when only the folder is given in the URL. In most cases the default HTML document is "index.html". The name and suffix of the default HTML document may be specified in how to write project properties file. The SCoT file must be named "default.scot" as well.
The example for this ist the folder "D:\scot\example\contents\default" and the file "D:\scot\example\contents\default\default.scot".
As long as there is only the folder, there will be no content. And an empty HTML document will not be created. So what do we need? The answer is: a header file.
Header files are always named like the folder they are in with the suffix ".scot". That is in our example "welcome.scot". By now we've got a file with the path "D:\scot\example\contents\welcome\welcome.scot".
Header files are always the first ones that are compiled into the HTML document. As they hold information about title and stylesheet it is a good idea not to leave them away. (See how to write header files for further information.)
The second most important file in the folder is the file named "content.order". It holds the information which content will appear in the HTML document and in which order it will appear. This file names files and folders as well. (See how to write content order files for further information.)
In our example we do now have a file with "D:\scot\example\contents\welcome\content.order" as its path.
Finally here we are at the files that hold the real and raw content. The HTML document will be composed of one or more sections. For each section you may create one content file. Do not forget to insert them into the content order file, otherwise they will not appear.
For our example we want to have an overview section and a table-of-contents section. So we create an "overview.scot" and a "tableofcontents.scot" file in "D:\scot\example\contents\welcome". The absolute paths are therfore "D:\scot\example\contents\welcome\overview.scot" and "D:\scot\example\contents\welcome\tableofcontents.scot". (See how to write content files for further information.)
As told in the content order part we know that the content order file may list files as well as folders. What's happening to the files is told the sectio above. But what about the folders? At first sight there is no content to be visible in the HTML document. But there is! And that is in the header file of the folder.
Now let's create a new section about references for the welcome page. Create a folder "references" in "D:\scot\example\contents\welcome" and, in there, a file "references.scot". So the new file has got the path "D:\scot\example\contents\welcome\references\references.scot". The content of this file will appear in the welcome page, and in the references page as well. The latter one will be linked from the welcome page.
Now let's see how this HTML documents SCoT representation looks like in the file system.
Path | Description |
---|---|
D:\scot\example\contents\welcome | the HTML document "welcome.html" |
D:\scot\example\contents\default | the default HTML document |
D:\scot\example\contents\default\default.scot | header information like stylesheet and title as well es a brief description or overview of the default HTML document |
D:\scot\example\contents\welcome\welcome.scot | header information like stylesheet and title as well es a brief description or overview of welcome |
D:\scot\example\contents\welcome\content.order | list of the contents that will appear in "welcome.html" |
D:\scot\example\contents\welcome\overview.scot | content of "welcome.html" |
D:\scot\example\contents\welcome\tableofcontents.scot | content of "welcome.html" |
D:\scot\example\contents\welcome\references | the HTML document "references.html" |
D:\scot\example\contents\welcome\references\references.scot | header information like stylesheet and title as well es a brief description or overview of references; title and description or overview will also appear in "welcome.html" |
Back to how to organize your SCoT files.
Diese Seiten wurden mit SCoT nach folgenden Standards erstellt: xHTML 1.0, CSS 2.0.
Zuletzt geändert: