Skip to content

Load js/tacc-theme.module.js Via mkdocs.yml #38

@wesleyboar

Description

@wesleyboar

Problem

Loading js/tacc-theme.module.js via custom HTML:

  1. Loads important JavaScript in unexpected way (for a MkDocs project).
  2. Is only done because I forgot import('…') can dynamically load ES module.

Solution

A. Compatible with MkDocs

  1. Rename js/tacc-theme.module.js to js/tacc-theme.js.
  2. Edit js/tacc-theme.js to use import('…') instead of import '…'.
  3. Edit mkdocs.yml to load js/tacc-theme.js via extra_javascript.
  4. Delete js/tacc-theme.module.js load from main.html.

B. Compatible with MkDocs-TACC

  1. Edit mkdocs.yml to load js/tacc-theme.module.js via extra_javascript.
  2. Delete js/tacc-theme.module.js load from main.html.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions