feat(cli): add --config/-c option to ea spa for site customization#18
Merged
Conversation
The lutaml-uml StaticSite::Generator already accepts a config_path option and uses it to set the SPA title, description, logos, and other branding metadata. But the ea spa CLI had no way to pass a config through, so every generated SPA used the default "UML Browser" / "UML Model Documentation" title and the default LutaML logo. This blocks per-site branding. The plateau-model deployment, for example, needs the generated CityGML 2.0 and 3.0 SPAs to show the PLATEAU logo and "PLATEAU Model" title, not generic LutaML defaults. Changes - app.rb: declare option :config on spa with -c short alias, using the same CONFIG_OPTION shared-kwargs pattern as OUTPUT_OPTION - spa.rb: resolve the path (expanding ~ and raising FileNotFound if missing) and forward it as config_path into the Generator options - app_spec.rb: three new specs covering the -c help-text alias, a full end-to-end run that asserts the config title appears in the generated HTML, and the missing-file error path Existing -o specs continue to pass (10 examples, 0 failures total).
ronaldtse
added a commit
to metanorma/plateau-models
that referenced
this pull request
Jul 18, 2026
Three coordinated changes that together make both the landing page
and the generated SPAs carry the actual PLATEAU brand identity.
1. Landing page logo (index.html)
Replaced the invented bar-chart "P" with the official PLATEAU logo
lockup, copied verbatim from mlit.go.jp/plateau/assets/img/common/
logo.svg. The mark paths keep their brand fills (#463C64 deep
indigo, #00BEBE teal); the PLATEAU wordmark and "by MLIT" tagline
paths use currentColor so they flip with the theme. Same lockup is
reused in the footer dark band. Page <title>, meta description, and
visible brand text now read "PLATEAU by MLIT — UML Models" with
proper JA / EN translations via the existing data-i18n swap.
2. Per-SPA customization (citygml-2.config.yml, citygml-3.config.yml)
Two lutaml-uml static-site configs that set metadata.title,
metadata.description, metadata.appearance.logos (PLATEAU logo URLs),
plus ui.title and ui.description. The generated SPAs now show
"PLATEAU Model|CityGML 2.0 UML Browser" / "...3.0..." in the
browser tab and the Vue app shell, with the PLATEAU logo wired into
the metadata. Same logo URLs for light/dark use the official
logo.svg / logo_white.svg pair.
3. Workflow + Gemfile
- deploy-pages.yml: ea spa invocations now pass --config
citygml-{2,3}.config.yml so each generated SPA picks up its
config-driven branding.
- Gemfile: pin ea >= 0.2.4, which is the version that ships the
--config / -c option (released today as lutaml/ea#18).
4 tasks
ronaldtse
added a commit
to metanorma/plateau-models
that referenced
this pull request
Jul 18, 2026
Three coordinated changes that together make both the landing page
and the generated SPAs carry the actual PLATEAU brand identity.
1. Landing page logo (index.html)
Replaced the invented bar-chart "P" with the official PLATEAU logo
lockup, copied verbatim from mlit.go.jp/plateau/assets/img/common/
logo.svg. The mark paths keep their brand fills (#463C64 deep
indigo, #00BEBE teal); the PLATEAU wordmark and "by MLIT" tagline
paths use currentColor so they flip with the theme. Same lockup is
reused in the footer dark band. Page <title>, meta description, and
visible brand text now read "PLATEAU by MLIT — UML Models" with
proper JA / EN translations via the existing data-i18n swap.
2. Per-SPA customization (citygml-2.config.yml, citygml-3.config.yml)
Two lutaml-uml static-site configs that set metadata.title,
metadata.description, metadata.appearance.logos (PLATEAU logo URLs),
plus ui.title and ui.description. The generated SPAs now show
"PLATEAU Model|CityGML 2.0 UML Browser" / "...3.0..." in the
browser tab and the Vue app shell, with the PLATEAU logo wired into
the metadata. Same logo URLs for light/dark use the official
logo.svg / logo_white.svg pair.
3. Workflow + Gemfile
- deploy-pages.yml: ea spa invocations now pass --config
citygml-{2,3}.config.yml so each generated SPA picks up its
config-driven branding.
- Gemfile: pin ea >= 0.2.4, which is the version that ships the
--config / -c option (released today as lutaml/ea#18).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
StaticSite::Generatoralready acceptsconfig_path:and uses it to drive the SPA title, description, logos, and other branding metadata via a YAML schema. Theea spaCLI previously had no way to pass a config through, so every generated SPA inherited the generic "UML Browser" defaults.option :config(short alias-c) toea spa, validates the file exists, and forwards it asconfig_path:to the Generator. Per-site branding is now possible (e.g., theplateau-modeldeployment can have its SPAs show the PLATEAU logo and "PLATEAU Model" title).Changes
lib/ea/cli/app.rb: declareoption :configonspa, using a newCONFIG_OPTIONshared-kwargs constant that mirrors the existingOUTPUT_OPTIONpattern.lib/ea/cli/command/spa.rb: resolve the path (expand~, raiseEa::Cli::FileNotFoundif missing) and forward it into the Generator options.spec/ea/cli/app_spec.rb: three new specs — help-text alias visibility, end-to-end run asserting the config title appears in the generated HTML, and the missing-file error path.Test plan
bundle exec rspec spec/ea/cli/— 10 examples, 0 failuresea spa model.qea -c config.yml -o out.htmlproduces HTML containing the configured titleea spa model.qea -c /nonexistentraisesEa::Cli::FileNotFound