Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic Template Configuration with Frontmatter #244

Open
sudhacheran opened this issue Nov 25, 2024 · 0 comments
Open

Dynamic Template Configuration with Frontmatter #244

sudhacheran opened this issue Nov 25, 2024 · 0 comments
Assignees

Comments

@sudhacheran
Copy link
Collaborator

sudhacheran commented Nov 25, 2024

This task involves updating the templates_config.ts file to manage and dynamically load MDX templates based on frontmatter (https://mdxjs.com/guides/frontmatter/). Each workflow MDX file will include frontmatter that defines metadata (e.g., title, description, templateKey), and this information will be used to configure and display workflow templates in the application.

Example Frontmatter for "Attic Air Sealing and Insulation" workflow:

'---
title: "Attic Air Sealing and Insulation"
description: "This workflow provides step-by-step quality installation procedures for sealing air leaks and adding insulation to the attic to improve energy efficiency."
templateKey: "doe_workflow_attic_air_sealing_and_insulation"
version: "1.0" (optional)
---'

Edge Case Handling & Error Handling:

Required:

  1. Handle case when 2 or more templates have the same "templateKey".
  2. Handle case when an imported document (JSON file) refers to an unknown template using a "templateKey" that is not found.

Optional:

  1. Including version key in the frontmatter to support multiple versions of the same template. The key-value pair should also be stored locally along with templateKey and imported/exported in JSON documents
  2. Handle case when an imported JSON document refers to a known template using a "version" that is not found.
  3. Add debugging screen to list known templates and their versions.
@lindsayJohnstonPnnl lindsayJohnstonPnnl self-assigned this Dec 11, 2024
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

When branches are created from issues, their pull requests are automatically linked.

2 participants