# Proposition de changement dans le fichier base.njk pour présence de balise head trop nombreuse

**URL:** https://forum.yunohost.org/t/proposition-de-changement-dans-le-fichier-base-njk-pour-presence-de-balise-head-trop-nombreuse/41667
**Category:** Apps packaging
**Tags:** 11ty, french
**Created:** [February 24, 2026, 3:44pm UTC](https://forum.yunohost.org/t/proposition-de-changement-dans-le-fichier-base-njk-pour-presence-de-balise-head-trop-nombreuse/41667 "2026-02-24T15:44:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![MariusBaguepi](https://forum.yunohost.org/user_avatar/forum.yunohost.org/mariusbaguepi/32/13344_2.png) [@MariusBaguepi](https://forum.yunohost.org/u/MariusBaguepi)
#### Post date: [February 24, 2026, 3:44pm UTC](https://forum.yunohost.org/t/proposition-de-changement-dans-le-fichier-base-njk-pour-presence-de-balise-head-trop-nombreuse/41667/1 "2026-02-24T15:44:19Z")

</div>

Bonjour, Dans le fichier \_includes/base.njk on trouve 2 fois la balise \\<head\\>\\<\/head\\> :

- une fois dans l’entête (normal)
- une fois dans le corps du fichier (pas normal, à mon sens)

````xml
<html lang="en"> 
<head> 
   <meta charset="utf-8"> 
   <meta name="viewport" content="width=device-width, initial-scale=1"> 
   <title>{{ title }}</title> 
   <link rel="stylesheet" href="css/style.css"> 
</head> 
<body> 
   <head> 
      <h1>{{ title }}</h1> 
      <main> {{ content | safe }} </main> 
   </head> 
</body> 
</html>``` 

````

je propose de supprimer la balise superfétatoire ; le code deviendrait alors :

```xml
<!doctype html> 
<html lang="en"> 
<head> 
   <meta charset="utf-8"> 
   <meta name="viewport" content="width=device-width, initial-scale=1"> 
   <title>{{ title }}</title> 
   <link rel="stylesheet" href="css/style.css">
</head> 
<body> 
   <h1>{{ title }}</h1> 
   <main> {{ content | safe }} </main> 
</body> 
</html>

```

---

<div class="post-metadata">

### Author: ![jarod5001](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jarod5001/32/5323_2.png) [@jarod5001](https://forum.yunohost.org/u/jarod5001)
#### Post date: [February 24, 2026, 6:54pm UTC](https://forum.yunohost.org/t/proposition-de-changement-dans-le-fichier-base-njk-pour-presence-de-balise-head-trop-nombreuse/41667/2 "2026-02-24T18:54:44Z")

</div>

C’est tout à fait logique

Un correctif sera disponible dans la prochaine version

> <https://github.com/YunoHost-Apps/eleventy_ynh/pull/20>
>
> \## Problem
> 
> \- \*Description of why you made this PR\*
> 
> \## Solution
> 
> \- \*And h…ow 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)

---

<div class="post-metadata">

### Author: ![MariusBaguepi](https://forum.yunohost.org/user_avatar/forum.yunohost.org/mariusbaguepi/32/13344_2.png) [@MariusBaguepi](https://forum.yunohost.org/u/MariusBaguepi)
#### Post date: [February 24, 2026, 7:52pm UTC](https://forum.yunohost.org/t/proposition-de-changement-dans-le-fichier-base-njk-pour-presence-de-balise-head-trop-nombreuse/41667/3 "2026-02-24T19:52:34Z")

</div>

super !

Merci
