(Reference: community docs)
In order to build the Plutus documentation in a local web server with js enabled, we just need to follow the next simple steps.
- Go to your plutus folder
some/path$ cd /path/to/plutus/plutus- Enter nix shell
path/to/plutus/plutus$ nix-shell- (Optional) If you have not before, build plutus haddock
path/to/plutus/plutus$ nix-build -A plutus-playground.haddock- Once it loads, go up one level and create a new directory
path/to/plutus/plutus$ cd ..
path/to/plutus$ mkdir haddock-web- Then
cdintohaddock-weband create and compile a main.hs file, as described in the reference - Finally, from this same directory, launch the server
haddock-web$ ./plutus-haddock -s /path/to/plutus/plutus/result- You will see something like
running plutus documentation in http://localhost:8081/plutus-haddock/index.htmlso go to the browser and enjoy. By pressing s in the browser you will open a search bar.