Skip to content
This repository has been archived by the owner on Jan 22, 2023. It is now read-only.

Document common template patterns #15

Open
chrisdmacrae opened this issue Feb 14, 2019 · 0 comments
Open

Document common template patterns #15

chrisdmacrae opened this issue Feb 14, 2019 · 0 comments

Comments

@chrisdmacrae
Copy link
Owner

chrisdmacrae commented Feb 14, 2019

Document how to use different template patterns:

  • content -> output files for site/PWA
  • includes/extends/ -> inheritance-based templates
  • includes/layouts/ -> wrappers for content
  • includes/partials/ -> repeatable blocks of content
  • lib/shortcodes/ -> repeatable components

Document why not to use component abstractions from a template engine (e.g, nunjucks macros) and to instead favor shortcodes.

Document the template lookup order:

Examples:

  • layout -> asset
  • layout -> layout -> asset
  • extend [layout] -> asset
  • extend [layout] -> extend[asset]
  • extend [layout] -> extend [layout] -> extend [asset]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant