Skip to content
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: 5 additions & 5 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ RewriteRule "^keyboard/redir.php(.*)$" - [END]
# Rewrite /keyboard/[name][/] to /keyboard/redir.php?q=[name]
# only if index.php does not exist in the folder
RewriteCond "%{DOCUMENT_ROOT}/keyboard/$1/index.php" !-f
RewriteRule "^keyboard/(?!redir.php)([^/?]+)(/)?$" "keyboard/redir.php?q=$1" [END]
RewriteRule "^keyboard/(?!redir.php)([^/?]+)(/)?$" "keyboard/redir.php?q=$1" [BCTLS,END]

# Rewrite /keyboard/name/current-version[/] to /keyboard/redir.php?q=[name]
RewriteRule "^keyboard/(?!redir.php)([^/?]+)/current-version(/)?$" "keyboard/redir.php?q=$1" [END]
RewriteRule "^keyboard/(?!redir.php)([^/?]+)/current-version(/)?$" "keyboard/redir.php?q=$1" [BCTLS,END]

# Rewrite /keyboard/[name]/[version][/] to /keyboard/redir.php?q=[name]&v=[version]
# only if index.php does not exist in the folder
RewriteCond "%{DOCUMENT_ROOT}/keyboard/$1/$2/index.php" !-f
RewriteRule "^keyboard/(?!redir.php)([^/?]+)/([^/?]+)(/)?$" "keyboard/redir.php?q=$1&v=$2" [END]
RewriteRule "^keyboard/(?!redir.php)([^/?]+)/([^/?]+)(/)?$" "keyboard/redir.php?q=$1&v=$2" [BCTLS,END]

# versioning: these rules automatically redirect /foo/current-version to the
# newest version of the documentation under /foo, e.g. 13.0, /foo/13.0, and fall
Expand Down Expand Up @@ -243,7 +243,7 @@ RewriteRule "^(.+[^/])$" "$1/" [R,END]

# Rewrite file to file.md
RewriteCond "%{DOCUMENT_ROOT}/$1.md" -f
RewriteRule "^(.+)$" "/_includes/md/mdhost.php?file=$1.md" [END]
RewriteRule "^(.+)$" "/_includes/md/mdhost.php?file=$1.md" [BCTLS,END]

# Rewrite file to file.php
RewriteCond "%{DOCUMENT_ROOT}/$1.php" -f
Expand All @@ -252,7 +252,7 @@ RewriteRule "^(.+)$" "$1.php" [END]

# Rewrite folder/ to folder/index.md
RewriteCond "%{DOCUMENT_ROOT}/$1/index.md" -f
RewriteRule "^(.+)/$" "/_includes/md/mdhost.php?file=$1/index.md" [END]
RewriteRule "^(.+)/$" "/_includes/md/mdhost.php?file=$1/index.md" [BCTLS,END]

# Rewrite folder/ to folder/index.php
RewriteCond "%{DOCUMENT_ROOT}/$1/index.php" -f
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Please keep the content of this file in sync with Podmanfile.

ARG BUILDER_CONFIGURATION="release"
FROM php:7.4-apache@sha256:c9d7e608f73832673479770d66aacc8100011ec751d1905ff63fae3fe2e0ca6d AS composer-builder
FROM php:8.4-apache@sha256:51da594c844a97f31b1cd6b1ac6660982f40788f4fe13e75f7fd39e2f9b58651 AS composer-builder

# Install Zip to use composer
RUN apt-get update && apt-get install -y \
Expand All @@ -28,7 +28,7 @@ RUN if [ "$BUILDER_CONFIGURATION" = "debug" ]; then \
fi

# Site
FROM php:7.4-apache@sha256:c9d7e608f73832673479770d66aacc8100011ec751d1905ff63fae3fe2e0ca6d
FROM php:8.4-apache@sha256:51da594c844a97f31b1cd6b1ac6660982f40788f4fe13e75f7fd39e2f9b58651
COPY resources/keyman-site.conf /etc/apache2/conf-available/
RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
RUN chown -R www-data:www-data /var/www/html/
Expand Down
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ builder_describe \
start \
stop \
test \
"composer-start Start a temporary container to maintain composer" \
"composer-stop Stop and cleanup temporary container for maintaining composer" \
"--no-unit-test" \
"--no-lint" \
"--no-link-check"
Expand All @@ -43,3 +45,6 @@ builder_run_action build build_docker_container $HELP_IMAGE_NAME $HELP_CONT
builder_run_action start start_docker_container $HELP_IMAGE_NAME $HELP_CONTAINER_NAME $HELP_CONTAINER_DESC $HOST_HELP_KEYMAN_COM $PORT_HELP_KEYMAN_COM $BUILDER_CONFIGURATION

builder_run_action test test_docker_container $HELP_CONTAINER_DESC $PORT_HELP_KEYMAN_COM / /go/edit-page

builder_run_action composer-start docker_build_and_start_composer_container
builder_run_action composer-stop docker_stop_and_cleanup_composer_container
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"require": {
"sentry/sdk": "2.1.0",
"php-http/curl-client": "^2.1",
"erusev/parsedown": "^1.7",
"erusev/parsedown-extra": "^0.8.1"
"sentry/sentry": "^4.31",
"erusev/parsedown-extra": "^0.9.0"
},
"require-dev": {
"phpunit/phpunit": "^9.2"
"phpunit/phpunit": "^9.6"
},
"config": {
"allow-plugins": false
Expand Down
Loading