forms

Hugo Forms PHP

Wanna add some simple forms and process the Content with PHP ? Add RawHTML Template if not yet done mkdir layouts/shortcodes/ cat << 'EOF' > layouts/shortcodes/rawhtml.html <!-- raw html --> {{.Inner}} EOF Create Script cat << 'EOF' > static/welcome.php <html> <body> Welcome <?php echo $_POST["name"]; ?><br> Your email address is: <?php echo $_POST["email"]; ?> </body> </html> EOF Create new Post and add rawhtml without " " between { and {

HugoIO Templates

Custom Template Stuff mkdir -p layouts/shortcodes cat << 'EOF' > layouts/shortcodes/date.html {{ now.Format "2006-01-02 03:04:05" }} EOF Insert Code in Template current date ? { {< date >} } Result ? current date ?? 2021-10-17 04:43:24 Add RawHTML Create Template cat << 'EOF' > layouts/shortcodes/rawhtml.html <!-- raw html --> {{.Inner}} EOF Add Code { {< rawhtml >} } <p class="speshal-fancy-custom"> This is <strong>raw HTML</strong>, inside Markdown. </p> { {< /rawhtml >} } Result ?