Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate all doc pages as Markdown format #4363

Merged
merged 9 commits into from
Feb 3, 2025
4 changes: 3 additions & 1 deletion .platform/applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@
rules:
\.(css|js|gif|jpe?g|png|ttf|eot|woff2?|otf|cast|mp4|json|yaml|ico|svg?|cast|mp4|json|yaml|svg?|ttf)$:
expires: 4w

\.md$:
headers:
Content-Type: text/markdown
disk: 1024

mounts:
Expand Down
12 changes: 12 additions & 0 deletions sites/upsun/config/_default/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,19 @@ summaryLength: 3
outputs:
home:
- HTML
- markdown
- JSON
- RSS
- devcenter
- llms
- llms-full
section:
- HTML
- markdown
- RSS
page:
- HTML
- markdown

outputFormats:
devcenter:
Expand All @@ -50,10 +55,17 @@ outputFormats:
baseName: "llms-full"
isPlainText: true
permalinkable: true
markdown:
mediaType: "text/markdown"
isPlainText: true
permalinkable: true
baseName: index

mediaTypes:
text/plain:
suffixes: ["txt"]
text/markdown:
suffixes: ["md"]

# Math typesetting as per 0.125.0 - https://gohugo.io/content-management/mathematics/
markup:
Expand Down
6 changes: 2 additions & 4 deletions sites/upsun/layouts/shortcodes/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ <h1>{{ .Site.Title }}</h1>
<p>Resources to help you customize, experiment, and optimize all from one platform.</p>

<div style="margin-top: 3rem;">
<a class="start-cta font-semibold text-sm xl:text-base px-4 py-2 bg-skye rounded text-white hover:bg-skye-dark focus:bg-skye-dark"
href="/get-started/here.html" rel="noopener">Get started</a>
<a class="info-cta font-semibold text-sm xl:text-base px-4 py-2 bg-skye rounded text-white hover:bg-skye-dark focus:bg-skye-dark"
href="/learn/overview.html" rel="noopener">What is {{ .Site.Params.vendor.name }}?</a>
<a href="/get-started/here.html" class="start-cta font-semibold text-sm xl:text-base px-4 py-2 bg-skye rounded text-white hover:bg-skye-dark focus:bg-skye-dark" rel="noopener">Get started</a>
<a href="/learn/overview.html" class="info-cta font-semibold text-sm xl:text-base px-4 py-2 bg-skye rounded text-white hover:bg-skye-dark focus:bg-skye-dark" rel="noopener">What is {{ .Site.Params.vendor.name }}?</a>
</div>


Expand Down
130 changes: 65 additions & 65 deletions sites/upsun/layouts/shortcodes/home/table.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,83 +3,83 @@
<details class="home-expanded">

{{ if eq $version "services" }}
<summary><strong>Managed services</strong>
<p>Services on our platform are managed. You can provision them with a few lines of YAML and quickly connect them to the rest of your environment. No infrastructure expertise is required.</p>
</summary>

<p><strong>Popular documentation:</strong></p>
<summary><strong>Managed services</strong>
<p>Services on our platform are managed. You can provision them with a few lines of YAML and quickly connect them to the rest of your environment. No infrastructure expertise is required.</p>
</summary>

