Skip to content

Consolidate Code Examples Using Hugo Shortcodes #73

@pabloariasmora

Description

@pabloariasmora

Description:
Currently, the documentation includes embedded code examples directly within the markdown files. To improve maintainability and consistency, it would be beneficial to consolidate code examples using Hugo shortcodes. This approach allows code examples to be included from separate files, making it easier to update and manage them.

Proposed Solution:

  • Use Hugo's readFile shortcode to include code examples from separate files.
  • Organize code examples in a dedicated directory within the repository.
  • Update the documentation to reference the code examples using the readFile shortcode.

Benefits:

  • Improved maintainability: Code examples can be updated independently of the documentation.
  • Consistency: Ensures that code examples are consistent across different sections of the documentation.
  • Clarity: Separates content from code, making the documentation easier to read and navigate.

For more details on how to implement this, please refer to this guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions