Skip to content

Commit fdcf0c1

Browse files
committed
docs: add guided tutorials and release validation
Add Community and Pro walkthroughs with practice projects, screenshots, captioned videos, FAQs, and product icons. Expand project startup, find-and-replace, and extension troubleshooting guidance. Generate llms.txt and video metadata through Docusaurus, preserve first-publication dates across deployments, and validate tutorial files and links before release. Validated preview and release builds, seven release tests, tutorial asset checks, and browser behavior.
1 parent cc69f08 commit fdcf0c1

66 files changed

Lines changed: 2370 additions & 28 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/build-verify.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,11 @@ jobs:
2121

2222
- name: Install dependencies
2323
run: npm ci
24+
- name: Test tutorial release tooling
25+
run: npm run test:tutorials
26+
- name: Package tutorial projects
27+
run: npm run package:tutorials
2428
- name: Build website
2529
run: npm run build
30+
- name: Verify tutorial release files
31+
run: npm run verify:tutorials

‎.github/workflows/gh-pages-deploy.yml‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,16 @@ on:
1010
permissions:
1111
contents: write
1212

13+
concurrency:
14+
group: docs-production
15+
cancel-in-progress: false
16+
1317
jobs:
1418
deploy:
1519
name: Deploy to GitHub Pages
1620
runs-on: ubuntu-latest
21+
env:
22+
PHCODE_VIDEO_PUBLICATIONS_FILE: .tutorial-video-publications.json
1723
steps:
1824
- uses: actions/checkout@v6
1925
- uses: actions/setup-node@v6
@@ -23,8 +29,18 @@ jobs:
2329

2430
- name: Install dependencies
2531
run: npm ci
32+
- name: Test tutorial release tooling
33+
run: npm run test:tutorials
34+
- name: Package tutorial projects
35+
run: npm run package:tutorials
36+
- name: Restore original video publication dates
37+
run: node scripts/prepare-tutorial-publications.cjs
2638
- name: Build website
2739
run: npm run build
40+
env:
41+
PHCODE_PUBLISH_TUTORIAL_VIDEOS: '1'
42+
- name: Verify tutorial release files and metadata
43+
run: npm run verify:tutorials -- --release
2844
- name: copy cname to build folder
2945
run: cp CNAME ./build
3046

@@ -42,4 +58,4 @@ jobs:
4258
# The GH actions bot is used by default if you didn't specify the two fields.
4359
# You can swap them out with your own user credentials.
4460
user_name: github-actions[bot]
45-
user_email: 41898282+github-actions[bot]@users.noreply.github.com
61+
user_email: 41898282+github-actions[bot]@users.noreply.github.com

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ resources
1313
# Generated files
1414
.docusaurus
1515
.cache-loader
16+
/.tutorial-video-publications.json
1617
api/API-Reference
1718
phoenix
1819

‎README.md‎

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CC BY License Copyright (c) 2022-present, core.ai
99

1010
# Website
1111

