Skip to content

Schemas: Created new pages for each agency form#80

Merged
natalialuzuriaga merged 6 commits intoDSACMS:mainfrom
natalialuzuriaga:main
Jul 22, 2025
Merged

Schemas: Created new pages for each agency form#80
natalialuzuriaga merged 6 commits intoDSACMS:mainfrom
natalialuzuriaga:main

Conversation

@natalialuzuriaga
Copy link
Copy Markdown
Contributor

@natalialuzuriaga natalialuzuriaga commented Jul 22, 2025

Problem

We would like to create separate web pages for each agency's metadata form:

  • / is the default schema
  • /cms uses the CMS schema

Solution

Set up separate agency metadata form web pages by using query parameters. Since GitHub Pages does not support custom routes, query parameters can be used to redirect the clean URL to the webpage (/cms -> /?page=cms). This works by /cms redirecting to 404.html which contains a script for change the webpage URL to use the page query parameter (/?page=cms). Using the page parameter value allows us to ingest the corresponding schema json file.

To support this work, updated schemas directory to add a new gov directory containing default schema and cms directory containing CMS schema.

Other updates include:

  • Linting
  • Updated values to be all lowercase in schema json files.

Result

When a user goes to dsacms.github.io/codejson-generator, it takes them to the form that uses the default schema.
When a user goes to dsacms.github.io/codejson-generator/cms, it takes them to the form that uses the CMS schema.

Testing

Tested page redirects on GitHub Pages using personal fork:
https://natalialuzuriaga.github.io/codejson-generator/ uses default schema
https://natalialuzuriaga.github.io/codejson-generator/cms redirects to https://natalialuzuriaga.github.io/codejson-generator/?page=cms uses CMS schema

Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Copy link
Copy Markdown
Contributor

@decause-gov decause-gov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing 🤩

LGTM +1 🚢

@natalialuzuriaga natalialuzuriaga merged commit 2b3782a into DSACMS:main Jul 22, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants