I use docpad to update and publish a small 5 page website. Works great but I am at a loss for how to easily add a piece of <?php ?> script to a specific page. I have a contact form generator in php, just add a small script to the html page where you need it embedded and it works perfectly.
For pages I am using eco with html.md files. I tried using a html only file but the results are the same, the code is being sanitized out.
<?php
$contact_form = 2; // set desired form number.
$contact_form_path = '/home/../../../contact-files/'; // set path to /contact-files/ with slash on end.
require $contact_form_path . 'contact-form-run.php';
?>
Yes, I am using marked but the with the default sanitize = false. I suppose I could try to place it in the template .eco file. Will that work?
Should add, yes I am using a handler in .htaccess file. Manually adding the code piece does work, but it is a pain to have to add it if I regenerate the site files.