mirror of
https://github.com/YunoHost-Apps/eleventy_ynh.git
synced 2024-09-03 18:26:32 +02:00
commit
bebfb9a2f6
17 changed files with 128 additions and 34 deletions
55
.github/ISSUE_TEMPLATE.md
vendored
Normal file
55
.github/ISSUE_TEMPLATE.md
vendored
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**How to post a meaningful bug report**
|
||||||
|
1. *Read this whole template first.*
|
||||||
|
2. *Determine if you are on the right place:*
|
||||||
|
- *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!*
|
||||||
|
- *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.*
|
||||||
|
- *When in doubt, post here and we will figure it out together.*
|
||||||
|
3. *Delete the italic comments as you write over them below, and remove this guide.*
|
||||||
|
---
|
||||||
|
|
||||||
|
### Describe the bug
|
||||||
|
|
||||||
|
*A clear and concise description of what the bug is.*
|
||||||
|
|
||||||
|
### Context
|
||||||
|
|
||||||
|
- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...*
|
||||||
|
- YunoHost version: x.x.x
|
||||||
|
- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...*
|
||||||
|
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes*
|
||||||
|
- If yes, please explain:
|
||||||
|
- Using, or trying to install package version/branch:
|
||||||
|
- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`*
|
||||||
|
|
||||||
|
### Steps to reproduce
|
||||||
|
|
||||||
|
- *If you performed a command from the CLI, the command itself is enough. For example:*
|
||||||
|
```sh
|
||||||
|
sudo yunohost app install the_app
|
||||||
|
```
|
||||||
|
- *If you used the webadmin, please perform the equivalent command from the CLI first.*
|
||||||
|
- *If the error occurs in your browser, explain what you did:*
|
||||||
|
1. *Go to '...'*
|
||||||
|
2. *Click on '...'*
|
||||||
|
3. *Scroll down to '...'*
|
||||||
|
4. *See error*
|
||||||
|
|
||||||
|
### Expected behavior
|
||||||
|
|
||||||
|
*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.*
|
||||||
|
|
||||||
|
### Logs
|
||||||
|
|
||||||
|
*When an operation fails, YunoHost provides a simple way to share the logs.*
|
||||||
|
- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.*
|
||||||
|
- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.*
|
||||||
|
|
||||||
|
*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)*
|
||||||
|
|
||||||
|
*If applicable and useful, add screenshots to help explain your problem.*
|
16
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
16
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
## Problem
|
||||||
|
|
||||||
|
- *Description of why you made this PR*
|
||||||
|
|
||||||
|
## Solution
|
||||||
|
|
||||||
|
- *And how do you fix that problem*
|
||||||
|
|
||||||
|
## PR Status
|
||||||
|
|
||||||
|
- [ ] Code finished and ready to be reviewed/tested
|
||||||
|
- [ ] The fix/enhancement were manually tested (if applicable)
|
||||||
|
|
||||||
|
## Automatic tests
|
||||||
|
|
||||||
|
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)
|
|
@ -16,15 +16,10 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
This is a dummy description of this app features
|
Eleventy is a simpler static site generator.
|
||||||
|
|
||||||
|
|
||||||
**Shipped version:** 2.0.1~ynh1
|
**Shipped version:** 2.0.1~ynh1
|
||||||
|
|
||||||
## Screenshots
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Documentation and resources
|
## Documentation and resources
|
||||||
|
|
||||||
* Official app website: <https://www.11ty.dev/>
|
* Official app website: <https://www.11ty.dev/>
|
||||||
|
|
|
@ -16,15 +16,9 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
|
||||||
|
|
||||||
## Vue d’ensemble
|
## Vue d’ensemble
|
||||||
|
|
||||||
Ceci est une fausse description des fonctionalités de l'app
|
Eleventy est un générateur de site statique.
|
||||||
|
|
||||||
|
|
||||||
**Version incluse :** 2.0.1~ynh1
|
**Version incluse :** 2.0.1~ynh1
|
||||||
|
|
||||||
## Captures d’écran
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Documentations et ressources
|
## Documentations et ressources
|
||||||
|
|
||||||
* Site officiel de l’app : <https://www.11ty.dev/>
|
* Site officiel de l’app : <https://www.11ty.dev/>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
module.exports = function (eleventyConfig) {
|
module.exports = function (eleventyConfig) {
|
||||||
eleventyConfig.addPassthroughCopy("./src/style.css");
|
eleventyConfig.addPassthroughCopy("__DATA_DIR__/src/style.css");
|
||||||
return {
|
return {
|
||||||
dir: {
|
dir: {
|
||||||
input: "src",
|
input: "__DATA_DIR__/src",
|
||||||
output: "public",
|
output: "__DATA_DIR__/public",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Eleventy
|
Description=Eleventy: Simpler site generator
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
This is a dummy admin doc for this app
|
The served file directory: `__DATA_DIR__/src/`
|
||||||
|
The configuration file: `INSTALL_DIR__/.eleventy.js`
|
||||||
The app install dir is `__INSTALL_DIR__`
|
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
Ceci est une fausse doc d'admin pour cette app
|
Le répertoire des fichiers : `__DATA_DIR__/src/`
|
||||||
|
Le fichier de configuration : `INSTALL_DIR__/.eleventy.js`
|
||||||
Le dossier d'install de l'app est `__INSTALL_DIR__`
|
|
|
@ -1 +1 @@
|
||||||
This is a dummy description of this app features
|
Eleventy is a simpler static site generator.
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Ceci est une fausse description des fonctionalités de l'app
|
Eleventy est un générateur de site statique.
|
Binary file not shown.
Before Width: | Height: | Size: 35 KiB |
|
@ -3,7 +3,7 @@ packaging_format = 2
|
||||||
id = "eleventy"
|
id = "eleventy"
|
||||||
name = "Eleventy"
|
name = "Eleventy"
|
||||||
description.en = "Simpler site generator. Transforms a directory of templates (of varying types) into HTML"
|
description.en = "Simpler site generator. Transforms a directory of templates (of varying types) into HTML"
|
||||||
description.fr = "Simpler site generator. Transforms a directory of templates (of varying types) into HTML"
|
description.fr = "Générateur de site plus simple. Transforme un répertoire de modèles (de différents types) en HTML"
|
||||||
|
|
||||||
version = "2.0.1~ynh1"
|
version = "2.0.1~ynh1"
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ multi_instance = true
|
||||||
ldap = false
|
ldap = false
|
||||||
sso = false
|
sso = false
|
||||||
disk = "50M"
|
disk = "50M"
|
||||||
ram.build = "50M"
|
ram.build = "500M"
|
||||||
ram.runtime = "50M"
|
ram.runtime = "50M"
|
||||||
|
|
||||||
[install]
|
[install]
|
||||||
|
@ -46,6 +46,9 @@ ram.runtime = "50M"
|
||||||
|
|
||||||
[resources.install_dir]
|
[resources.install_dir]
|
||||||
|
|
||||||
|
[resources.data_dir]
|
||||||
|
subdirs = ["src", "public"]
|
||||||
|
|
||||||
[resources.permissions]
|
[resources.permissions]
|
||||||
main.url = "/"
|
main.url = "/"
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,13 @@ ynh_print_info --message="Declaring files to be backed up..."
|
||||||
|
|
||||||
ynh_backup --src_path="$install_dir"
|
ynh_backup --src_path="$install_dir"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# BACKUP THE DATA DIR
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Only relevant if there is a "data_dir" resource for this app
|
||||||
|
ynh_backup --src_path="$data_dir" --is_big
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE NGINX CONFIGURATION
|
# BACKUP THE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -26,9 +26,9 @@ 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="$install_dir/src/index.md"
|
ynh_add_config --template="../sources/index.md" --destination="$data_dir/src/index.md"
|
||||||
ynh_add_config --template="../sources/style.css" --destination="$install_dir/src/style.css"
|
ynh_add_config --template="../sources/style.css" --destination="$data_dir/src/style.css"
|
||||||
mv "../sources/_includes" "$install_dir/src/_includes"
|
mv "../sources/_includes" "$data_dir/src/_includes"
|
||||||
|
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ env_path="$PATH"
|
||||||
# Create a dedicated systemd config
|
# Create a dedicated systemd config
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
|
|
||||||
yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log"
|
yunohost service add $app --description="Simpler site generator" --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# APP INITIAL CONFIGURATION
|
# APP INITIAL CONFIGURATION
|
||||||
|
|
|
@ -19,6 +19,24 @@ ynh_restore_file --origin_path="$install_dir"
|
||||||
|
|
||||||
chown -R $app:www-data "$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"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# REINSTALL DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Reinstalling dependencies..." --weight=7
|
||||||
|
|
||||||
|
# Install Nodejs
|
||||||
|
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE SYSTEM CONFIGURATIONS
|
# RESTORE SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -31,7 +49,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
||||||
systemctl enable $app.service --quiet
|
systemctl enable $app.service --quiet
|
||||||
|
|
||||||
yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log"
|
yunohost service add $app --description="Simpler site generator" --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
|
|
@ -34,6 +34,14 @@ fi
|
||||||
|
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# UPGRADE DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Upgrading dependencies..." --weight=5
|
||||||
|
|
||||||
|
# Install Nodejs
|
||||||
|
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REAPPLY SYSTEM CONFIGURATIONS
|
# REAPPLY SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -44,7 +52,7 @@ ynh_add_nginx_config
|
||||||
env_path="$PATH"
|
env_path="$PATH"
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
|
|
||||||
yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log"
|
yunohost service add $app --description="Simpler site generator" --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
|
@ -3,4 +3,4 @@ title: Hello world
|
||||||
layout: "base.njk"
|
layout: "base.njk"
|
||||||
---
|
---
|
||||||
|
|
||||||
This is a template, please replace with your content: __INSTALL_DIR__/src/index.md
|
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/)
|
||||||
|
|
Loading…
Add table
Reference in a new issue