Enable easy creation of static index.html pages #465
Merged
+21
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
changie new
to create a changelog entry