![]() Because of this, partials typically call yield. A partial is a layout that is not used for laying out an item, but is rather intended to be included into another item or layout. ![]() PartialsĪ layout can be used as a partial. Just like items, layouts have attributes and an identifier. The following is a minimal layout that includes the content using yield, and emits some metadata: Īn item is laid out using #layout function in a compilation rule. Typically, a layout adds a header, and a footer to a page. LayoutsĪ layout is the “frame” for content to go into. The following snapshots are generated automatically: :raw The content right before actual compilation is started :pre The content right before the item is laid out :last The most recent compiled contentīinary items cannot have snapshots. Snapshots can be generated manually, but some snapshots are generated automatically. Item snapshotsĪ snapshot is the compiled content at a specific point during the compilation process. Unless otherwise specified, there will be a default representation, aptly named default. a cue sheet representation, useful for track list pagesĪn item rep has a name, which usually refers to the format the content is in ( html, json, rss, …).a JSON representation, so that the site can act as a read-only web API.an RSS representation, useful for the home page for a blog.an HTML representation, which will be the default for almost all sites.An item representation is the compiled form of an item. Item representationsĮvery item has one or more item representations (or “reps” for short). Refer to the Filesystem data source section on the Data sources page for details. The filesystem data source, for example, sets content_filename and meta_filename, among others. ![]() Some data sources set attributes on items by default. ![]()
0 Comments
Leave a Reply. |