A buildpack to build static websites:
- gohugo
- mdBook
Here's a high-level overview about how this works:
graph TD
subgraph BUILD ["build phase"]
direction LR
version-->dl["download tool"]
end
subgraph DETECT ["detect phase"]
direction LR
w["check work dir"]-->t["determine type"]
end
DETECT-->d(("gohugo or mdBook"))
d-->BUILD
BUILD-->s["container with nginx/apache + your site"]
Some configuration is available, please see api for details.
paketo-buildpacks/nginxpaketo-buildpacks/httpdpaketo-buildpacks/node-enginepaketo-buildpacks/npm-installpaketo-buildpacks/node-run-scriptpaketo-buildpacks/go-dist
Either of these can be customized through various environment variables. The web server can be customized through a full config file; more details are available on our documentation.
If your static website requires npm (for css/assets), then a package.json with a build task (npm run build) in the root of the repository (or the value of BP_NODE_RUN_SCRIPTS) will suffice to include it in the buildplan.
Important
Please set BP_KEEP_FILES accordingly to keep the generated assets in the container. More details are available on our documentation.
See LICENSE, so feel free to use this, as you see fit. Please star the repository.
For the turn-key zero-config solution, please check out our PaaS service Runway.