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/nginx
paketo-buildpacks/httpd
paketo-buildpacks/node-engine
paketo-buildpacks/npm-install
paketo-buildpacks/node-run-script
paketo-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.
Feel free to use this, as you see fit. For the turn-key zero-config solution, please check out our PaaS service Runway.