diff --git a/README.md b/README.md index 5bfd413..7d0c92e 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview -Quick description of this app. +Yellow is a CMS designed to make the creation of a website ultra-simple and easy to use. Yellow CMS does not require a database. **Shipped version:** 0.8.16 @@ -53,7 +53,7 @@ How to configure this app: From an admin panel, a plain file with SSH, or any ot ## Links * Report a bug: https://github.com/YunoHost-Apps/yellowcms_ynh/issues - * App website: https://datenstrom.se/yellow/ + * App website: https://datenstrom.se/ * Upstream app repository: https://github.com/datenstrom/yellow/ * YunoHost website: https://yunohost.org/ diff --git a/conf/nginx.conf b/conf/nginx.conf index f48e794..141b246 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,39 +1,43 @@ - location __PATH__/cache { +location __PATH__/cache { rewrite ^(.*)$ /error break; - } +} - location __PATH__/content { +location __PATH__/content { rewrite ^(.*)$ /error break; - } +} - location __PATH__/system { +location __PATH__/system { rewrite ^(.*)$ /error break; - } +} #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { + alias __FINALPATH__/ ; - index index.html yellow.php; - - - #location __PATH__/ { - # if (!-e $request_filename) { - # rewrite ^/(.*)$ /yellow.php last; - # break; - # } - #} - -if (!-e $request_filename) { - rewrite ^(.*)$ /yellow.php last; - break; + # Force usage of https + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; } - try_files $uri $uri/ index.php; + index yellow.php; + + if (!-e $request_filename) { + rewrite ^(.*)$ __PATH__/yellow.php last; + break; + } + + try_files $uri $uri/ yellow.php; location ~ [^/]\.php(/|$) { - fastcgi_split_path_info ^(.+?\.php)(/.*)$; + fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; fastcgi_index yellow.php; include fastcgi_params; + fastcgi_param REMOTE_USER $remote_user; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_param SCRIPT_FILENAME $request_filename; } + + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; } diff --git a/scripts/change_url b/scripts/change_url index 17377e5..cb2284d 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -69,19 +69,19 @@ ynh_script_progression --message="Updating NGINX web server configuration..." -- nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf -# Change the path in the nginx config file +# Change the path in the NGINX config file if [ $change_path -eq 1 ] then - # Make a backup of the original nginx config file if modified + # Make a backup of the original NGINX config file if modified ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for nginx helper + # Set global variables for NGINX helper domain="$old_domain" path_url="$new_path" - # Create a dedicated nginx config + # Create a dedicated NGINX config ynh_add_nginx_config fi -# Change the domain for nginx +# Change the domain for NGINX if [ $change_domain -eq 1 ] then # Delete file checksum for the old conf file location diff --git a/scripts/install b/scripts/install index 71bef0b..9bb02fe 100644 --- a/scripts/install +++ b/scripts/install @@ -88,7 +88,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # Set permissions to app files -chown -R www-data:www-data $final_path +chown -R $app: $final_path chmod -R a+rw $final_path #================================================= diff --git a/scripts/restore b/scripts/restore index 51d30f3..f26640d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -66,21 +66,16 @@ ynh_system_user_create --username=$app #================================================= # Restore permissions on app files -chown -R www-data:www-data $final_path +chown -R $app: $final_path chmod -R a+rw $final_path #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= +ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=6 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" - -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - -yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log" +ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index f6dc094..a6e509f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK VERSION @@ -104,16 +105,9 @@ ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependenc #================================================= # Set permissions on app files -chown -R www-data:www-data $final_path +chown -R $app: $final_path chmod -R a+rw $final_path -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 - -yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log" - #================================================= # RELOAD NGINX #================================================= diff --git a/sources/french.zip b/sources/french.zip new file mode 100644 index 0000000..b44c4f7 Binary files /dev/null and b/sources/french.zip differ diff --git a/sources/gallery.zip b/sources/gallery.zip new file mode 100644 index 0000000..d56731b Binary files /dev/null and b/sources/gallery.zip differ diff --git a/sources/highlight.zip b/sources/highlight.zip new file mode 100644 index 0000000..87dc75a Binary files /dev/null and b/sources/highlight.zip differ diff --git a/sources/markdown.zip b/sources/markdown.zip new file mode 100644 index 0000000..a1eb246 Binary files /dev/null and b/sources/markdown.zip differ