Here's how to create custom fields for posts in Publii that function similarly to those in WordPress.
First, create an override folder for your theme. For example, if your website uses the Simple theme...
\Publii\sites\my-website\input\themes\simple
...the override folder would be: