Skip to content

Commit e933c05

Browse files
Merge branch 'main' into 4686-add-section-about-emissions-dashboard-to-regions-pages
2 parents 56351a1 + d8f1f5b commit e933c05

File tree

102 files changed

+22036
-1193
lines changed

Some content is hidden

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

102 files changed

+22036
-1193
lines changed

.github/actions/redirection-verification/package-lock.json

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/redirection-verification/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"dependencies": {
1313
"@actions/core": "^1.11.1",
1414
"@actions/github": "^6.0.0",
15-
"axios": "^1.7.7",
15+
"axios": "^1.8.2",
1616
"js-yaml": "^4.1.0"
1717
}
1818
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Check API Docs Update
2+
3+
on:
4+
schedule:
5+
- cron: '* 3 * * *'
6+
workflow_dispatch:
7+
#branches: [ * ]
8+
permissions:
9+
contents: write
10+
env:
11+
DEFAULT_BRANCH: "main"
12+
jobs:
13+
check-and-update:
14+
runs-on: ubuntu-latest
15+
if: ${{ github.repository_owner == 'platformsh' }}
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Git
22+
run: |
23+
git config --global user.name "github-actions[bot]"
24+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
25+
26+
- name: Download redoc_static.html from GitLab
27+
env:
28+
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
29+
run: |
30+
PROJECT_PATH="devrel/docs/api-site"
31+
REF="main"
32+
33+
# URL-encode path to the project (replace `/` by `%2F`)
34+
# @todo switch this to using the python method so we're consistent?
35+
PROJECT_ENCODED=$(echo "$PROJECT_PATH" | sed 's/\//%2F/g')
36+
37+
# Download into shared data using the GitLab API
38+
# @todo should we also copy over the stylesheet? or should the version in docs be canonical?
39+
curl --header "PRIVATE-TOKEN: $GITLAB_TOKEN" \
40+
--output shared/pages/api.html \
41+
"https://lab.plat.farm/api/v4/projects/${PROJECT_ENCODED}/repository/files/$(python3 -c "import urllib.parse; print(urllib.parse.quote('web/redoc-static.html',safe=''))")/raw?ref=${REF}"
42+
43+
- name: Create Pull Request if changes
44+
uses: peter-evans/create-pull-request@v6
45+
with:
46+
token: ${{ secrets.WORKFLOW_TOKEN }}
47+
commit-message: "Update API Docs"
48+
body: "This PR updates the API Docs."
49+
50+
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
51+
signoff: false
52+
draft: false
53+
delete-branch: true
54+
branch: update-api-doc
55+
title: "[API-BOT] Update API Docs"
56+
57+
base: main
58+
labels: |
59+
report
60+
automated pr
61+
add-paths: |
62+
shared/pages

.platform/applications.yaml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,24 @@
2424
# Build hooks can modify the application files on disk but not access any services like databases.
2525
build: |
2626
set -e
27+
#copy API docs into correct location
28+
# @todo once api docs are fully moved we can alter the template.hbs file so style.css can be in /api
29+
mkdir -p "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api/styles"
30+
if [ -f "${PLATFORM_APP_DIR}/shared/pages/api.html" ]; then
31+
cp "${PLATFORM_APP_DIR}/shared/pages/api.html" "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api/index.html"
32+
cp "${PLATFORM_APP_DIR}/shared/pages/api-style.css" "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api/styles/style.css"
33+
else
34+
echo "<p>Currently under maintenance. Please check back later.</p>" >> "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api/index.html"
35+
fi
36+
2737
cd $SITE_DIR
2838
cp ../../themes/psh-docs/postcss.config.js .
2939
npm install
3040
npm run build
3141
./build_docs.sh
3242
43+
44+
3345
deploy: |
3446
cd $SITE_DIR
3547
./deploy.sh
@@ -60,6 +72,10 @@
6072
\.txt$:
6173
headers:
6274
Content-Type: "text/plain; charset=UTF-8"
75+
'/api':
76+
root: 'sites/platform/public/api'
77+
index: [ 'index.html' ]
78+
expires: 24h
6379
disk: 1024
6480

6581
mounts:
@@ -94,6 +110,15 @@
94110
hooks:
95111
# Build hooks can modify the application files on disk but not access any services like databases.
96112
build: |
113+
#copy API docs into correct location
114+
# @todo once api docs are fully moved we can alter the template.hbs file so style.css can be in /api
115+
mkdir -p "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api/styles"
116+
if [ -f "${PLATFORM_APP_DIR}/shared/pages/api.html" ]; then
117+
cp "${PLATFORM_APP_DIR}/shared/pages/api.html" "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api/index.html"
118+
cp "${PLATFORM_APP_DIR}/shared/pages/api-style.css" "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api/styles/style.css"
119+
else
120+
echo "<p>Currently under maintenance. Please check back later.</p>" >> "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api/index.html"
121+
fi
97122
cd $SITE_DIR
98123
cp ../../themes/psh-docs/postcss.config.js .
99124
npm install
@@ -135,7 +160,10 @@
135160
'^/favicon.ico$':
136161
allow: true
137162
passthru: '/images/favicon.ico'
138-
163+
'/api':
164+
root: 'sites/upsun/public/api'
165+
index: [ 'index.html' ]
166+
expires: 24h
139167

140168
disk: 1024
141169

