• Documentation

XDocC Specification

XDocC uses file and directory names with a minimal syntax. The following list shows examples of such names:

  • “test.txt~” or “.test.properties” or ".test/"
  • “test.txt” or "test/"
  • “1-test.txt” or "1-test/"
  • “2010-12-24-test.txt” or "2010-12-24-test/"
  • “1-test [highlight].txt” or "1-test [highlight]/"

Dot files and directories (e.g., .test), and tilde files and directories (e.g. test.txt~) start with a dot, respectively end with a tilde. These files are invisible and won’t be copied or compiled. They stay in the source folder.

Accessible files or directories do not have any special syntax. These are accessible, thus, compiled if necessary, but not shown or promoted if not directly accessed.

Visible files or directories start with a number followed by a dash (e.g., 1-test.txt or 1-text/). Visible directories are used for the static structure of a site.

Entry files or directories start with a date followed by a dash (e.g., 2010-12-31-test.txt or 2010-12-31-test/). You can also specify a year and a month only e.g., 2010-12-test.txt. For a more precise data, 2010-12-31-12:00:00-test.txt is valid too. If no date is provided but the file or directory should be an entry, two dashes are used e.g., 1--test.txt. The date format is yyyy-MM-dd, to see the same ordering in a file manager as on the website if ordered properly.

Behavior

The easiest behavior are the accessible files. Those files are compiled for a known file type. If you have a known file type but don’t want it to compile, add a .raw at the end (test.txt.raw). Visible directories are in a navigation item but can be accessed.

The visible directories are used for structuring the site. There are four navigation items in XdocC: 1. the quick navigation bar, which shows the first level, and as a drop down a second level. Starting from the second level, there is a navigation bar that shows the next level of visible directories. A third navigation item is the breadcrumb bar, which shows the way to back to the root. A potential fourth item is to preview entries in combination with a .view file. Visible files are similar to accessible files, but the number is used for ordering the files for displaying.

The entry directories or files are not shown if at least one visible file is in a directory. If no such file is present a preview of those entry items is presented, 10 at a time, pageable. If many entry files or directories ares present, the fourth navigation item is showed.

Examples

[1-About]
 +[foo.txt]
[2-Docs]
 +[1-bar.txt]
 +[2-code.txt]

XDocC will create a index.dir.html file, which previews About and Docs, since there is no visible or entry file in the root directory. The preview for About will be empty, since foo is accessible, while the preview for Docs will be “code.txt”, since its number is higher than for “bar.txt”.

[1-About]
 +[foo.txt]
[2-Docs]
 +[1-bar.txt]
 +[2-code.txt]
[3-Gallery]
 +[2010-12-31-Berlin]
 +-[1-image1.jpg]
 +-[2-image1.jpg]
 +[2009-12-31-London]
 +-[1-image1.jpg]
 +-[2-image1.jpg]

XDocC will generate a preview for “Gallery” and show the preview of “Berlin”. The preview of “Berlin” will show the preview of 2-image.jpg. Altough the content 2-image.jpg is shown on the frist page, two links point to the “Gallery” and "Berlin"

[1-About]
 +[foo.txt]
[2-Docs]
 +[1-bar.txt]
 +[2-code.txt]
[3-Gallery]
 +[2010-12-31-Berlin]
 +-[1-image1.jpg]
 +-[2-image1.jpg]
 +[2009-12-31-London]
 +-[1-image1.jpg]
 +-[2-image1.jpg]
[4-Articles]
 +[2010-01-01-Biking]
 +-[1-biking.textile]
 +[2010-02-02-Hiking.odt]

Here, XDocC generates in addition a preview of “Hiking”. Once the users clicks on “Articles”, previews of “Biking” and “Hiking” is shown. For a fine-grained control of the preview function, the file xy.view can be used for combining static structures and sort the entries according to their date.

Preview

The .view files are used to show entries in a proper order. Furthermore, it can be used to control the visibility of the fourth navigation item, which is otherwise never shown. A know format can be compiled as directory view, or view. A preview of directories works as follows. For a preview on a directory, the compile method directory view for the highlighted item is called.