Skip to content

Tags

Tags are the connective tissue between content and filtering in the Nama theme. Every blog article and parts product carries a set of prefixed tags that drive category labels on cards, filter drawers, and collection segmentation. Most prefixes map to a blog_category metaobject entry so tags can carry display names, colors, images, and sort order without polluting the tag string itself.

Used on articles in the Recipes blog (blog.recipes).

Prefix Category Example tags Metaobject lookup
type_ Recipe Type type_juice, type_smoothie, type_mocktail, type_nut-milk, type_sorbet blog_category (group recipe_type)
season_ Season season_spring, season_summer, season_fall, season_winter None – hardcoded display order
ingredient_ Ingredients ingredient_carrot, ingredient_apple blog_category (group recipe_ingredient_items)
product_ Made With product_nama-j2, product_nama-c2 Product reference (no metaobject)

The full tag inventory and auto-tagger config lives in the external repo at nama-recipes-auto-tagger/data/tag-config.json.

Used on articles in the Fresh Press blog (blog.fresh-press).

Prefix Category Example tags Metaobject lookup
category_ Article Category category_guides, category_interviews blog_category (group article_category)
topic_ Article Topic topic_juicing, topic_blending, topic_plant-based-milk, topic_inspiration blog_category (group article_topic)

A tagging script exists at nama-recipes-auto-tagger/src/tag-fresh-press-topics.js but has not yet been executed against the live store. It supports --execute and --undo flags with a JSON log at data/fresh-press-topics-log.json.

Used on replacement-part and accessory products to drive Collection Filters.

Prefix Purpose Model suffixes
product_type_nama_ Product category j1, j2, j2_XL, j3, c2, m1
product_compatibility_nama_ Compatible with (machine) j1, j2, j2_XL, j3, c2, m1

These were renamed from an older format (product_type_j2 to product_type_nama_j2) via a migration script at nama-recipes-auto-tagger/src/rename-parts-tags.js. That script also has not yet been executed – it supports --execute, --undo, and --limit flags with dry-run as the default.

All blog tag lookups follow the same four-step pattern:

1. Scan article.tags for the first tag matching the prefix
2. Strip the prefix → "type_nut-milk" becomes "nut-milk"
3. Slugify the remainder to build a metaobject handle
4. Look up shop.metaobjects.blog_category[handle]
→ read card_label (fallback: title), color, image, sort_order

This pattern is used in blog-recipe-card.liquid, blog-featured-card.liquid, blog-recipe-filters.liquid, main-recipe-article.liquid, main-fresh-press-article.liquid, blog-listing.liquid, search-articles-json.liquid, and search-sidebar-card.liquid.

The blog_category metaobject carries a group field that namespaces entries – recipe_type entries and article_topic entries all live in the same blog_category definition but are distinguished by group, so a single handle lookup works across both blogs.

Filters combine using a straightforward rule:

  • Same prefix = OR. Checking type_juice and type_smoothie returns articles tagged with either type.
  • Different prefix = AND. Checking type_juice and ingredient_carrot returns only juice recipes that also contain carrot.

AND queries across different prefixes run as parallel Search API fetches with client-side intersection of the result sets.

The season filter is special-cased: its display order is hardcoded (Spring, Summer, Fall, Winter) rather than pulled from a metaobject sort field.

  • Blog Listing – category pills, card labels, filter drawer checkboxes, and search results all derive from tags.
  • Collection Filters – product tag prefixes power the filter pill groups via collection_filter_set metaobjects.
  • Featured Recipes – the tag field accepts a full tag string (e.g. product_nama-j2) to auto-populate the card grid with matching articles.
  • Article detail pages – the primary category tag resolves to a metaobject for the colored category badge rendered at the top of the article.