Skip to content

Commit e1c3daf

Browse files
authored
Correcting & clarifying docs (#72)
* Fix clean_urls config example * Clarify purpose and usage of these CNBs
1 parent e3aee40 commit e1c3daf

File tree

2 files changed

+22
-17
lines changed

2 files changed

+22
-17
lines changed

README.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
# Heroku Cloud Native Buildpacks: Front-end Web
22

3-
🚧 **This repo is experimental.** Use at your own risk. 🚧
3+
This repository is the home of Heroku Cloud Native Buildpacks for Front-end Web apps, also known as: websites, static web apps (SWA), single-page apps (SPA), progressive web apps (PWA), and browser apps.
44

5-
This repository is the home of Heroku Cloud Native Buildpacks for Front-end Web apps, also known as: static websites, static web apps (SWA), single-page apps (SPA), and browser apps.
5+
## What It Is
6+
7+
These Front-end Web buildpacks produce an OCI (container image) that launches a web server to host a directory of HTML, CSS, and Javascript files. The build process can run Javascript or other programs to produce the website, or simply read a directory of files as the web root. All front-end frameworks are supported, while some popular frameworks are optimized with preset web server configuration.
8+
9+
The result is a static website:
10+
* high-efficiency, high-performance server
11+
* secure by default with minimal, purpose-built features
12+
* separates front-end development (web UIs) from server-side programming (backend APIs).
13+
14+
### What It Is Not
15+
16+
This static web server does not run custom code on the server. If an app requires a custom server-side web process, then use the appropriate [language-specific CNBs](https://github.com/heroku/buildpacks).
617

718
## Included Buildpacks
819

@@ -18,18 +29,20 @@ Buildpacks that provide a specific server-side component.
1829

1930
### Framework Buildpacks
2031

21-
Lower-level buildpacks that detect specific source layouts, frameworks, or tools, to automate configuration of build process and heroku/static-web-server.
32+
Lower-level buildpacks that detect specific source layouts, frameworks, or tools, to automate configuration of build process and `heroku/static-web-server`.
2233

2334
| ID | Name | Provides |
2435
|------------------------------|-------------------------------------------------------------------|-------------------------------------|
25-
| `heroku/website-ember` | [Website (Ember.js)](buildpacks/website-ember/README.md) | auto-detect for ember-cli |
26-
| `heroku/website-nextjs` | [Website (Next.js)](buildpacks/website-nextjs/README.md) | auto-detect for Next.js |
36+
| `heroku/website-ember` | [Website (Ember.js)](buildpacks/website-ember/README.md) | auto-detect for [Ember.js](https://cli.emberjs.com) |
37+
| `heroku/website-nextjs` | [Website (Next.js)](buildpacks/website-nextjs/README.md) | auto-detect for [Next.js](https://nextjs.org) ([static exports](https://nextjs.org/docs/app/guides/static-exports)) |
2738
| `heroku/website-public-html` | [Website (Public HTML)](buildpacks/website-public-html/README.md) | auto-detect for `public/index.html` |
28-
| `heroku/website-vite` | [Website (Vite)](buildpacks/website-vite/README.md) | auto-detect for vite |
39+
| `heroku/website-vite` | [Website (Vite)](buildpacks/website-vite/README.md) | auto-detect for [Vite](https://vite.dev) |
2940

3041
## Usage
3142

32-
See the individual buildpack documentation, linked in the above table.
43+
[Configure the Static Web Server](buildpacks/static-web-server/README.md) as the last buildpack for your app, along with other language buildpacks the build might require.
44+
45+
The framework buildpacks are optional. They automate detection of static web apps in source code when using [`heroku/builder`](https://github.com/heroku/cnb-builder-images), such as when building a CNB app on Heroku, but are not required when manually configuring buildpacks.
3346

3447
## Dev Notes
3548

@@ -39,14 +52,6 @@ See the individual buildpack documentation, linked in the above table.
3952
cargo test -- --include-ignored
4053
```
4154

42-
### Updating Node.js
43-
44-
These buildpacks include the heroku/nodejs buildpack, packaged at a specific version. To update the Node.js buildpack:
45-
46-
1. check the [Docker Hub listing](https://hub.docker.com/r/heroku/buildpack-nodejs/tags) for the latest version
47-
1. update the version specified in the website-nodejs [buildpack](meta-buildpacks/website-nodejs/buildpack.toml) & [package](meta-buildpacks/website-nodejs/package.toml) specifications
48-
1. ensure integration tests still pass, see [Run Tests](#run-tests)
49-
5055
### Releasing A New Version
5156

5257
[Action workflows](https://github.com/heroku/buildpacks-frontend-web/actions) are used to automate the release process:

buildpacks/static-web-server/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ sampling_thereafter = 1000
297297
Support for pretty, extensionless URLs, leaving `.html` off of the request path.
298298

299299
```toml
300-
[com.heroku.static-web-server.caddy_server_opts.clean_urls]
301-
enabled = true
300+
[com.heroku.static-web-server.caddy_server_opts]
301+
clean_urls = true
302302
```
303303

304304
For example, a request to `example.com/support` will be tried in the document root:

0 commit comments

Comments
 (0)