diff --git a/README.md b/README.md index 38aba848..f21f03a3 100644 --- a/README.md +++ b/README.md @@ -30,34 +30,6 @@ data portals - Static Site Generation (SSG) (good for small sites) => ultra-simple deployment, great performance and lighthouse scores etc - 📋 Typescript support -## Getting Started - -### Setup - -Install a recent version of Node. You'll need Node 10.13 or later. - -Install `yarn`. - -### Try out the demo portal - -Create a demo portal (for a single dataset): - -```bash -npx create next-app -e https://github.com/datopian/portal.js/tree/main/examples/dataset-frictionless -# choose a name for your portal when prompted e.g. your-portal or go with default my-app - -# then run it -cd your-portal -yarn #install packages -yarn dev #start app in dev mode -``` - - -You should see the demo portal running. - - -You can try it out with other Frictionless datasets. - ### Check out more of the examples The [`examples` directory](./examples) is regularly updated with different portal examples. diff --git a/examples/dataset-frictionless/README.md b/examples/dataset-frictionless/README.md index 3ee3c848..01b3582d 100644 --- a/examples/dataset-frictionless/README.md +++ b/examples/dataset-frictionless/README.md @@ -1,24 +1,39 @@ -This examples if for presenting a single dataset. The dataset should be a [Frictionless dataset (data package)][fd] i.e. there should be a `datapackage.json`. +This example creates a portal/showcase for a single dataset. The dataset should be a [Frictionless dataset (data package)][fd] i.e. there should be a `datapackage.json`. [fd]: https://frictionlessdata.io/data-packages/ -## Install +## How to use -Git clone this directory then: +```bash +npx create next-app -e https://github.com/datopian/portal.js/tree/main/examples/dataset-frictionless +# choose a name for your portal when prompted e.g. your-portal or go with default my-app -``` -yarn install +# then run it +cd your-portal +yarn #install packages +yarn dev #start app in dev mode ``` -## Usage +You should see the demo portal running with the example dataset provided: -In this directory: + + +### Use your own dataset + +You can try it out with other Frictionless datasets. + +In the directory of your portal do: ```bash export PORTAL_DATASET_PATH=/path/to/my/dataset +``` + +Then restart the dev server: + +``` yarn dev ``` -And you will get a nice dataset page at `http://localhost:3000` +Check the portal page and it should have updated e.g. like: ![](https://i.imgur.com/KSEtNF1.png)