Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"mode": "pre",
"mode": "exit",
"tag": "alpha",
"initialVersions": {
"@frontlit/api": "0.1.0",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/preview-stable-install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@frontlit/preview": patch
---

The README runs the tool with `npx @frontlit/preview@latest` instead of `@alpha`, now that the packages have stable releases.
10 changes: 5 additions & 5 deletions packages/preview/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ node --version
2. Run:

```sh
npx @frontlit/preview@alpha
npx @frontlit/preview@latest
```

The first run downloads the tool, which takes a few seconds.
Expand All @@ -27,7 +27,7 @@ node --version

Press **Ctrl+C** in the terminal to stop.

> **Why `@alpha`?** The tool is in early release. `@alpha` always gets the newest version.
> **Why `@latest`?** npx can reuse an older copy it downloaded before; `@latest` always gets the newest version.

## Using the preview

Expand Down Expand Up @@ -79,7 +79,7 @@ Pages with a content feed (for example a blog listing) normally show articles fr
## Options

```sh
npx @frontlit/preview@alpha [site-folder] [--port <number>] [--context <file>]
npx @frontlit/preview@latest [site-folder] [--port <number>] [--context <file>]
```

| Option | What it does | Default |
Expand All @@ -89,7 +89,7 @@ npx @frontlit/preview@alpha [site-folder] [--port <number>] [--context <file>]
| `--context` | Use a branding file from somewhere else. | `<site-folder>/preview.context.json` |
| `--help` | Print the usage line. | |

Example: `npx @frontlit/preview@alpha website --port 5000`.
Example: `npx @frontlit/preview@latest website --port 5000`.

## Images

Expand Down Expand Up @@ -119,7 +119,7 @@ Before you publish, open your pull request on GitHub and check the **FrontLit /

| Message or problem | Fix |
| --- | --- |
| `No pages directory in …` | Run the command from your repository, or pass the folder that contains `pages/`, e.g. `npx @frontlit/preview@alpha website`. |
| `No pages directory in …` | Run the command from your repository, or pass the folder that contains `pages/`, e.g. `npx @frontlit/preview@latest website`. |
| Port 4310 already in use | Another preview is probably still running. Stop it with Ctrl+C, or use `--port 4311`. |
| `Page not found` | There is no `pages/<name>.json` for that address. Check the file name. Names use lowercase letters, numbers and hyphens. |
| An image doesn't show | Check the path is relative to the JSON file, and that the file is inside the repository and is an image. |
Expand Down
Loading