v79 / Cantilever

Creating a cloud-first static website generator using AWS servers such as S3 and Lambda. Transforms markdown files into HTML.
2 stars 0 forks source link

Allow configuration of error pages, such as 404, through project definition file #60

Closed v79 closed 10 months ago

v79 commented 10 months ago

Add error page configuration to cantilever.yaml.

Something like:

errorTemplates:
 - 404: sources/templates/404.html.hbs
 - 403: sources/templates/403.html.hbs

Do I need to explicitly define a Page for each of these errors as well? If not, how will I create a ContentNode.PageNode so that the template renderer can render the page? May just be a custom function. Maybe the template itself needs an isErrorPage flag?

v79 commented 10 months ago

There has to be a PageNode for all pages, unless I decide to hardcode pretty much everything. If I add an isError flag to the Page, that will allow me to present it differently in the web edit.