An extremely simple and lightweight PHP framework/boilerplate to spin-up microsites at high speed. Optimized for Performance, Security, SEO, TailwindCSS, and Directus CMS.
other (Please do not submit support requests here (below))
Enhance internationalization by adding Gettext functionality.
This way, one could decide, whethere he/she wants to use different pages per language or use the same page with have a translated .mo file. The latter one makes it easier to translate a lot of text in many languages fast.
Still, no usual setup for a microsite and therefore low priority.
@jekuer Thanks for providing this starter!
I don't know if it's the PHP server I'm running, but I'm getting a bunch of these deprecated warnings: Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /Volumes/Evo/Sites/php-microsite-boilerplate/lib/gettext/gettext.inc on line 92
I tried Docker, but it fails because I have an ARM Mac and the container doesn't support it even if I specify arm64 as a platform.
Hello, unfortunately the routing on my vhost does not work, likewise on my other webspace it does not run. I proceeded exactly as described in the blog.
Hi, I have one question, not really an issue or similar.
I see that you have Directus as an option in your boilerplate, and since my PHP skills are not up to the task I was wondering do you maybe have plans(or any pointers in the right direction for DIY approach) for exposing the Directus part of your boilerplate as standalone library?
Just by reading the code I can say that I get what is going on, but it's impossible for me to somehow extract only the Directus part and use it standalone.
Since we aim to support TailwindCSS, we will need to include some build magic. At least for the CSS optimization with Tailwind. Doing so, it makes sense to also include some minification process for the JS folder.
Combined with better documentation, this enables people to work on the code without the need to minify files locally.
However, it will require NodeJS - locally if you run it there or during a deployment step, which should also be prepared.
A detailed tutorial should guide through the initial setup of the code.
Not yet sure if via the readme.md, a specific folder (with docs included) or only via the demo page.
AMP will be no longer pushed by Google.
Since the included caching solution (especially combined with a strong CDN) provides more or less the same performance (without the downsides), V2 will no longer support AMP.
other (Please do not submit support requests here (below))
Since it already includes multilanguage functionality, it would be a useful addition to create a component for a dynamic language switcher.
One could define more details per language, like its name or a flag image, which then could be drawn automatically into some kind of a switcher/dropdown.
This comes in handy, when dealing with more than 2 languages.
With a stable Directus V9, we need to update the function to limit the Directus call to the current language.
With V8, this can be done via the lang param. V9 will need the new deep param.
Afterwards, the workaround, which strips non-active language items, can be removed.
TailwindCSS introduces a new way to build webpages very fast.
Still, it breaks with common conventions regarding CSS (keep the styling in the css file and not the HTML).
The boilerplate (since it is meant for building simple websites fast) should support TailwindCSS, but do this in an optional way, so no one is forced to use it.
I have embedded a video of about 6mb size, but it is not saved by the cache in any form. No MP4 no WEBM. I always get the following error: serviceworker-cache.min.js?v=5.0.13:1 Uncaught (in promise) TypeError: Failed to execute 'put' on 'Cache': Partial response (status code 206) is unsupported.