đŸ’ģIncludes with Siteglide CLI

Includes are all of the following: Code Snippet, Content Section, Header, Footer.

See the file structure to understand where each file should be placed:

YAML Metadata

This is an example Include generated by Siteglide. Below, we'll list available YML parameters, and body content.

---
metadata:
    id: 1
    name: Main Section
    file_type: content_section
physical_file_path: views/partials/includes/content_section/1.liquid
---
<!-- INCLUDE CONTENT HERE -->

Parameters

metadata

  • id - Used by UI to reference Includes. Must be unique in the scope of that Include type (i.e. you could have ID=1 for both a Header and Footer) (required)

  • name - Include name shown in UI (required)

  • file_type - Used to define where the Include shows in UI.

    • Options: code_snippet, content_section, header, footer (required)

  • last_edit - timestamp of last edit - shown in UI

physical_file_path - Files should be stored in a location relative to their ID and file_type. If your ID is '3', and file_type is 'header', then the physical_file_path would be views/partials/includes/header/3.liquid

Last updated