contributing/content-style.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This content style guide should help make sure the Platform.sh docs are clear an
1717
- [Use inclusive language](#use-inclusive-language)
1818
- [Resources for inclusive language](#resources-for-inclusive-language)
1919
- [Use meaningful link text](#use-meaningful-link-text)
20+
- [Use imperative verbs](#use-verbs-imperatives-for-headings-and-section-titles)
2021
- [Link at the end of sentences in sentence case](#link-at-the-end-of-sentences-in-sentence-case)
2122
- [Minimize distractions](#minimize-distractions)
2223
- [Include alt text](#include-alt-text)
@@ -32,6 +33,7 @@ This content style guide should help make sure the Platform.sh docs are clear an
3233
- [Make commands work across shells](#make-commands-work-across-shells)
3334
- [Use notes appropriately](#use-notes-appropriately)
3435
- [Add short descriptions](#add-short-descriptions)
36+
- [Use shortcodes for latest versions and dates](#use-shortcodes-for-versions-and-dates)
3537
- [Guidance enforcement](#guidance-enforcement)
3638
<!-- vale Platform.condescending = YES -->
3739

@@ -156,6 +158,26 @@ Use | Avoid
156158
To learn how to set it up, read about [services](https://example.com). | Reading about [Services](https://example.com) shows you how to set it up.
157159
For more information, see how to [configure apps](https://example.com). | For more information, see [Configure apps](https://example.com).
158160

161+
### Use verbs (imperatives) for headings and section titles
162+
163+
To maintain a clear and authoritative tone, use imperative verbs (the base form of the verb) rather than gerunds (*-ing*) in headings and section titles.
164+
165+
This approach helps guide the reader with direct instructions, making it immediately clear what action they should take.
166+
167+
Do this:
168+
* Set up your environment
169+
* Deploy your project
170+
* Configure environment variables
171+
* Troubleshoot common errors
172+
173+
Not this:
174+
* Setting up your environment
175+
* Deploying your project
176+
* Configuring environment variables
177+
* Troubleshooting common errors
178+
179+
Using verbs keeps the content focused, concise, and easier to scan, while reinforcing the instructional nature of our documentation.
180+
159181
### Minimize distractions
160182

161183
Adding links can often provide helpful context.
@@ -379,6 +401,31 @@ something that makes sense out of the context of the rest of the page.
379401
Remember to keep it short.
380402
If possible, it should be no more than about 160 characters.
381403

404+
## Use shortcodes for versions and dates
405+
406+
When referencing service or runtime versions in documentation, always use the shortcode `{{% latest "xxx" %}}` instead of hardcoding version numbers. Replace `xxx` with the name of the service or runtime exactly as it appears in the `.json` or `.yaml` file you’re referring to.
407+
408+
For example, if you’re editing a code snippet like this:
409+
410+
```yaml {configFile="services"}
411+
mariadb:
412+
type: mariadb:11.4
413+
disk: 2048
414+
```
415+
You should replace the hardcoded version with the shortcode:
416+
417+
```yaml {configFile="services"}
418+
mariadb:
419+
type: mariadb:{{% latest "mariadb" %}}
420+
disk: 2048
421+
```
422+
423+
In this case, `{{% latest "mariadb" %}}` automatically pulls in the most recent version of MariaDB (e.g. `11.4`) and will update automatically as new versions become available. The value inside the shortcode that follows `latest` (in this case, it is `"mariadb"`) must match how the service name is presented in the `.yaml` file. For instance, `{{% latest "mariadb" %}}` is correct, but `{{% latest "Maria DB" %}}` is wrong.
424+
425+
Similarly, use `{{ now.Year }}` instead of hardcoding a specific year. This ensures the current year is always displayed and helps keep time references up to date.
426+
427+
Using these shortcodes improves accuracy and reduces the need for manual updates across the documentation.
428+
382429
## Guidance enforcement
383430

384431
Some of the rules are enforced with [Vale](https://docs.errata.ai/vale/about), a linter for prose.

linkcheckerrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ ignoreerrors=
2929
^https://mkyong.com/java/java-how-to-send-email/$ ^403 Forbidden
3030
^https://www.baeldung.com/maven-wrapper$ ^403 Forbidden
3131
^https://dzone\.com/.*$ ^403 Forbidden
32+
^https://docs\.pimcore\.com/.*$ ^403 Forbidden

package-lock.json

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

search/poetry.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shared/data/registry.json

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -395,41 +395,6 @@
395395
]
396396
}
397397
},
398-
"lisp": {
399-
"description": "",
400-
"id": 1102,
401-
"repo_name": "lisp",
402-
"disk": false,
403-
"docs": {
404-
"relationship_name": null,
405-
"service_name": null,
406-
"url": "/languages/lisp.html",
407-
"web": {
408-
"commands": {
409-
"start": "./example"
410-
},
411-
"locations": {
412-
"/": {
413-
"allow": false,
414-
"passthru": true
415-
}
416-
}
417-
}
418-
},
419-
"endpoint": null,
420-
"min_disk_size": null,
421-
"name": "Lisp",
422-
"runtime": true,
423-
"type": "lisp",
424-
"versions": {
425-
"deprecated": [],
426-
"supported": [
427-
"2.1",
428-
"2.0",
429-
"1.5"
430-
]
431-
}
432-
},
433398
"mariadb": {
434399
"description": "A manufacture-based container for MariaDB",
435400
"repo_name": "mariadb",

0 commit comments

Comments
 (0)