52 lines
1.3 KiB
Markdown
52 lines
1.3 KiB
Markdown
# Haiyi Public Site
|
|
|
|
This directory contains the public website for `www.haiyihy.com` and the H5 landing pages for `h5.haiyihy.com`.
|
|
|
|
## Structure
|
|
|
|
- `content/site.json`: Official website and company-level content.
|
|
- `content/legal.json`: Privacy policy and terms content.
|
|
- `content/landing-pages/*.json`: One JSON file per H5 landing page.
|
|
- `src/site.css`: Shared styling for all generated pages.
|
|
- `scripts/build.mjs`: Static site generator.
|
|
- `scripts/new-landing-page.mjs`: Scaffolds a new landing page JSON file.
|
|
|
|
## Local workflow
|
|
|
|
```bash
|
|
cd public-site
|
|
node ./scripts/build.mjs
|
|
```
|
|
|
|
The generated output is written to `public-site/dist`:
|
|
|
|
- `dist/www`: content for `www.haiyihy.com`
|
|
- `dist/h5`: content for `h5.haiyihy.com`
|
|
|
|
## Landing page management
|
|
|
|
Current management is file-driven:
|
|
|
|
1. Duplicate an existing JSON file under `content/landing-pages/`, or run:
|
|
|
|
```bash
|
|
cd public-site
|
|
node ./scripts/new-landing-page.mjs your-page-slug
|
|
```
|
|
|
|
2. Edit the JSON content only. No Vue or HTML editing is required.
|
|
3. Rebuild the site:
|
|
|
|
```bash
|
|
cd public-site
|
|
node ./scripts/build.mjs
|
|
```
|
|
|
|
4. Run the public-site deployment script:
|
|
|
|
```bash
|
|
./deploy/tencent-prod/.venv/bin/python ./deploy/tencent-prod/deploy_public_site.py
|
|
```
|
|
|
|
If you later want a browser-based online editor with persistence, this structure is already suitable for adding a small API or CMS layer.
|