Skip to main content

Dossiers

Nous utilisons le principe "Convention is better than configuration".

Chaque fichier de template se nomme index.twig. Nous créons un chemin de dossiers vers ce fichier selon son section type à partir du dossier templates/_sections.

TEMPLATES
  ├── _abstracts (font-face and webpack generated files)
  │   ├── critical (critical CSS for the homepage)
  ├── _base (layout, header, etc.)
  ├── _macros
  ├── _navigation (your navbar and menus)
  ├── _sections
  │   ├── single
  │   │   ├── home (example used by the single singleHome )
  │   │   │   └── index.twig
  │   │   └── news (example used by the single singleNews )
  │   │       └── index.twig
  │   ├── channel
  │   │   ├── events (example used by a channel channelEvents, the template of each entry )
  │   │   │   └── index.twig
  │   │   └── news (example used by a channel channelNews, the template of each entry )
  │   │       └── index.twig
  │   ├── structure (same for your structures)
  │   ├── category (same for your categories if they have a template )
  ├── components
  │   └── pagination.twig (example)
  ├── 404.twig
  ├── sitemap.xml.twig (sitemap, adapt for your project)
  ├── human.txt
  └── robot.txt
Le underscore devant les dossiers empêche d'accéder à ces dossiers à partir du web.

Dossier _sections

Structure templates

Multiple entry types

Multiple entry types

Handle vs Dossiers

La structure des dossiers est créée selon une combinaison du nom du handle

Nomenclature sections

Multiple entry types

Nomenclature entry types

Category Groups

Nomenclature category group

SRC and config folders

SRC
  ├── ejs (templates used by Webpack)
  ├── js (your JavaScript files)
  ├── css (your custom tailwind CSS)
  └── svg
      └── sprite-images (your source SVG to add to the sprite)
CONFIG
  ├── project (fichiers yaml de structure de l'admin, générés automatiquement)
  ├── redactor (customs configs pour l'éditeur Redactor)
  └── general.php (fichier de config du projet)