diff --git a/conf/.eleventy.js b/conf/.eleventy.js index 36b89e2..2ad0349 100644 --- a/conf/.eleventy.js +++ b/conf/.eleventy.js @@ -1,9 +1,9 @@ module.exports = function (eleventyConfig) { - eleventyConfig.addPassthroughCopy("./src/style.css"); + eleventyConfig.addPassthroughCopy("__DATA_DIR__/src/style.css"); return { dir: { - input: "src", - output: "public", + input: "__DATA_DIR__/src", + output: "__DATA_DIR__/public", }, }; }; diff --git a/manifest.toml b/manifest.toml index 7c06f9e..98dc64e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -46,6 +46,9 @@ ram.runtime = "50M" [resources.install_dir] + [resources.data_dir] + subdirs = ["src", "public"] + [resources.permissions] main.url = "/" diff --git a/scripts/restore b/scripts/restore index 8530d29..1950713 100755 --- a/scripts/restore +++ b/scripts/restore @@ -19,6 +19,16 @@ ynh_restore_file --origin_path="$install_dir" chown -R $app:www-data "$install_dir" +#================================================= +# RESTORE THE DATA DIRECTORY +#================================================= +ynh_script_progression --message="Restoring the data directory..." --weight=1 + +ynh_restore_file --origin_path="$data_dir" --not_mandatory + +# (Same as for install dir) +chown -R $app:www-data "$data_dir" + #================================================= # RESTORE SYSTEM CONFIGURATIONS #=================================================