Skip to content

Commit

Permalink
Merge pull request #23 from platformsh/main
Browse files Browse the repository at this point in the history
  • Loading branch information
Amazinggrace07 authored Aug 18, 2023
2 parents a3739e9 + b51df24 commit 66e0a77
Show file tree
Hide file tree
Showing 1,018 changed files with 32,137 additions and 3,331 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/get-pr-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ jobs:
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
# Rewrite all Markdown files in the source to be links in the final environment
if [[ $file = "docs/src/"*".md" ]]; then
if [[ $file = "sites/platform/src/"*".md" ]]; then
# Remove file extension
page=${file/.md/.html}
# Remove initial directory
page=${page/"docs/src/"/}
page=${page/"sites/platform/src/"/}
# Shift index pages up a level
page=${page/"/_index.html"/".html"}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
with:
node-version: 16
cache: 'npm'
cache-dependency-path: docs/package-lock.json
cache-dependency-path: sites/platform/package-lock.json

- name: Run lint markdown
run: |
cd docs
cd sites/platform
npm ci
npm run lint:markdown
Expand All @@ -49,6 +49,6 @@ jobs:
with:
fail_on_error: true
reporter: github-check
files: docs/src
files: sites/platform/src
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
14 changes: 7 additions & 7 deletions .github/workflows/pr-check-links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,36 @@ jobs:
with:
node-version: 18
cache: npm
cache-dependency-path: docs/package-lock.json
cache-dependency-path: sites/platform/package-lock.json

- name: Install dependencies
run: |
cd docs
cd sites/platform
npm ci
- name: Build search script
run: |
cd docs
cd sites/platform
npm run build:search
- name: Set up Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.113.0'
hugo-version: '0.116.0'

- name: Build Hugo site
run: |
cd docs
cd sites/platform
hugo
- name: Minify assets
run: |
cd docs
cd sites/platform
npm run build:assets
- name: Check links in Markdown
run: |
set -e
cd docs
cd sites/platform
curl https://htmltest.wjdp.uk | bash
bin/htmltest
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@

node_modules
docs/fetchedFilesCache
vendorize
126 changes: 126 additions & 0 deletions .platform/applications.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
- # The name of this application, which must be unique within a project.
name: 'docs'

# The type key specifies the language and version for your application.
type: 'nodejs:16'

# Specify the Hugo version as an env variable.
variables:
env:
HUGOVERSION: 0.116.0
SITE_DIR: 'sites/platform'

build:
flavor: none

source:
root: "/"

relationships:
search: "search:http"
database: "db:mysql"

# The hooks that will be triggered when the package is deployed.
hooks:
# Build hooks can modify the application files on disk but not access any services like databases.
build: |
set -e
cd $SITE_DIR
cp ../../themes/psh-docs/postcss.config.js .
npm install
npm run build
./build_docs.sh
npm run build:assets
deploy: |
cd $SITE_DIR
./deploy.sh
# The configuration of the application when it is exposed to the web.
web:
commands:
# Run (404) error and feedback handler
start: cd $SITE_DIR && node index.js
locations:
'/':
# The public directory of the application relative to its root.
root: 'sites/platform/public'
passthru: true
index: ['index.html']
scripts: false
allow: true
expires: 24h
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

disk: 1024

mounts:
"sites/platform/public/scripts/xss/dist/config":
source: local
source_path: "sites/platform/config"

size: S

- # The name of this application, which must be unique within a project.
name: 'friday'

# The type key specifies the language and version for your application.
type: 'nodejs:16'

# Specify the Hugo version as an env variable.
variables:
env:
HUGOVERSION: 0.116.0
SITE_DIR: 'sites/friday'

build:
flavor: none

source:
root: "/"

relationships:
search: "search:http"
database: "db:mysql"

