How to use the CLI#

To build the new version of the website in the default ./output directory, run the following:

swh dataportal build

If you prefer to specify the output directory, run the following:

swh dataportal build -o path/to/output

Then, to serve it locally

python3 -m http.server -b :: -d output/html

If you’re hacking on the code and need to run these commands multiple times in a row then you should use the watch command. It:

  • builds the website in the default output directory

  • serves it on http://127.0.0.1:8000

  • watches the swh/dataportal directory for changes and rebuilds the website when needed

swh dataportal watch