Skip to content

Commit

Permalink
Updated build related docs
Browse files Browse the repository at this point in the history
Signed-off-by: Jitendra Gundaniya <[email protected]>
  • Loading branch information
jitu5 committed Oct 7, 2024
1 parent 34bcb55 commit 35cd139
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/source/platform_agnostic_sharing_with_kedro_viz.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,32 @@ Starting from Kedro-Viz 9.2.0, `kedro viz build` will not include dataset previe

This creates a `build` folder containing your Kedro-Viz app package in your project directory.

## Running Kedro-Viz Locally

Check warning on line 49 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L49

[Kedro-viz.headings] 'Running Kedro-Viz Locally' should use sentence-style capitalization.
Raw output
{"message": "[Kedro-viz.headings] 'Running Kedro-Viz Locally' should use sentence-style capitalization.", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 49, "column": 4}}}, "severity": "WARNING"}

When you generate build folder with the command `kedro viz build`, it creates a build directory with an `index.html` file, which is the entry point for visualizing your pipeline. However, simply opening `index.html` using the file protocol `file://` is not supported due to Cross-Origin Resource Sharing Policy in modern browsers.

Check warning on line 51 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L51

[Kedro-viz.ukspelling] In general, use UK English spelling instead of 'visualizing'.
Raw output
{"message": "[Kedro-viz.ukspelling] In general, use UK English spelling instead of 'visualizing'.", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 51, "column": 153}}}, "severity": "WARNING"}

Check warning on line 51 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L51

[Kedro-viz.toowordy] 'However' is too wordy
Raw output
{"message": "[Kedro-viz.toowordy] 'However' is too wordy", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 51, "column": 180}}}, "severity": "WARNING"}

Check warning on line 51 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L51

[Kedro-viz.words] Use '' instead of 'simply'.
Raw output
{"message": "[Kedro-viz.words] Use '' instead of 'simply'.", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 51, "column": 189}}}, "severity": "WARNING"}

Check warning on line 51 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L51

[Kedro-viz.weaselwords] 'simply' is a weasel word!
Raw output
{"message": "[Kedro-viz.weaselwords] 'simply' is a weasel word!", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 51, "column": 189}}}, "severity": "WARNING"}

### Using a Local Server

Check warning on line 53 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L53

[Kedro-viz.headings] 'Using a Local Server' should use sentence-style capitalization.
Raw output
{"message": "[Kedro-viz.headings] 'Using a Local Server' should use sentence-style capitalization.", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 53, "column": 5}}}, "severity": "WARNING"}

To view your pipeline visualization correctly, you need to serve `index.html` using an HTTP server. Here are a few simple ways to do this:

Check warning on line 55 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L55

[Kedro-viz.ukspelling] In general, use UK English spelling instead of 'visualization'.
Raw output
{"message": "[Kedro-viz.ukspelling] In general, use UK English spelling instead of 'visualization'.", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 55, "column": 23}}}, "severity": "WARNING"}

Check warning on line 55 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L55

[Kedro-viz.weaselwords] 'correctly' is a weasel word!
Raw output
{"message": "[Kedro-viz.weaselwords] 'correctly' is a weasel word!", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 55, "column": 37}}}, "severity": "WARNING"}

Check warning on line 55 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L55

[Kedro-viz.weaselwords] 'few' is a weasel word!
Raw output
{"message": "[Kedro-viz.weaselwords] 'few' is a weasel word!", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 55, "column": 112}}}, "severity": "WARNING"}

Check warning on line 55 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L55

[Kedro-viz.words] Use '' instead of 'simple'.
Raw output
{"message": "[Kedro-viz.words] Use '' instead of 'simple'.", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 55, "column": 116}}}, "severity": "WARNING"}

1. Python's Built-in HTTP Server:
- Navigate to the build directory and run:
```bash
python -m http.server
```
- This starts a web server at `http://localhost:8000`, which you can use to view index.html.

2. Node's http-server:
- First, install it globally:
```bash
npm install -g http-server
```
- Then, run it from the build directory:
```bash
http-server
```
## Static website hosting platforms such as GitHub Pages
Follow the steps [listed in the GitHub pages documentation](https://docs.github.com/en/pages/quickstart) to create a Git repository that supports GitHub Pages. On completion, push the contents of the previously created `build` folder to this new repository. Your site will be available at the following URL: `http://<username>.github.io`

0 comments on commit 35cd139

Please sign in to comment.