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

doc: fix guides according to vale linter recommendations #194

Merged
merged 18 commits into from
Feb 27, 2024
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
10 changes: 10 additions & 0 deletions .github/styles/.vale-config/0-Hugo.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[*.md]
# Exclude `{{< ... >}}`, `{{% ... %}}`, [Who]({{< ... >}})
TokenIgnores = ({{[%<] .* [%>]}}.*?{{[%<] ?/.* [%>]}}), \
(\[.+\]\({{< .+ >}}\)), \
({{[%<] .+ [%>]}})

# Exclude `{{< myshortcode `This is some <b>HTML</b>, ... >}}`
BlockIgnores = (?sm)^({{[%<] [^{]*? [%>]}})\n$, \
(?s) *({{< highlight [^>]* ?>}}.*?{{< ?/ ?highlight >}}), \
({{[%<] .+ [%>]}})
11 changes: 11 additions & 0 deletions .github/styles/config/vocabularies/Doc/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,14 @@ Hextra
shortcode
OAuth
cron
Moodle
application
rclone
Laravel
monolog
syslog
proxyhugo
Filezilla
eg
CLI
FTP
2 changes: 2 additions & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Packages = Hugo, Google
[*.md]
BasedOnStyles = Vale, Google
Google.Headings = NO
Vale.Terms = NO
Google.Parens = NO

[*.xml]
Transform = docbook-xsl-snapshot/html/docbook.xsl
11 changes: 6 additions & 5 deletions content/doc/applications/docker/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,17 @@ Clever Cloud allows you to deploy any application running inside a Docker contai
[FS Buckets](/doc/best-practices/cloud-storage/#what-is-fs-bucket) access, Dockerfile validation, and Docker Compose functionalities are not supported.
{{< /callout >}}

{{< readfile file="set-env-vars.md" >}}
{{% content/set-env-vars %}}

{{< readfile file="language-specific-deploy/docker.md" >}}

{{< readfile file="env-injection.md" >}}
{{% content/env-injection %}}

{{< readfile file="deploy-git.md" >}}
{{% content/deploy-git %}}

{{< readfile file="link-addon.md" >}}
{{% content/link-addon %}}

{{< readfile file="more-config.md" >}}

{{% content/more-config %}}

{{< readfile file="url_healthcheck.md" >}}
15 changes: 8 additions & 7 deletions content/doc/applications/dotnet/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,21 @@ You do not need to change a lot in your application, the *requirements* will hel
If you encounter an issue, please contact the support.
{{< /callout >}}

{{< readfile file="create-application.md" >}}
{{% content/create-application %}}

{{< readfile file="set-env-vars.md" >}}
{{% content/set-env-vars %}}

{{% readfile file="language-specific-deploy/dotnet.md" %}}

{{< readfile file="env-injection.md" >}}
{{% content/env-injection %}}

To access environment variables from your code, you can use `System.Environment.GetEnvironmentVariable("MY_VARIABLE")"`.

{{< readfile file="deploy-git.md" >}}
{{% content/deploy-git %}}

{{< readfile file="link-addon.md" >}}

{{< readfile file="more-config.md" >}}
{{% content/link-addon %}}
{{% content/more-config %}}

{{< readfile file="url_healthcheck.md" >}}

10 changes: 5 additions & 5 deletions content/doc/applications/elixir/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ aliases:

Clever Cloud supports Elixir based applications.

{{< readfile file="create-application.md" >}}
{ {{% content/create-application %}}

{{< readfile file="set-env-vars.md" >}}
{{% content/set-env-vars %}}

{{< readfile file="language-specific-deploy/elixir.md" >}}

{{< readfile file="deploy-git.md" >}}
{{% content/deploy-git %}}

{{< readfile file="link-addon.md" >}}
{{% content/link-addon %}}

{{< readfile file="more-config.md" >}}
{{% content/more-config %}}
11 changes: 6 additions & 5 deletions content/doc/applications/golang/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ aliases:

Clever Cloud allows you to deploy any Go application. This page will explain you how to set up your project to run it on our service. You won't not need to change a lot, the *requirements* will help you configure your applications with some mandatory files to add, and properties to setup.

{{< readfile file="create-application.md" >}}
{{% content/create-application %}}

{{< readfile file="set-env-vars.md" >}}
{{% content/set-env-vars %}}

{{< readfile file="language-specific-deploy/go.md" >}}

{{< readfile file="deploy-git.md" >}}
{{% content/deploy-git %}}

{{< readfile file="link-addon.md" >}}
{{% content/link-addon %}}

{{< readfile file="more-config.md" >}}
{{% content/more-config %}}

{{< readfile file="url_healthcheck.md" >}}

10 changes: 5 additions & 5 deletions content/doc/applications/haskell/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ Haskell is a purely functional language, especially suited for robust web applic

There are many ways to write web applications in haskell, from raw [WAI](https://hackage.haskell.org/package/wai) to full-stack frameworks like [Yesod](https://www.yesodweb.com/), simple libraries like [scotty](https://hackage.haskell.org/package/scotty) or type-safe solutions like [servant](https://haskell-servant.GitHub.io/).

{{< readfile file="create-application.md" >}}
{ {{% content/create-application %}}

{{< readfile file="set-env-vars.md" >}}
{{% content/set-env-vars %}}

{{< readfile file="language-specific-deploy/haskell.md" >}}

{{< readfile file="deploy-git.md" >}}
{{% content/deploy-git %}}

{{< readfile file="link-addon.md" >}}
{{% content/link-addon %}}

{{< readfile file="more-config.md" >}}
{{% content/more-config %}}
10 changes: 5 additions & 5 deletions content/doc/applications/java/java-gradle.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Gradle is a project automation tool that builds upon the concepts of Apache Ant

Note : like other runtimes, Java application need listen on `0.0.0.0:8080`

{{< readfile file="create-application.md" >}}
{ {{% content/create-application %}}

{{< readfile file="set-env-vars.md" >}}
{{% content/set-env-vars %}}

{{< readfile file="java-versions.md" >}}

Expand Down Expand Up @@ -115,10 +115,10 @@ Just create and commit the `gradlew` file and the wrapper `jar` and `properties`
{{< /filetree/folder >}}
{{< /filetree/container >}}

{{< readfile file="new-relic.md" >}}
{{% content/new-relic %}}

{{< readfile file="deploy-git.md" >}}
{{% content/deploy-git %}}

{{< readfile file="more-config.md" >}}
{{% content/more-config %}}

{{< readfile file="url_healthcheck.md" >}}
12 changes: 6 additions & 6 deletions content/doc/applications/java/java-jar.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ Clever Cloud offers you to run any Java ARchive file. You do not need to change

Note : like other runtimes, Java application needs to listen on `0.0.0.0:8080`

{{< readfile file="create-application.md" >}}
{ {{% content/create-application %}}

{{< readfile file="set-env-vars.md" >}}
{{% content/set-env-vars %}}

{{< readfile file="java-versions.md" >}}

Expand Down Expand Up @@ -104,7 +104,7 @@ You can use the following properties:
| Optional | **deploy → goal** | the goal/target and options you want to execute to deploy/run you project |
| Required | **build → jarName** | jar file name of your application |

{{< readfile file="new-relic.md" >}}
{{% content/new-relic %}}

## Custom run command

Expand All @@ -129,10 +129,10 @@ So, to use a variable, you just need `System.getProperties().getProperty("MY_VAR

For Groovy applications, just use the `System.getProperty("MY_VARIABLE")`.

{{< readfile file="deploy-git.md" >}}
{{% content/deploy-git %}}

{{< readfile file="link-addon.md" >}}
{{% content/link-addon %}}

{{< readfile file="more-config.md" >}}
{{% content/more-config %}}

{{< readfile file="url_healthcheck.md" >}}
12 changes: 6 additions & 6 deletions content/doc/applications/java/java-maven.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ Maven is essentially a project management and comprehension tool and as such pro
* Releases
* Distribution

{{< readfile file="create-application.md" >}}
{ {{% content/create-application %}}

{{< readfile file="set-env-vars.md" >}}
{{% content/set-env-vars %}}

## Configure your Java application

Expand Down Expand Up @@ -121,12 +121,12 @@ Example:
CC_RUN_COMMAND="java -jar somefile.jar <options>"
```

{{< readfile file="new-relic.md" >}}
{{% content/new-relic %}}

{{< readfile file="deploy-git.md" >}}
{{% content/deploy-git %}}

{{< readfile file="link-addon.md" >}}
{{% content/link-addon %}}

{{< readfile file="more-config.md" >}}
{{% content/more-config %}}

{{< readfile file="url_healthcheck.md" >}}
12 changes: 6 additions & 6 deletions content/doc/applications/java/java-war.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ The supported containers are listed below:
| Apache Tomcat 7.0 (TOMCAT7) | Jetty 9.0 (JETTY9) | WildFly 24.0.1 (WILDFLY24) |
| Apache Tomcat 8.8 (TOMCAT8) |

{{< readfile file="create-application.md" >}}
{ {{% content/create-application %}}

{{< readfile file="set-env-vars.md" >}}
{{% content/set-env-vars %}}

{{< readfile file="java-versions.md" >}}

Expand Down Expand Up @@ -170,10 +170,10 @@ Example:
CC_RUN_COMMAND="java -jar somefile.jar <options>"
```

{{< readfile file="new-relic.md" >}}
{{% content/new-relic %}}

{{< readfile file="deploy-git.md" >}}
{{% content/deploy-git %}}

{{< readfile file="link-addon.md" >}}
{{% content/link-addon %}}

{{< readfile file="more-config.md" >}}
{{% content/more-config %}}
12 changes: 6 additions & 6 deletions content/doc/applications/javascript/meteor.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Clever Cloud allows you to deploy any Meteor.js application. This page will expl

Be sure your `.meteor` folder is in your git repository.

{{< readfile file="create-application.md" >}}
{{% content/create-application %}}

{{< readfile file="set-env-vars.md" >}}
{{% content/set-env-vars %}}

## Configure your Meteor.js based application

Expand Down Expand Up @@ -81,11 +81,11 @@ Add in the `scripts.start` field of the package.json: `node .build/bundle/main.j
At each deployment, the needed Meteor.js version will be read from `.meteor/release` and installed.
Your application will then be built using `meteor build --server-only` and deployed from the files created by this command.

{{< readfile file="env-injection.md" >}}
{{% content/env-injection %}}

{{< readfile file="deploy-git.md" >}}
{{% content/deploy-git %}}

{{< readfile file="link-addon.md" >}}
{{% content/link-addon %}}

### Oplog Tailing

Expand All @@ -100,6 +100,6 @@ Since Meteor 2.6.n the mongo driver detect the `MONGO_OPLOG_URL` by itself and y
If you want to migrate from your classic node.js app to a meteor application, contact our support in the console or at
<[email protected]> with the application id.

{{< readfile file="more-config.md" >}}
{{% content/more-config %}}

{{< readfile file="url_healthcheck.md" >}}
17 changes: 10 additions & 7 deletions content/doc/applications/javascript/nodejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,34 @@ aliases:
Clever Cloud allows you to deploy any [Node.js](https://nodejs.org) application. We do support **any stable version of node >= 0.6**.
This page will explain you how to set up your application to run it on our service.

{{< readfile file="create-application.md" >}}
{{% content/create-application %}}

{{< readfile file="set-env-vars.md" >}}
{{% content/set-env-vars %}}

{{< readfile file="language-specific-deploy/node.md" >}}

{{< readfile file="new-relic.md" >}}
{{% content/new-relic %}}

{{< readfile file="env-injection.md" >}}
{{% content/env-injection %}}

To access environment variables from your code, you can use `process.env.MY_VARIABLE`.

{{< readfile file="deploy-git.md" >}}
{{% content/deploy-git %}}

## Troubleshooting your application

If you are often experiencing auto restart of your Node.js instance, maybe you have an application crashing that we automatically restart.
To target this behaviour, you can gracefully shutdown with events handlers on `uncaughtExeption` `unhandledRejection` `sigint` and `sigterm` and log at this moment so you can fix the problem.

{{< readfile file="link-addon.md" >}}
{{% content/link-addon %}}

{{< readfile file="more-config.md" >}}
{{% content/more-config %}}

{{% content/env-injection %}}

{{< readfile file="url_healthcheck.md" >}}


## Deployment video

{{< youtube id="dxhSjHnrrhA" >}}
13 changes: 7 additions & 6 deletions content/doc/applications/php/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,31 @@ PHP is available on our platform with the branches 5.6, 7.2, 7.3, 7.4, 8.0, 8.1

The HTTP server is [Apache 2](https://httpd.apache.org/), and the PHP code is executed by [PHP-FPM](https://php-fpm.org/).

{{< readfile file="create-application.md" >}}
{{% content/create-application %}}

{{< readfile file="set-env-vars.md" >}}
{{% content/set-env-vars %}}

{{< readfile file="language-specific-deploy/php.md" >}}

{{< readfile file="new-relic.md" >}}
{{% content/new-relic %}}

{{< readfile file="blackfire.md" >}}

## Deploy on Clever Cloud

Application deployment on Clever Cloud is via **Git or FTP**.

{{< readfile file="deploy-git.md" >}}
{{% content/deploy-git %}}

{{< readfile file="deploy-ftp.md" >}}
{{% content/deploy-ftp %}}

## ProxySQL

{{< readfile file="proxysql.md" >}}

You can learn more about ProxySQL on the [dedicated documentation page]({{< ref "/guides/proxysql" >}})

{{< readfile file="more-config.md" >}}
{{% content/more-config %}}

{{< readfile file="url_healthcheck.md" >}}

Loading
Loading