Skip to content

Commit db8022c

Browse files
authored
refactor for better link jumping (#309)
1 parent e7a5972 commit db8022c

6 files changed

Lines changed: 478 additions & 461 deletions

File tree

apps/docs/content/nginx/how-to/build-pipeline.mdx

Lines changed: 95 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,18 @@ description: Learn more about how you can configure your nginx service for build
66
import data from '@site/static/data.json';
77
import UnorderedCodeList from 'docs/src/components/UnorderedCodeList';
88

9-
import GroupCards from '@site/src/components/GroupCards';
10-
11-
export const languages = [
12-
{ name: "Node.js", link: "/nodejs/how-to/build-pipeline" },
13-
{ name: "PHP", link: "/php/how-to/build-pipeline" },
14-
{ name: "Python", link: "/python/how-to/build-pipeline" },
15-
{ name: "Go", link: "/go/how-to/build-pipeline" },
16-
{ name: ".NET", link: "/dotnet/how-to/build-pipeline" },
17-
{ name: "Rust", link: "/rust/how-to/build-pipeline" },
18-
{ name: "Java", link: "/java/how-to/build-pipeline" },
19-
]
20-
219
Zerops provides a customizable build and runtime environment for your static content.
2210

23-
Zerops supports different build environments:
11+
:::tip Two Deployment Approaches
12+
You can use the Nginx service in two ways:
13+
- **Runtime only**: Deploy pre-built static files directly (no build phase needed)
14+
- **Build + Runtime**: Use a frontend framework (Node.js, PHP, Python, etc.) to build your application, then serve it with Nginx
2415

25-
<GroupCards id="build-sections" emoji="🚀" heading="Know more about build environments for your Runtime" items={languages} />
16+
The build phase is completely optional. If you already have built files, skip the build section and configure only the [runtime](#runtime-configuration).
2617

2718
If you just need to deploy your static content, use the [manual deploy](/nginx/how-to/trigger-pipeline#manual-deploy-using-zerops-cli) via Zerops CLI.
19+
:::
20+
2821

2922
## Add zerops.yaml to your repository
3023

@@ -35,8 +28,11 @@ zerops:
3528
# define hostname of your service
3629
- setup: app
3730
# ==== how to build your application ====
31+
# OPTIONAL. If you need to build your static files using a framework,
32+
# configure the build environment here. If you already have built files,
33+
# you can skip this entire section and deploy directly to the runtime.
3834
build:
39-
# REQUIRED. Set the base technology for the build environment:
35+
# REQUIRED (if using build). Set the base technology for the build environment:
4036
base: nodejs@latest
4137

4238
# OPTIONAL. Set the operating system for the build environment.
@@ -53,7 +49,7 @@ zerops:
5349
- npm i
5450
- npm run build
5551

56-
# REQUIRED. Select which files / folders to deploy after
52+
# REQUIRED (if using build). Select which files / folders to deploy after
5753
# the build has successfully finished
5854
deployFiles:
5955
- dist
@@ -137,7 +133,7 @@ zerops:
137133
- setup: app
138134
# ==== how to build your application ====
139135
build:
140-
# REQUIRED. Sets the base technology for the build environment:
136+
# REQUIRED (if using build). Sets the base technology for the build environment:
141137
base: nodejs@latest
142138
...
143139
@@ -165,7 +161,7 @@ zerops:
165161
- setup: app
166162
# ==== how to build your application ====
167163
build:
168-
# REQUIRED. Sets the base technology for the build environment:
164+
# REQUIRED (if using build). Sets the base technology for the build environment:
169165
base: nodejs@latest
170166
...
171167
@@ -227,24 +223,24 @@ Each port has following attributes:
227223

228224
<table className="w-full my-1.5">
229225
<thead>
230-
<tr>
231-
<th className="w-fit"><strong>Parameter</strong></th>
232-
<th className="w-fit"><strong>Description</strong></th>
233-
</tr>
226+
<tr>
227+
<th className="w-fit"><strong>Parameter</strong></th>
228+
<th className="w-fit"><strong>Description</strong></th>
229+
</tr>
234230
</thead>
235231
<tbody>
236-
<tr>
237-
<td className="w-fit">port</td>
238-
<td className="w-fit">Defines the port number. You can set any port number between <em>10</em> and <em>65435</em>. Ports outside this interval are reserved for internal Zerops systems.</td>
239-
</tr>
240-
<tr>
241-
<td className="w-fit">protocol</td>
242-
<td className="w-fit"><strong>Optional.</strong> Defines the protocol. Allowed values are <code>TCP</code> or <code>UDP</code>. Default value is <code>TCP</code>.</td>
243-
</tr>
244-
<tr>
245-
<td className="w-fit">httpSupport</td>
246-
<td className="w-fit"><strong>Optional.</strong> <code>httpSupport = true</code> is the default setting for TCP protocol. Set <code>httpSupport = false</code> if a web server isn't running on the port. Zerops uses this information for the configuration of <a href="/features/access">public access</a>. <code>httpSupport = true</code> is available only in combination with the TCP protocol.</td>
247-
</tr>
232+
<tr>
233+
<td className="w-fit">port</td>
234+
<td className="w-fit">Defines the port number. You can set any port number between <em>10</em> and <em>65435</em>. Ports outside this interval are reserved for internal Zerops systems.</td>
235+
</tr>
236+
<tr>
237+
<td className="w-fit">protocol</td>
238+
<td className="w-fit"><strong>Optional.</strong> Defines the protocol. Allowed values are <code>TCP</code> or <code>UDP</code>. Default value is <code>TCP</code>.</td>
239+
</tr>
240+
<tr>
241+
<td className="w-fit">httpSupport</td>
242+
<td className="w-fit"><strong>Optional.</strong> <code>httpSupport = true</code> is the default setting for TCP protocol. Set <code>httpSupport = false</code> if a web server isn't running on the port. Zerops uses this information for the configuration of <a href="/features/access">public access</a>. <code>httpSupport = true</code> is available only in combination with the TCP protocol.</td>
243+
</tr>
248244
</tbody>
249245
</table>
250246

@@ -450,28 +446,28 @@ Following attributes are available:
450446

451447
<table className="w-full my-1.5">
452448
<thead>
453-
<tr>
454-
<th className="w-fit whitespace-nowrap">Parameter</th>
455-
<th className="w-fit whitespace-nowrap">Description</th>
456-
</tr>
449+
<tr>
450+
<th className="w-fit whitespace-nowrap">Parameter</th>
451+
<th className="w-fit whitespace-nowrap">Description</th>
452+
</tr>
457453
</thead>
458454
<tbody>
459-
<tr>
460-
<td className="w-fit whitespace-nowrap font-semibold">port</td>
461-
<td>Defines the port of the HTTP GET request.<br/>The readiness check will trigger a GET request on <code>{'http://127.0.0.1:{port}/{path}'}</code></td>
462-
</tr>
463-
<tr>
464-
<td className="w-fit whitespace-nowrap font-semibold">path</td>
465-
<td>Defines the URL path of the HTTP GET request.<br/>The readiness check will trigger a GET request on <code>{'http://127.0.0.1:{port}/{path}'}</code></td>
466-
</tr>
467-
<tr>
468-
<td className="w-fit whitespace-nowrap font-semibold">host</td>
469-
<td><strong>Optional.</strong> The readiness check is triggered from inside of your runtime container so it always uses the localhost <code>127.0.0.1</code>. If you need to add a <code>host</code> to the request header, specify it in the <code>host</code> attribute.</td>
470-
</tr>
471-
<tr>
472-
<td className="w-fit whitespace-nowrap font-semibold">scheme</td>
473-
<td><strong>Optional.</strong> The readiness check is triggered from inside of your runtime container so no https is required.<br/>If your application requires a https request, set <code>scheme: https</code></td>
474-
</tr>
455+
<tr>
456+
<td className="w-fit whitespace-nowrap font-semibold">port</td>
457+
<td>Defines the port of the HTTP GET request.<br/>The readiness check will trigger a GET request on <code>{'http://127.0.0.1:{port}/{path}'}</code></td>
458+
</tr>
459+
<tr>
460+
<td className="w-fit whitespace-nowrap font-semibold">path</td>
461+
<td>Defines the URL path of the HTTP GET request.<br/>The readiness check will trigger a GET request on <code>{'http://127.0.0.1:{port}/{path}'}</code></td>
462+
</tr>
463+
<tr>
464+
<td className="w-fit whitespace-nowrap font-semibold">host</td>
465+
<td><strong>Optional.</strong> The readiness check is triggered from inside of your runtime container so it always uses the localhost <code>127.0.0.1</code>. If you need to add a <code>host</code> to the request header, specify it in the <code>host</code> attribute.</td>
466+
</tr>
467+
<tr>
468+
<td className="w-fit whitespace-nowrap font-semibold">scheme</td>
469+
<td><strong>Optional.</strong> The readiness check is triggered from inside of your runtime container so no https is required.<br/>If your application requires a https request, set <code>scheme: https</code></td>
470+
</tr>
475471
</tbody>
476472
</table>
477473

@@ -507,20 +503,20 @@ Following attributes are available:
507503

508504
<table className="w-full my-1.5">
509505
<thead>
510-
<tr>
511-
<th className="w-fit"><strong>Parameter</strong></th>
512-
<th className="w-fit"><strong>Description</strong></th>
513-
</tr>
506+
<tr>
507+
<th className="w-fit"><strong>Parameter</strong></th>
508+
<th className="w-fit"><strong>Description</strong></th>
509+
</tr>
514510
</thead>
515511
<tbody>
516-
<tr>
517-
<td className="w-fit"><strong>command</strong></td>
518-
<td className="w-fit">
519-
Defines a local command to be run.<br/>
520-
The command has access to the same <a href="/nginx/how-to/create#set-secret-environment-variables">environment variables</a> as your Nginx application.<br/>
521-
A single string is required. If you need to run multiple commands create a shell script or, use a multiline format as in the example below.
522-
</td>
523-
</tr>
512+
<tr>
513+
<td className="w-fit"><strong>command</strong></td>
514+
<td className="w-fit">
515+
Defines a local command to be run.<br/>
516+
The command has access to the same <a href="/nginx/how-to/create#set-secret-environment-variables">environment variables</a> as your Nginx application.<br/>
517+
A single string is required. If you need to run multiple commands create a shell script or, use a multiline format as in the example below.
518+
</td>
519+
</tr>
524520
</tbody>
525521
</table>
526522

@@ -566,28 +562,28 @@ Following attributes are available:
566562

567563
<table className="w-full my-1.5">
568564
<thead>
569-
<tr>
570-
<th className="w-fit whitespace-nowrap">Parameter</th>
571-
<th className="w-fit whitespace-nowrap">Description</th>
572-
</tr>
565+
<tr>
566+
<th className="w-fit whitespace-nowrap">Parameter</th>
567+
<th className="w-fit whitespace-nowrap">Description</th>
568+
</tr>
573569
</thead>
574570
<tbody>
575-
<tr>
576-
<td className="w-fit whitespace-nowrap font-semibold">port</td>
577-
<td>Defines the port of the HTTP GET request.<br/>The readiness check will trigger a GET request on <code>{'http://127.0.0.1:{port}/{path}'}</code></td>
578-
</tr>
579-
<tr>
580-
<td className="w-fit whitespace-nowrap font-semibold">path</td>
581-
<td>Defines the URL path of the HTTP GET request.<br/>The readiness check will trigger a GET request on <code>{'http://127.0.0.1:{port}/{path}'}</code></td>
582-
</tr>
583-
<tr>
584-
<td className="w-fit whitespace-nowrap font-semibold">host</td>
585-
<td><strong>Optional.</strong> The readiness check is triggered from inside of your runtime container so it always uses the localhost <code>127.0.0.1</code>. If you need to add a <code>host</code> to the request header, specify it in the <code>host</code> attribute.</td>
586-
</tr>
587-
<tr>
588-
<td className="w-fit whitespace-nowrap font-semibold">scheme</td>
589-
<td><strong>Optional.</strong> The readiness check is triggered from inside of your runtime container so no https is required.<br/>If your application requires a https request, set <code>scheme: https</code></td>
590-
</tr>
571+
<tr>
572+
<td className="w-fit whitespace-nowrap font-semibold">port</td>
573+
<td>Defines the port of the HTTP GET request.<br/>The readiness check will trigger a GET request on <code>{'http://127.0.0.1:{port}/{path}'}</code></td>
574+
</tr>
575+
<tr>
576+
<td className="w-fit whitespace-nowrap font-semibold">path</td>
577+
<td>Defines the URL path of the HTTP GET request.<br/>The readiness check will trigger a GET request on <code>{'http://127.0.0.1:{port}/{path}'}</code></td>
578+
</tr>
579+
<tr>
580+
<td className="w-fit whitespace-nowrap font-semibold">host</td>
581+
<td><strong>Optional.</strong> The readiness check is triggered from inside of your runtime container so it always uses the localhost <code>127.0.0.1</code>. If you need to add a <code>host</code> to the request header, specify it in the <code>host</code> attribute.</td>
582+
</tr>
583+
<tr>
584+
<td className="w-fit whitespace-nowrap font-semibold">scheme</td>
585+
<td><strong>Optional.</strong> The readiness check is triggered from inside of your runtime container so no https is required.<br/>If your application requires a https request, set <code>scheme: https</code></td>
586+
</tr>
591587
</tbody>
592588
</table>
593589

@@ -622,20 +618,20 @@ Following attributes are available:
622618

623619
<table className="w-full my-1.5">
624620
<thead>
625-
<tr>
626-
<th className="w-fit"><strong>Parameter</strong></th>
627-
<th className="w-fit"><strong>Description</strong></th>
628-
</tr>
621+
<tr>
622+
<th className="w-fit"><strong>Parameter</strong></th>
623+
<th className="w-fit"><strong>Description</strong></th>
624+
</tr>
629625
</thead>
630626
<tbody>
631-
<tr>
632-
<td className="w-fit"><strong>command</strong></td>
633-
<td className="w-fit">
634-
Defines a local command to be run.<br/>
635-
The command has access to the same <a href="/nginx/how-to/create#set-secret-environment-variables">environment variables</a> as your Nginx application.<br/>
636-
A single string is required. If you need to run multiple commands create a shell script or, use a multiline format as in the example below.
637-
</td>
638-
</tr>
627+
<tr>
628+
<td className="w-fit"><strong>command</strong></td>
629+
<td className="w-fit">
630+
Defines a local command to be run.<br/>
631+
The command has access to the same <a href="/nginx/how-to/create#set-secret-environment-variables">environment variables</a> as your Nginx application.<br/>
632+
A single string is required. If you need to run multiple commands create a shell script or, use a multiline format as in the example below.
633+
</td>
634+
</tr>
639635
</tbody>
640636
</table>
641637

@@ -660,4 +656,4 @@ zerops:
660656
mv /outside/user /home/user
661657
```
662658

663-
Read more about how the [readiness check works](/nginx/how-to/deploy-process#readiness-checks) in Zerops.
659+
Read more about how the [readiness check works](/nginx/how-to/deploy-process#readiness-checks) in Zerops.

apps/docs/content/nginx/how-to/customize-web-server.mdx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,19 @@ zerops:
8585

8686
6. [Trigger](/nginx/how-to/trigger-pipeline) the build & deploy pipeline.
8787

88-
### Built-in Prerender.io Support
88+
## SEO & Prerender Support
8989

90-
The default Nginx configuration includes automatic prerender.io support for SEO optimization. When `PRERENDER_TOKEN` is set, Nginx will automatically serve pre-rendered content to search engines and social media crawlers.
90+
Single Page Applications and JavaScript-heavy sites render content client-side, which most crawlers can't process—they see an empty page instead of your content. This affects traditional search engines, social media platforms, and AI tools like ChatGPT, Perplexity, and Claude.
9191

92-
See [environment variables](/nginx/how-to/env-variables#prerenderio-support) for configuration details.
92+
### Built-in Prerender.io Integration
93+
94+
The default Nginx configuration includes automatic [Prerender.io](https://prerender.io) support. When enabled, it detects crawler requests (including AI crawlers) and serves them pre-rendered HTML while your users get the full interactive experience.
95+
96+
### Setup
97+
98+
To enable prerender support:
99+
100+
1. Set the `PRERENDER_TOKEN` environment variable with your Prerender.io token (see [environment variables](/nginx/how-to/env-variables#prerenderio-support))
101+
2. Optionally set `PRERENDER_HOST` if using a custom prerender server
102+
103+
The Nginx configuration will automatically handle the rest—no additional configuration needed.

0 commit comments

Comments
 (0)