# Content Reuse URL: /bengal/docs/build-sites/write/reuse/ Section: reuse Tags: persona-writer -------------------------------------------------------------------------------- Reusing Content Write once, publish everywhere. Bengal provides multiple ways to avoid repeating yourself. Note Note Do I need this? Yes when the same block appears on multiple pages or you pull shared data from YAML/JSON. Skip until you notice copy-paste across pages. File Content Snippets Reusable content fragments with include directives File Advanced Filtering Build dynamic pages that filter content by multiple tags or criteria Reuse Strategies flowchart LR subgraph "Single Source" A[Snippet] B[Data File] C[Shortcode] end subgraph "Multiple Outputs" D[Page 1] E[Page 2] F[Page 3] end A --> D A --> E B --> D B --> F C --> E C --> F Quick Reference Snippets Data Files Filtering Reusable Markdown fragments stored in _snippets/: _snippets/ ├── install/ │ ├── pip.md │ └── uv.md └── warnings/ └── experimental.md Include in any page: :::{include} _snippets/install/pip.md ::: Structured YAML/JSON in data/: # data/team.yaml - name: Jane Doe role: Lead Developer github: janedoe Access in templates: {% for member in site.data.team %} {{ member.name }} - {{ member.role }} {% end %} Query content dynamically: {# All tutorials #} {% let tutorials = site.pages |> where('type', 'tutorial') %} {# Recent posts #} {% let recent = site.pages |> sort_by('date', reverse=true) |> take(5) %} When to Use What Method Best For Example Snippets Repeated prose blocks Installation instructions, warnings Data Files Structured data Team members, product features Filtering Dynamic lists Recent posts, related pages Shortcodes Parameterized components Video embeds, API badges Tip Tip Start with snippets for common content blocks. Graduate to data files when you need structured data, and filtering when you need dynamic queries. -------------------------------------------------------------------------------- Metadata: - Author: lbliii - Word Count: 265 - Reading Time: 1 minutes