nodes

The nodes directory contains content nodes that can be combined with templates.

When Uriel builds your web site, it combines the nodes and templates together to create rendered pages in the public directory containing your finished web site.

Each node is stored in a file in the nodes directory of your project, and will result in one corresponding page being generated in the public directory when the site is generated.

The nodes form a tree structure that has a direct correspondence to the URL structure of the generated web site.

The first node in a directory must always be named index. This is the index node. Additional nodes can be added to that directory, and they will be children of the index node. Subdirectories can also be added, but each subdirectory must at least have its own index node.

An example will make this clearer. Here is a selection of some of the nodes from this documentation site, along with their URL paths on the rendered web site. All node paths are under the nodes directory, and all URL paths are under the public directory.

Node URL Comments
index / Root Node
directories/index /directories/
directories/nodes /directories/nodes/

Root Node

The root node is simply the node at the very top of the site. It is the nodes/index file, as shown in the table above.

The root node is special, because there are some node headers that will only take effect if they are set on the root node.

Node Headers and Body Content

Each node is a text file, that can be divided into two main parts:

Let's take a look at a simple example. Here are the complete contents of the nodes/hello-world file in this documentation project:

Title: Hello World
Template: default.html
Created: 2026-06-07T23:05:25-04:00
Modified: 2026-06-07T23:05:25-04:00
Foo: This is foo

Hello world!

The value of the <b>Foo</b> header is: {{value:foo}}

You can see the rendered page here: /hello-world/

The first stanza (Title, Template, Created, Modified, Foo) are all node headers.

Next comes a single blank line.

Finally, everything after this point, starting with the “Hello world!” line, is the node body.

The headers act as metadata, and are not directly included in the web site output (although they can be referenced by other means and get included that way).

The node body content can be included in a template using the {{node:body}} substitution parameter.

How Pages Are Constructed

Each dynamically-generated page on your web site starts with a content node.

Each node has a template associated with it. The template is defined in the node, using the Template header. If a template header is not defined, then the default.html template is used instead.

Templates can use substitution parameters, which can include all sorts of dynamically-generated content on the page, including user-defined Python code.

When the page is rendered, the template is the first thing that is included in the rendered page.

If you want the node body contents to show up on the page (and you almost certainly do), then the {{node:body}} substitution parameter should be included somewhere in the template. This is where the node body content will be merged into the middle of your template.

Templates can include other templates using the {{include:default.html}} substitution parameter. The node body contents can also include templates using the same parameter.

Node Sorting Behavior

Nodes have an explicitly-defined sorting behavior.

This shows up in the {{node-list:*}} substitution parameter, the generated RSS feed and sitemap, and any time Node objects are sorted in user-defined Python code.

Nodes are sorted by:

This has the effect of putting newer nodes first, and putting nodes with the same age in alphabetical order.

Tags: root-node

This page was generated by Uriel with the following settings:

Page Details

Resource Path Project File
Node directories/nodes nodes/directories/nodes
Template default.html templates/default.html
URL /directories/nodes/ public/directories/nodes/index.html

Node Headers

Header (Lowercase) Value
tags root-node
title nodes
breadcrumb-separator &raquo;
canonical-url https://documentation.uriel.foo
rss-description Uriel Documentation
rss-image-height 32
rss-image-url /favicon-32x32.png
rss-image-width 32
rss-max-entries 50
rss-title Uriel Documentation
rss-url /rss.xml
sitemap-max-entries 10000
sitemap-url /sitemap.xml
tag-node tag
template default.html

Node Timestamps

Type Value
Created
Modified 2026-06-10T23:13:44-04:00

Node Methods

Method Value
get_parent_node() directories/index
get_path() directories/nodes
get_node_type() file
get_url() /directories/nodes/
get_canonical_url() https://documentation.uriel.foo/directories/nodes/
get_name() nodes
get_display_name() Nodes
get_title() nodes
get_escaped_title() nodes
get_link() <a href="/directories/nodes/">nodes</a>
get_canonical_link() <a href="https://documentation.uriel.foo/directories/nodes/">nodes</a>
get_link_prefix() <p>
get_link_suffix() </p>
get_tags() ['root-node']
get_dest_dir() ./public/directories/nodes
get_dest_file() ./public/directories/nodes/index.html
get_breadcrumb_separator() &raquo;