12-
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern
12+
This website is built using [Docusaurus 3](https://docusaurus.io/), a modern
1313
static website generator.
1414

1515
### Installation
@@ -36,19 +36,45 @@ $ npm run build
3636
This command generates static content into the `build` directory and can be
3737
served using any static contents hosting service.
3838

39-
### Deployment
39+
### Tutorial release checks
4040

41-
Using SSH:
41+
Run these checks before releasing tutorial changes. They require Node.js, Git,
42+
and Python 3. No extra Python packages are needed.
4243

43-
```
44-
$ USE_SSH=true npm run deploy
44+
```sh
45+
npm run test:tutorials
46+
npm run package:tutorials
47+
npm run build
48+
npm run verify:tutorials
4549
```
4650

47-
Not using SSH:
51+
The checks cover tutorial links and anchors, image descriptions, video metadata
52+
and captions, AI documentation indexes, and the contents of both practice ZIPs.
53+
`npm run build` refreshes the API documentation from its source repository. If
54+
the API files are already generated locally, `npm run docusaurus -- build` builds
55+
the current checkout without refreshing them.
4856

57+
To preview the built site, run:
58+
59+
```sh
60+
npm run serve -- --port 8208
4961
```
50-
$ GIT_USER=<Your GitHub username> npm run deploy
51-
```
5262

53-
If you are using GitHub pages for hosting, this command is a convenient way to
54-
build the website and push to the `gh-pages` branch.
63+
### Deployment
64+
65+
The production workflow in `.github/workflows/gh-pages-deploy.yml` deploys reviewed
66+
changes pushed to `prod`. It runs the tutorial checks before publishing to
67+
`gh-pages`. Deployments run one at a time.
68+
69+
Video first-publication dates are assigned automatically during a deployment
70+
build. The workflow restores `tutorials/video-publications.json` from the
71+
previous deployment, assigns dates to new videos, and includes the resulting
72+
manifest in the published site. Later releases preserve those original dates.
73+
Local preview builds leave unpublished dates unset; no manual edit to the guide
74+
is needed before release.
75+
76+
Keep `tutorials/video-publications.json` when restoring or moving the published
77+
site. If an already published video has lost its recorded date, deployment stops
78+
until the original date is restored. An unavailable deployment history also
79+
stops the release. The final `verify:tutorials -- --release` check requires each
80+
video's page metadata to match its saved publication date.

‎docs/01-Getting Started/02-quick-start-project.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Quick Start Project
33
slug: "/quick-start-project"
4+
description: Create or open a Phoenix Code project, resume recent work, and reopen your website when the editor starts.
45
---
56

67
import React from 'react';
@@ -30,9 +31,29 @@ Additionally, if you prefer that the Start Project Dialog doesn't appear every t
3031

3132

3233

34+
## Reopen your project on startup
35+
36+
Phoenix Code remembers the last project folder you opened and tries to reopen it the next time you start the editor. To resume your own website:
37+
38+
1. Choose **Open Folder** in the Start Project dialog and select the folder containing your website.
39+
2. Open `index.html` or the file you want to work on, then save your changes.
40+
3. If you prefer to go straight to your work, turn off **Show This Dialog on Startup** in the Start Project dialog's settings.
41+
4. Close Phoenix Code normally and open it again.
42+
43+
The startup dialog setting controls the dialog's visibility. It does not choose a permanent favorite project: if you later open a different project, that becomes the project to resume.
44+
45+
### Desktop and browser differences
46+
47+
- **Desktop:** opening a particular file or folder from your operating system can take precedence over the previous project. The remembered folder also needs to remain available at the same location.
48+
- **Browser:** use the same browser profile and the same editor address. Local-folder access depends on browser permissions, so you may need to grant access again or use **Open Folder**. Projects stored in browser storage also depend on that browser's saved site data.
49+
50+
If your previous folder is missing or cannot be restored, open it again from **Recent Projects** or **Open Folder**. Phoenix Code can also fall back to the welcome project after an unsuccessful startup.
51+
3352
## Default Project
3453
The Start Project Dialog includes an option for creating a Default Project. When selected, a project will be generated with some files to provide a simple starting point for testing and using the Phoenix Code editor.
3554

55+
**Default Project** is a starter project. To reopen your own website at launch, use [Reopen your project on startup](#reopen-your-project-on-startup).
56+
3657
<VideoPlayer
3758
src="https://docs-images.phcode.dev/videos/quick-start-project/default-project.mp4"
3859
/>
@@ -63,6 +84,8 @@ You can create a new HTML project that includes essential files by following the
6384

6485
Once completed, a basic project structure will be generated in the selected folder.
6586

87+
Continue with [Add images to an HTML page](/docs/tutorials/add-images) or [Connect pages with links](/docs/tutorials/link-pages). Both tutorials include an example project you can download.
88+
6689
<VideoPlayer
6790
src="https://docs-images.phcode.dev/videos/quick-start-project/html-project.mp4"
6891
/>

‎docs/01-Getting Started/index.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Phoenix Code is for anyone building for the web, and especially:
5959

6060
- **Install it:** [Installation](/docs/intro)
6161
- **Create your first project:** [Your First Project](/docs/quick-start-project)
62+
- **Build something step by step:** [Tutorials](/docs/tutorials) — images, linked pages, sharing, Bootstrap, and Python.
6263
- **Our flagship feature:** [Live Preview](/docs/Features/Live%20Preview)
6364
- **Try the AI assistant:** [AI](/docs/Pro%20Features/ai-chat)
6465

‎docs/02-Live Preview/02-live-preview-edit.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ The right side of the Control Box displays a set of tools you can use to modify
9595
*This button appears only for `<a>` elements.*
9696
See the [Edit Hyperlink](#edit-hyperlink) section for more details.
9797

98-
- **Change Image** *(image icon)*: Opens an image gallery at the bottom of the Live Preview, where you can browse and select an image. You can also choose an image from your computer. Phoenix Code automatically saves the image to your project folder and updates the `src` attribute of the element.
98+
- **Image Gallery** *(image icon)*: Opens an image gallery at the bottom of the Live Preview. **Select from device** or the gallery's download icon saves a picture to your project and updates its `src`. Clicking an online thumbnail can use the provider's image URL instead.<br />
9999
*This button appears only for `<img>` elements.*
100-
See [Image Gallery](./image-gallery) for more details.
100+
See [Image Gallery](./image-gallery) for more details, or follow the [step-by-step image guide](/docs/tutorials/add-images).
101101

102102
- **Edit Text** *(pen icon)*: Opens inline text editing for the selected element. You can edit text directly in the Live Preview, and Phoenix Code automatically updates the source code.
103103
*This button appears only for elements that can contain text (it is not available for `<img>`, `<video>`, `<br>`, etc.).*

‎docs/02-Live Preview/07-image-gallery.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ import VideoPlayer from '@site/src/components/Video/player';
1212

1313
The **Image Gallery** is a panel that appears at the bottom of the Live Preview. It lets you browse images from online image providers or select images from your device.
1414

15+
To put your first photo on a page, follow [Add an image to your website](/docs/tutorials/add-images). Choose Community or Pro and work through the steps with the practice website.
16+
1517
> The Image Gallery is available only for `<img>` elements.
1618
17-
By default, the Image Gallery appears when you select an `<img>` element. You can close it by clicking the Change Image button in the Control Box or the close button in the gallery. To reopen it, click the Change Image button again.
19+
By default, the Image Gallery appears when you select an `<img>` element. You can close it by clicking the **Image Gallery** picture icon in the Control Box or the close button in the gallery. To reopen it, click the picture icon again.
1820

1921
![Image Gallery](../images/pro/image-gallery.png "Image Gallery")
2022

‎docs/02-Live Preview/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ The left side of the toolbar groups three controls:
8585
![Live Preview mode dropdown](../images/livePreview/lp-mode.png "Live Preview mode dropdown")
8686

8787
- **Preview Mode**: View-only. The page behaves like a normal browser but still updates as you edit code. All interactions with the page (clicks, hovers, etc.) are disabled.
88-
- **Highlight Mode**: Click any element to see its paddings and margins. Phoenix Code also jumps to that element in your source code so you can start editing right away.
88+
- **Highlight Mode**: Available in Community and Pro. Keep your HTML file open, then click an element in the preview to move the editor's cursor to its HTML and see its padding and margins. Select the code you want to replace before pasting. Follow the [image walkthrough](/docs/tutorials/add-images?edition=community) to try it.
8989
- **Edit Mode**: Edit elements directly in the preview. Insert elements, change text, drag elements, swap images, and more. Phoenix Code updates your source code automatically. [Learn more](../Pro%20Features/live-preview-edit).
9090

9191
When Edit Mode is active, two extra options appear in the same dropdown:

‎docs/05-Workspace/01-file-management.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import VideoPlayer from '@site/src/components/Video/player';
88

99
This section covers how **Phoenix Code** lets you manage, organize, and navigate files and folders within your projects.
1010

11+
To download several HTML files together or send your website to someone else, see [Share your website](/docs/tutorials/share-website), including [sending a ZIP](/docs/tutorials/share-website?share=zip).
12+
1113
## File Tree
1214

1315
The **File Tree** appears in the sidebar and shows the complete folder structure of the open project.

0 commit comments

Comments
 (0)