Skip to content
Damian Heaton edited this page Dec 16, 2016 · 3 revisions

Project Goals

The goal of Compound is to provide a clean, simple transclusion compiler for HTML, without hindering nor interrupting the style that HTML has developed over the years.

Why?

Despite its vastness, HTML itself has no clean, official transclusion feature; the closest thing to transclusion in HTML is an iframe, which isn't appropriate for sticking a template at the top of each page. Thus, Compound hopes to allow you to link a file (within another), which will be inserted into the document when you compile it to standard HTML (HTML including Compound extensions should henceforth be named CHTML, allowing us to distinguish between standard HTML and uncompiled Compound HTML.)

(CHTML files should have a file type of .c.html. This helps to distinguish that the file is CHTML (not standard HTML), but also allows existing HTML syntax highlighters to parse the file easily.)

Syntax

To transclude a file into another is as simple as:

<link rel="transclusion" href="template.html" />

Which will transclude the file "template.html" into the file that the transclusion was called from.

NOTE: Most browsers won't really support this syntax at all, and so these files should probably be saved as .c.html files and compiled prior to publish.

Compiling a Compound File

Compound provides a compiler for converting CHTML files to HTML. This compiler will be developed according to features that are considered essential to web development and should be features already in HTML.

Potential Features

  • A custom browser built to permit the testing of CHTML files prior to compilation, likely speeding up development time. This could be developed with Electron, replacing CHTML link tags with the transcluding file?

Clone this wiki locally