<ul>
{{ with .Page.GetPage "/add-services" }}
{{ range .Pages }}
{{ if .Params.sidebarTitle }}
<li><a href="{{ .RelPermalink }}">{{ .Params.sidebarTitle }}</a></li>
{{ else }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
{{ end }}
{{ end }}
</ul>
<p><strong>Popular documentation:</strong></p>

<ul>
{{- with .Page.GetPage "/add-services" -}}
{{- range .Pages -}}
{{- if .Params.sidebarTitle }}
<li><a href="{{ .RelPermalink }}">{{ .Params.sidebarTitle }}</a></li>
{{- else }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{- end -}}
{{- end -}}
{{- end -}}
</ul>
{{ else if eq $version "languages" }}
<summary><strong>Runtime languages</strong>
<p>Like services, configure your application containers with one of many supported runtime <code>type</code>s.</p>
</summary>
<p><strong>Popular documentation:</strong></p>
<summary><strong>Runtime languages</strong>
<p>Like services, configure your application containers with one of many supported runtime <code>type</code>s.</p>
</summary>
<p><strong>Popular documentation:</strong></p>

<ul>
{{ with .Page.GetPage "/languages" }}
{{ range .Pages }}
{{ if .Params.sidebarTitle }}
<li><a href="{{ .RelPermalink }}">{{ .Params.sidebarTitle }}</a></li>
{{ else }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
{{ end }}
{{ end }}
</ul>
<ul>
{{- with .Page.GetPage "/languages" -}}
{{- range .Pages -}}
{{- if .Params.sidebarTitle }}
<li><a href="{{ .RelPermalink }}">{{ .Params.sidebarTitle }}</a></li>
{{- else }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{- end -}}
{{- end -}}
{{- end -}}
</ul>
{{ else if eq $version "configuration" }}
<summary><strong>Project & environment configuration</strong>
<p>Delve deeper into how to configure containers, environments, projects, and repositories.</p>
</summary>
<p><strong>Popular documentation:</strong></p>
<ul>
<li><a href="{{ with .Page.GetPage "/create-apps"}}{{ .RelPermalink }}{{ end}}">Application containers</a></li>
<li><a href="{{ with .Page.GetPage "/add-services"}}{{ .RelPermalink }}{{ end}}">Services & data</a></li>
<li><a href="{{ with .Page.GetPage "/define-routes"}}{{ .RelPermalink }}{{ end}}">Routes & requests</a></li>
<li><a href="{{ with .Page.GetPage "/development/variables"}}{{ .RelPermalink }}{{ end}}">Environment variables</a></li>
<li><a href="{{ with .Page.GetPage "/integrations"}}{{ .RelPermalink }}{{ end}}">Integrations & activities</a></li>
<li><a href="{{ with .Page.GetPage "/development/regions"}}{{ .RelPermalink }}{{ end}}">Regions</a></li>
</ul>
<summary><strong>Project & environment configuration</strong>
<p>Delve deeper into how to configure containers, environments, projects, and repositories.</p>
</summary>
<p><strong>Popular documentation:</strong></p>
<ul>
<li><a href="{{ with .Page.GetPage "/create-apps"}}{{ .RelPermalink }}{{ end}}">Application containers</a></li>
<li><a href="{{ with .Page.GetPage "/add-services"}}{{ .RelPermalink }}{{ end}}">Services & data</a></li>
<li><a href="{{ with .Page.GetPage "/define-routes"}}{{ .RelPermalink }}{{ end}}">Routes & requests</a></li>
<li><a href="{{ with .Page.GetPage "/development/variables"}}{{ .RelPermalink }}{{ end}}">Environment variables</a></li>
<li><a href="{{ with .Page.GetPage "/integrations"}}{{ .RelPermalink }}{{ end}}">Integrations & activities</a></li>
<li><a href="{{ with .Page.GetPage "/development/regions"}}{{ .RelPermalink }}{{ end}}">Regions</a></li>
</ul>
{{ else if eq $version "topics" }}
<summary><strong>Advanced topics</strong>
<p>Learn more about how you can customize and optimize your deployed projects, and further experiment on the platform.</p>
</summary>
<p><strong>Popular documentation:</strong></p>
<ul>
<li><a href="{{ with .Page.GetPage "/administration"}}{{ .RelPermalink }}{{ end}}">Project administration</a></li>
<li><a href="{{ with .Page.GetPage "/development/local/ddev"}}{{ .RelPermalink }}{{ end}}">Local development with DDEV</a></li>
<li><a href="{{ with .Page.GetPage "/increase-observability/application-metrics/blackfire"}}{{ .RelPermalink }}{{ end}}">Observability: Blackfire.io</a></li>
<li><a href="{{ with .Page.GetPage "/increase-observability/metrics"}}{{ .RelPermalink }}{{ end}}">Observability: Infrastructure metrics</a></li>
<li><a href="{{ with .Page.GetPage "/security"}}{{ .RelPermalink }}{{ end}}">Security & compliance</a></li>
<li><a href="{{ with .Page.GetPage "/create-apps/workers"}}{{ .RelPermalink }}{{ end}}">Workers</a></li>
<li><a href="{{ with .Page.GetPage "/development/sanitize-db" }}{{ .RelPermalink }}{{ end}}">Sanitizing data</a></li>
<li><a href="{{ with .Page.GetPage "/create-apps/multi-app"}}{{ .RelPermalink }}{{ end}}">Microservices and multi-app projects</a></li>
<li><a href="{{ with .Page.GetPage "/development/submodules"}}{{ .RelPermalink }}{{ end}}">Submodules</a></li>
<li><a href="{{ with .Page.GetPage "/development/private-repository"}}{{ .RelPermalink }}{{ end}}">Private repositories</a></li>
</ul>
<summary><strong>Advanced topics</strong>
<p>Learn more about how you can customize and optimize your deployed projects, and further experiment on the platform.</p>
</summary>
<p><strong>Popular documentation:</strong></p>
<ul>
<li><a href="{{ with .Page.GetPage "/administration"}}{{ .RelPermalink }}{{ end}}">Project administration</a></li>
<li><a href="{{ with .Page.GetPage "/development/local/ddev"}}{{ .RelPermalink }}{{ end}}">Local development with DDEV</a></li>
<li><a href="{{ with .Page.GetPage "/increase-observability/application-metrics/blackfire"}}{{ .RelPermalink }}{{ end}}">Observability: Blackfire.io</a></li>
<li><a href="{{ with .Page.GetPage "/increase-observability/metrics"}}{{ .RelPermalink }}{{ end}}">Observability: Infrastructure metrics</a></li>
<li><a href="{{ with .Page.GetPage "/security"}}{{ .RelPermalink }}{{ end}}">Security & compliance</a></li>
<li><a href="{{ with .Page.GetPage "/create-apps/workers"}}{{ .RelPermalink }}{{ end}}">Workers</a></li>
<li><a href="{{ with .Page.GetPage "/development/sanitize-db" }}{{ .RelPermalink }}{{ end}}">Sanitizing data</a></li>
<li><a href="{{ with .Page.GetPage "/create-apps/multi-app"}}{{ .RelPermalink }}{{ end}}">Microservices and multi-app projects</a></li>
<li><a href="{{ with .Page.GetPage "/development/submodules"}}{{ .RelPermalink }}{{ end}}">Submodules</a></li>
<li><a href="{{ with .Page.GetPage "/development/private-repository"}}{{ .RelPermalink }}{{ end}}">Private repositories</a></li>
</ul>
{{ end }}

</details>


<style>
.home-expanded {
border: 1px solid rgb(240 242 245);
padding: 1rem;
margin: 0.5rem 0;
cursor: pointer;
border: 2px solid #191C1E;
border: 1px solid rgb(240 242 245);
padding: 1rem;
margin: 0.5rem 0;
cursor: pointer;
border: 2px solid #191C1E;
color: #191C1E !important;
}

</style>
</style>
7 changes: 3 additions & 4 deletions sites/upsun/src/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Introduction
title: Upsun Docs
showTitle: false
editPage: false
feedback: false
Expand All @@ -17,24 +17,24 @@

### Get started

If you're still unfamiliar with {{% vendor/name %}} and how it works, _but_ you're also looking to quickly start working with the platform, the **Get started** section is the right place to begin.

Check warning on line 20 in sites/upsun/src/_index.md

View workflow job for this annotation

GitHub Actions / Lint markdown (upsun)

Emphasis should use `*` as a marker

Check warning on line 20 in sites/upsun/src/_index.md

View workflow job for this annotation

GitHub Actions / Lint markdown (upsun)

Line must be at most 140 characters

Learn the basics of how {{% vendor/name %}} leverages Git to produce reusable build images, identical-to-production environments in staging and development (including production data), as well as the basics of monitoring and troubleshooting your environments.

Check warning on line 22 in sites/upsun/src/_index.md

View workflow job for this annotation

GitHub Actions / Lint markdown (upsun)

Line must be at most 140 characters

Ready to get started? [Let's go!](/get-started/here)
Ready to get started? [Let's go!](/get-started/here/_index.md)

### Learn

After going through the **Get started** section, you may want to know more about how {{% vendor/name %}} works and the logic behind it. The **[Learn](/learn/_index.md)** section is a collection of tutorials and conceptual guides to help you understand the ins and outs of {{% vendor/name %}}.

Check warning on line 28 in sites/upsun/src/_index.md

View workflow job for this annotation

GitHub Actions / Lint markdown (upsun)

Line must be at most 140 characters

- [**What is {{% vendor/name %}}?**](/learn/overview/_index.md)

Check warning on line 30 in sites/upsun/src/_index.md

View workflow job for this annotation

GitHub Actions / Lint markdown (upsun)

Incorrect list-item indent: add 2 spaces

With this guide, find out which problem {{% vendor/name %}} is trying to solve.

Check warning on line 32 in sites/upsun/src/_index.md

View workflow job for this annotation

GitHub Actions / Lint markdown (upsun)

Don’t use mixed indentation for children, remove 2 spaces
Learn how {{% vendor/name %}}'s configuration, build and deploy pipelines, and the structure of environments play into the broader philosophy behind reliably deploying applications.

Check warning on line 33 in sites/upsun/src/_index.md

View workflow job for this annotation

GitHub Actions / Lint markdown (upsun)

Line must be at most 140 characters

- [**Tutorials**](/learn/tutorials/_index.md)

Check warning on line 35 in sites/upsun/src/_index.md

View workflow job for this annotation

GitHub Actions / Lint markdown (upsun)

Incorrect list-item indent: add 2 spaces

Once you're familiar with {{% vendor/name %}}, its basic rules and philosophy, you may be curious about how you can replicate common workflows in other tools on our platform.

Check warning on line 37 in sites/upsun/src/_index.md

View workflow job for this annotation

GitHub Actions / Lint markdown (upsun)

Don’t use mixed indentation for children, remove 2 spaces

Check warning on line 37 in sites/upsun/src/_index.md

View workflow job for this annotation

GitHub Actions / Lint markdown (upsun)

Line must be at most 140 characters
From scheduling dependency updates and backups to exporting data, the [**Tutorials**](/learn/tutorials/_index.md) provide all the information you need.

- [**Best practices**](/learn/bestpractices/_index.md)
Expand Down Expand Up @@ -74,8 +74,7 @@
Looking for a way to contribute?

<div style="margin-top: 3rem; text-align: center;">
<a class="start-cta font-semibold text-sm xl:text-base px-4 py-2 bg-skye rounded text-white hover:bg-skye-dark focus:bg-skye-dark"
href="https://discord.gg/PkMc2pVCDV" rel="noopener">Join us on Discord</a>
<a href="https://discord.gg/PkMc2pVCDV" class="start-cta font-semibold text-sm xl:text-base px-4 py-2 bg-skye rounded text-white hover:bg-skye-dark focus:bg-skye-dark" rel="noopener">Join us on Discord</a>
</div>

### Contribute
Expand Down
4 changes: 2 additions & 2 deletions sites/upsun/src/add-services/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ All services have their system timezone set to UTC by default.
For some services, you can change the timezone for the running service
(this doesn't affect the container itself and so logs are still in UTC).

* [MySQL](./mysql/_index.md#service-timezone)
* [PostgreSQL](./postgresql.md#service-timezone)
* [MySQL](/add-services/mysql/_index.md#service-timezone)
* [PostgreSQL](/add-services/postgresql.md#service-timezone)

## Connect to a service

Expand Down
2 changes: 1 addition & 1 deletion sites/upsun/src/add-services/elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ but they're at their end of life and are no longer receiving security updates fr
To ensure your project remains stable in the future,
switch to [a premium version](#supported-versions).

Alternatively, you can switch to one of the latest, free versions of [OpenSearch](./opensearch.md).
Alternatively, you can switch to one of the latest, free versions of [OpenSearch](/add-services/opensearch.md).
To do so, follow the same procedure as for [upgrading](#upgrading).

## Relationship reference
Expand Down
6 changes: 3 additions & 3 deletions sites/upsun/src/add-services/mysql/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ Possible permissions:
| Read-only | `ro` | Can select, create temporary tables, and see views. |
| Read-write | `rw` | In addition to read-only permissions, can also insert, update, delete, manage and execute events, execute routines, create and drop indexes, manage and execute triggers, and lock tables. |
| Admin | `admin` | In addition to read-write permissions, can also create, drop, and alter tables; create views; and create and alter routines. |
| Replication | `replication` | For [replicating databases](./mysql-replication.md). In addition to read-only permissions, can also lock tables. |
| Replication | `replication` | For [replicating databases](/add-services/mysql/mysql-replication.md). In addition to read-only permissions, can also lock tables. |

## Multiple databases

Expand Down Expand Up @@ -863,9 +863,9 @@ To ensure people who review code changes can't access personally identifiable in
There is no on-site primary/replica support in your environments.

In rare cases (such as for certain backup purposes),
you can also enable [remote replication](./mysql-replication.md) to your own replica data.
you can also enable [remote replication](/add-services/mysql/mysql-replication.md) to your own replica data.
The replica isn't available to your application.

## Troubleshoot

If you run into issues, [troubleshoot MySQL](./troubleshoot.md).
If you run into issues, [troubleshoot MySQL](/add-services/mysql/troubleshoot.md).
4 changes: 2 additions & 2 deletions sites/upsun/src/add-services/mysql/troubleshoot.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This is typically caused by one of the following:
while code path 2 first locks record B and then locks record A.
* There is a long running background process executed by your application that holds the lock until it ends.

If you're using [MariaDB 10+](./_index.md), use the SQL query `SHOW FULL PROCESSLIST \G` to list DB queries waiting for locks.
If you're using [MariaDB 10+](/add-services/mysql/_index.md), use the SQL query `SHOW FULL PROCESSLIST \G` to list DB queries waiting for locks.
To determine where to debug, find output like the following:

```sql
Expand Down Expand Up @@ -71,7 +71,7 @@ to learn about low disk space before it becomes an issue.
`MySQL server has gone away` errors may be caused by the size of the database packets.
If so, the logs may show warnings like `Error while sending QUERY packet` before the error.

One way to resolve the issue is to use the [`max_allowed_packet` parameter](./_index.md#configure-the-database).
One way to resolve the issue is to use the [`max_allowed_packet` parameter](/add-services/mysql/_index.md#configure-the-database).

### Worker timeout

Expand Down
8 changes: 4 additions & 4 deletions sites/upsun/src/administration/organizations.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: See how to manage multiple {{% vendor/name %}} projects at once thr
Organizations allow you to manage your {{% vendor/name %}} projects, users, and billing.
You can group multiple projects in one organization and manage them together.

To manage users within your organization, see how to [manage organization users](./users.md#manage-organization-users).
To manage users within your organization, see how to [manage organization users](/administration/users.md#manage-organization-users).

## Manage your organization settings

Expand Down Expand Up @@ -142,9 +142,9 @@ To delete the organization `acme`, run:
## Transfer project ownership

You can transfer your plan ownership to a different organization at anytime.
You have to be an organization owner or have the [manage plan permission](./users.md#organization-permissions).
You have to be an organization owner or have the [manage plan permission](/administration/users.md#organization-permissions).

1. Make the new organization owner a [project admin](./users.md#)
1. Make the new organization owner a [project admin](/administration/users.md#)
for the project you want to transfer.
2. To ask for the transfer, from your organization account open a [support ticket](/learn/overview/get-support).

Expand All @@ -154,5 +154,5 @@ Ownership transfer automatically transfers subscription charges to the new organ
## Transfer organization ownership

To transfer an organization to a different owner, first make sure that user is part of the organization.
If they aren't yet, [add them](./users.md#add-a-user-to-an-organization).
If they aren't yet, [add them](/administration/users.md#add-a-user-to-an-organization).
Then open a [support ticket](/learn/overview/get-support) from the current organization to ask for the transfer.
6 changes: 3 additions & 3 deletions sites/upsun/src/administration/web/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ This Console offers you ways to manage projects and environments other than the

## Project list

Opening the [Console](https://console.upsun.com) takes you to the first organization you joined as a
Opening the [Console](https://console.upsun.com) takes you to the first organization you joined as a
{{% vendor/name %}} user.
You get an overview of all your projects within that organization.
You can narrow the list down by searching for specific projects,
or switch to a different organization from the menu in the top left-hand corner.

Once you select a project, you can [configure the project settings](./configure-project.md).
You can also choose individual environments within the project and [configure each environment](./configure-environment.md).
Once you select a project, you can [configure the project settings](/administration/web/configure-project.md).
You can also choose individual environments within the project and [configure each environment](/administration/web/configure-environment.md).

You can also create a new project by clicking **+ Create project**.

Expand Down
4 changes: 2 additions & 2 deletions sites/upsun/src/create-apps/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ applications:
You might have multiple apps you want to run from a single Git repository,
such as a RESTful web service and a front-end or a main website and a blog.
In such cases, you configure each app separately and define the relationships among them.
See the various ways to set up a [multi-app project](./multi-app/_index.md).
See the various ways to set up a [multi-app project](/create-apps/multi-app/_index.md).

## Connect to services

Expand All @@ -73,7 +73,7 @@ If you're running a PHP or Node.js app, this starts with the [build flavor](/cre
which runs a default set of tasks.
Then any [global dependencies](/create-apps/app-reference/single-runtime-image.md#dependencies) can be installed.

Once these optional tasks are done, you can run [hooks](./hooks/_index.md) at various points in the process.
Once these optional tasks are done, you can run [hooks](/create-apps/hooks/_index.md) at various points in the process.
Hooks are places for your custom scripts to control how your app is built and deployed.

## Configure what's served
Expand Down
2 changes: 1 addition & 1 deletion sites/upsun/src/create-apps/hooks/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ layout: single
As your app goes through the [build and deploy process](/learn/overview/build-deploy.md),
you might want to run custom commands.
These might include compiling the app, setting the configuration for services based on variables, and rebuilding search indexes.
Do these tasks using one of [three hooks](./hooks-comparison.md).
Do these tasks using one of [three hooks](/create-apps/hooks/hooks-comparison.md).

The following example goes through each of these hooks for a multi-app project

Expand Down
Loading
Loading