Default Page Data

These page data will have their own default values.

Table of Contents
  1. Time
  2. ID
  3. Type

I have updated the Page class recently so that now we can have more meaningful default page data.

Time

The engine will first search for a hard-coded time data from the page file to be used. If it doesn’t exist, then it will use the page’s file creation time as the page time. But, if the page’s file name itself is formatted as a timestamp-like format, then the engine will try to parse the page’s file name into a valid time data. So now you can set a file name as 2017-04-21-14-25-02.page to set the time data to 2017-04-21 14:25:02 or 2017-04-21.page to set the time data to 2017-04-21 00:00:00.

ID

The default id value will use the time value that is converted into unsigned Unix time format as string.

Type

The default type value is text/html.

0 Comments

No comments yet.