Hugo Forms PHP

Wanna add some simple forms and process the Content with PHP ? 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 Post { {< rawhtml >} } <form action="/welcome.php" method="post"> Name: <input type="text" name="name"><br> E-mail: <input type="text" name="email"><br> <input type="submit"> </form> { {< /rawhtml >} } Example Name: E-mail: sha256: 5b73134398129eadc6ca2b6661d2ef98cedc91548cae817c1c5cefb0a7fc71ff

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 ?? 2020-09-26 10:06:07 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 ?


how to update hugo you can use ports (pkg_add hugo) and get the lastest stable hugo package based on OpenBSD release cycles (2 x year), or grab the latest binary from github and put it on your machine. Releases: cd /tmp ftp tar xfz hugo_0.62.0_OpenBSD-64bit.tar.gz doas mv hugo /usr/local/bin/ or find latest automatically doas su - cd /tmp/ u=$(lynx -dump -listonly |grep "OpenBSD-64bit" |sed 's/.*https/https/') f=$(echo $u |sed 's/.