About MetaStatic
MetaStatic is a JavaScript tool that allows you to build and maintain a static web site using:
- high-level tags that we call Meta Tags and that represent and encapsulate a particular set of user interface (UI) features and behaviours
- optionally, a simple text file-based Content Management System, with your content written using Markdown syntax
MetatStatic can be used with either Node.js or Bun.js.
Using MetaStatic, a Web Site maintainer can quickly and easily define and maintain a complex static web site that has a modern responsive user interface, using a few simple Meta Tags and without the need for complex JavaScript frameworks.
MetaStatic allows a Web Site to be described/defined completely declaratively, requiring no programming knowledge or expertise.
However, technical developers can create libraries of re-usable MetaStatic Meta Tags that encapsulate any amount of markup and JavaScript logic, to whatever degree of complexity is required. These can then be used by a Web Site maintainer as building-blocks that describe the Web Site.
The file containing the Meta Tag-based definition of a web site is then used as the input to the MetaStatic module which converts it to a corresponding HTML file that can be run in a browser.
MetatStatic's Build Module is written in JavaScript and can be used with Node.js.
Install it as follows:
npm install metastatic
Bun.js
MetaStatic's Build Module is written in JavaScript and can be used with Bun.js.
Install it as follows:
bun install metastatic
Configuration of MetaStatic's Builder module is performed when you instantiate its MetaStatic class. You pass its constructor an options object as an argument.
The options object's properties are as follows:
- tagLibraryPath: the file path under which each of your Meta Tag Libraries are stored
- inputPath: the file path holding your .meta files which describe your Web Site's page(s)
- outputPath: the destination file path into which MetaStatic's Builder will output the generated HTML file
- contentPath: an object containing one or more key/value pairs, with each key/value pair describing the mapping of a namespace to a corresponding physical file path. These are used by MetaStatic's Builder to locate Markdown content files that are referenced in Meta Tag attributes.
For example, the configuration used in your cloned repository is:
const metaStatic = new MetaStatic({
tagLibraryPath: './metaTagLibraries/',
inputPath: './sites/',
outputPath: './sites/',
contentPath: {
tutorial: './sites/tutorial/content'
}
});