About Documentation Github


Pagenode is configured by defining some constants before loading the pagenode.php.


// Disable Pagenode's syntax highlighting

// Load Pagenode


The date format to use when echoing $node->date analogous to PHPs date function.

The default is M d, Y - H:i:s.


A | separated list of languages that should be syntax-highlighted in the Markdown content. Pagenode's syntax highlighter is extremely simple but works well for many c-style languages. To disable syntax highlighting completely define null.

The default is php|js|sql|c.


The timezone to use. The default is PHPs default timezone or if none is specified, UTC.


The path at which to serve the JSON API. See the JSON Interface documentation for the details.

The default is undefined which disables the JSON API.


Whether to add the full getDebugInfo() to the JSON API responses.

The default is false which just adds the totalRuntime.


The path at which Pagenode will cache its working index. Pagenode will create one index file for each directory from which Nodes are selected.

The default is null which denotes the sys_get_temp_dir() directory.


Whether to use an indicator file to determine if the cached index is stale. If true and the indicator file time is newer than the cached index file time, Pagenode will rebuild the index. Using an indicator file can speed up Pagenode when it has very many nodes (> 1000).

The default is false which instructs Pagenode to check all file times in the current selector directory to determine if the cache is stale.


The path of the indicator file to use when PN_CACHE_USE_INDICATOR_FILE is true.

The default is .git/FETCH_HEAD which works nicely when you publish your site via git. Git will update this file whenever you pull changes in your repository, so the file modified time can be used as an indicator for any content changes.

© 2024 Dominic Szablewski – rendered in (2.13ms)