# content.just — content authoring recipes (consumable module) # # Thin sugar over the installed `rustelo-content` CLI. Sites consume it with: # # mod authoring ".just/content.just" # symlink → this file in the source repo # # then run `just authoring images --type blog --provider gemini --dry-run`, etc. # (Named `authoring` in sites to avoid colliding with a flat `content` recipe.) # # Recipes are pure `*args` passthrough: write the exact flags you'd give # `rustelo-content` — just forwards every token after the recipe name verbatim. # # [no-cd] is mandatory: inside a `mod`, just changes into the MODULE's directory # by default, which would break the scripts' ./site/content path defaults. With # [no-cd] the recipes run in the invocation PWD (the site root containing site/). # # Requires `rustelo-content` on PATH — install from the source repo with # `just content-install`. # default — list recipes instead of running one (a bare `just ` otherwise # fires the first recipe, which would start real generation). [no-cd] default: @echo "authoring recipes: images | sync | validate | validate-ids | new | copy-images | classify | publish" @echo "usage: just [flags] e.g. just authoring images --type blog --provider gemini --dry-run" @echo "deploy: just publish [--dry-run|--all|--since ] classify without deploying: just classify" @echo "direct: rustelo-content --help" # Generate AI images (provider-agnostic openai|gemini). Pass any generate-images # flags: --type --lang --slug --provider --model --quality --dry-run --force ... [no-cd] images *args: rustelo-content images {{ args }} # Translation parity, e.g. `just authoring sync validate-translations`. [no-cd] sync *args: rustelo-content sync {{ args }} # Validate content consistency. [no-cd] validate *args: rustelo-content validate {{ args }} # Validate cross-language id consistency. [no-cd] validate-ids *args: rustelo-content validate-ids {{ args }} # Scaffold a new content item, e.g. `just authoring new blog --title "..."`. [no-cd] new *args: rustelo-content new {{ args }} # Copy _images/ into the public assets tree. [no-cd] copy-images *args: rustelo-content copy-images {{ args }} # Pass content.nu classify flags, e.g. `just classify --since HEAD~3` or # explicit paths. Prints per-path class + the resolved overall class. # Classify the current change WITHOUT deploying (hot|config_reload|restart|rebuild). [no-cd] classify *args: #!/usr/bin/env sh set -eu module="{{ source_file() }}" if [ -L "$module" ]; then src=$(cd "$(dirname "$module")" && cd "$(dirname "$(readlink "$module")")" && pwd) else src=$(cd "$(dirname "$module")" && pwd) fi exec nu "$src/../provisioning/content.nu" classify --root "$(pwd)" {{ args }} # Identity + transport come from this site's rustelo.manifest.toml. Flags: # `--dry-run` `--all` `--since ` `--namespace ` `--cp-node ` `--pod `. # Classify + ship the current change with the minimal deploy action (sync/restart/rebuild). [no-cd] publish *args: #!/usr/bin/env sh set -eu module="{{ source_file() }}" if [ -L "$module" ]; then src=$(cd "$(dirname "$module")" && cd "$(dirname "$(readlink "$module")")" && pwd) else src=$(cd "$(dirname "$module")" && pwd) fi exec nu "$src/../provisioning/content.nu" publish --root "$(pwd)" {{ args }}