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

Enable easy creation of static index.html pages #465

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

mescanne
Copy link
Contributor

This uses string tokens for the manifest.json and catalog.json data files that can be used as an alternative -- replacing them with actual objects -- of reading in JSON files.

This is a step to resolving #53. An additional PR will be submitted for dbt-core with the generated index.html from this version.

Description

Generating a static index.html after a webpack process is not straightforward.

Two strings are used as a unique value in the generated index.html that can be replaced with objects that, when replaced, will use those object values rather than fetching through HTTP for the data.

This will enable an extra step in dbt-core docs generation to generate a static index.html upon request.

Why? See issue #53 for many users over years expressing desire for this. For example, including the static index.html in a ZIP file -- which can be inspected locally -- and hosting it in a blobstorage/GCS/S3 in a way that can be downloaded in isolation.

Checklist

be used for the manifest.json and catalog.json data. This does not
change the existing behaviour.
@cla-bot cla-bot bot added the cla:yes label Sep 11, 2023
@mescanne
Copy link
Contributor Author

NOTE:

  • I also removed the TARGET_PATH (not being used)
  • I had to use --openssl-legacy-provider due to nodejs 17 (see this)

Copy link

@QMalcolm QMalcolm left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks again for doing this work 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants