1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/eleventy_ynh.git synced 2024-09-03 18:26:32 +02:00

Merge branch 'testing' into path

This commit is contained in:
Éric Gaspar 2023-05-12 23:30:15 +02:00
commit 10f4e40c5d
8 changed files with 31 additions and 19 deletions

View file

@ -26,9 +26,7 @@ ynh_script_progression --message="Setting up source files..." --weight=1
ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir"
ynh_add_config --template="../sources/index.md" --destination="$data_dir/src/index.md" mv -f "../sources/src/" "$data_dir/"
ynh_add_config --template="../sources/style.css" --destination="$data_dir/src/style.css"
mv "../sources/_includes" "$data_dir/src/_includes"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
@ -65,8 +63,8 @@ ynh_script_progression --message="Installing $app..." --weight=10
pushd $install_dir pushd $install_dir
ynh_use_nodejs ynh_use_nodejs
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH npm init -y ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm init -y
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH npm install @11ty/eleventy --save-dev ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install @11ty/eleventy --save-dev
popd popd
#================================================= #=================================================

View file

@ -29,7 +29,6 @@ ynh_remove_systemd_config
ynh_remove_nginx_config ynh_remove_nginx_config
# Remove NodeJS
ynh_remove_nodejs ynh_remove_nodejs
#================================================= #=================================================

View file

@ -52,6 +52,21 @@ ynh_add_nginx_config
env_path="$PATH" env_path="$PATH"
ynh_add_systemd_config ynh_add_systemd_config
#=================================================
# INSTALL ELEVENTY
#=================================================
ynh_script_progression --message="Installing $app..." --weight=10
pushd $install_dir
ynh_use_nodejs
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm init -y
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install @11ty/eleventy --save-dev
popd
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
yunohost service add $app --description="Simpler site generator" --log="/var/log/$app/$app.log" yunohost service add $app --description="Simpler site generator" --log="/var/log/$app/$app.log"
#================================================= #=================================================

View file

@ -1,6 +0,0 @@
---
title: Hello world
layout: "base.njk"
---
This is a mockup page (located here: __DATA_DIR__/src/index.md), please follow the instructions to set up your pages: [https://www.11ty.dev/docs/getting-started/](https://www.11ty.dev/docs/getting-started/)

6
sources/src/index.md Normal file
View file

@ -0,0 +1,6 @@
---
title: Hello world
layout: "base.njk"
---
This is a mockup page (located here: /home/yunohost.app/eleventy/src/index.md), please follow the instructions to set up your pages: [https://www.11ty.dev/docs/getting-started/](https://www.11ty.dev/docs/getting-started/)