# The hooks that will be triggered when the package is deployed.
hooks:
# Build hooks can modify the application files on disk but not access any services like databases.
build: |
cd $SITE_DIR
cp ../../themes/psh-docs/postcss.config.js .
npm install
npm run build
./build_docs.sh
npm run build:assets
deploy: |
cd $SITE_DIR
./deploy.sh
# The configuration of the application when it is exposed to the web.
web:
commands:
# Run (404) error and feedback handler
start: cd $SITE_DIR && node index.js
locations:
'/':
# The public directory of the application relative to its root.
root: 'sites/friday/public'
passthru: true
index: ['index.html']
scripts: false
allow: true
expires: 24h
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

disk: 1024

mounts:
"sites/friday/public/scripts/xss/dist/config":
source: local
source_path: "sites/friday/config"

size: S
12 changes: 11 additions & 1 deletion .platform/routes.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
https://{default}/:
type: upstream
upstream: docs:http
id: platformsh
primary: true
cache:
enabled: true
Expand Down Expand Up @@ -249,4 +250,13 @@ https://{default}/:
"https://search.{default}/":
type: upstream
upstream: "search:http"
id: "search"
id: "search"

https://docs.deployfriday.net/:
type: upstream
upstream: friday:http
id: friday
cache:
enabled: true
ssi:
enabled: false
2 changes: 1 addition & 1 deletion .vale.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
StylesPath = styles
StylesPath = contributing/styles

Vocab = Platform

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If you're not sure how, you can also open an issue and we can look into it.

Requires:

* Hugo >= 0.113.0
* Hugo >= 0.116.0
* Node.js >= 16
* Poetry

Expand Down
52 changes: 52 additions & 0 deletions build_local.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/usr/bin/env bash

clean_dir () {
DIRECTORY=$1
if [ -d "$DIRECTORY" ]; then
echo "$DIRECTORY exists. Removing..."
rm -rf $DIRECTORY
echo "Done."
else
echo "$DIRECTORY does not exist. All is well."
fi
}

clean_file () {
FILE=$1
if [ -f "$FILE" ]; then
echo "$FILE exists. Removing..."
rm $FILE
echo "Done."
else
echo "$FILE does not exist. All is well."
fi
}

BUILD_DIR=$1
cd sites/$BUILD_DIR

clean_file postcss.config.js
clean_dir fetchedFilesCache
clean_dir node_modules
clean_dir public
clean_dir resources

cp ../../themes/psh-docs/postcss.config.js .
npm install
npm run build
npm run build:search
hugo
npm run build:assets

clear

printf "
BUILD COMPLETE
Verify the resulting build by running the command
python3 -m http.server 8888 -d sites/$BUILD_DIR/public
"
6 changes: 3 additions & 3 deletions contributing/markup-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,9 @@ Here is some content after the inner content.
For static files that have already been created, use the `readFile` shortcode:

```markdown
{{< readFile file="src/registry/images/tables/runtimes_supported.md" markdownify="true" >}}
{{< readFile file="src/registry/images/examples/full/php.app.yaml" highlight="yaml" >}}
{{< readFile file="src/registry/images/examples/full/elasticsearch.app.yaml" highlight="yaml" location=".platform.app.yaml" >}}
{{< readFile file="registry/images/tables/runtimes_supported.md" markdownify="true" >}}
{{< readFile file="registry/images/examples/full/php.app.yaml" highlight="yaml" >}}
{{< readFile file="registry/images/examples/full/elasticsearch.app.yaml" highlight="yaml" location=".platform.app.yaml" >}}
```

Property | Description
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ message: "Try to use meaningful text for links."
link: "https://github.com/platformsh/platformsh-docs/blob/main/contributing/content-style.md#use-meaningful-link-text"
level: warning
nonword: true
scope: link
scope: raw
tokens:
- \b(?<!t)here\b
- click here
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ async
Asyncio
auditable
autoload(?:er|ing)?
[Aa]utoscaling
Blackfire
blockquote
Bootsnap
Expand Down Expand Up @@ -75,6 +76,7 @@ Mailchimp
[Mm]ebibyte
Meilisearch
Memcache
Mercure
Mezmo
middleware
Miniconda
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ configuation
MongDB
postgreSQL
strapi

Platform.sh
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 66e0a77

Please sign in to comment.