Hi,
Please don’t flame me, as I know the idea of using dynamic PHP in a static site generator goes against the premise of it being ‘static’, but …
I was just wondering if dynamic PHP could be used in the layout of the page, e.g. using includes/header.php for example.
Thanks
Avery
bep
July 31, 2015, 5:22pm
2
Not stupid at all.
Currently I would say it’s not possible out of the box, as you would need the files with a PHP extension.
With this in place it will be simple:
opened 04:56PM - 04 Jun 14 UTC
closed 01:12PM - 04 Apr 17 UTC
Quick but very useful feature request: Permit the user to configure a preferred file extension for generated HTML files, i.e. keep...
Bug
Keep
Hi,
Thanks for getting back to me so quickly! I followed the convo and found a new thread dealing with the issue here: http://discuss.gohugo.io/t/discussion-for-configurable-file-extension-320/157
Unfortunately there are no replies and the thread started over a year ago…
Loosely related question: Is it possible to use .php files once the blog has been deployed? (e.g. drop them in place once Hugo blog has been sent to a server?)
Thanks
Avery
jbrice
September 19, 2017, 7:57pm
5
Yes, it’s a dusty past-its-sell-by-date thread, but must mention that you can drop some PHP into the the middle of a Hugo project – see this page .