Closed MAX-786 closed 4 months ago
@MAX-786 You need to remove the @utils/hydra
file, add - 'examples/*'
to the pnpm-workspace
file and update all the imports of @utils/hydra
to be import { initBridge, onEditChange } from '@volto-hydra/hydra-js';
One other thing I added in #74 that should also be added here are some simple Makefile commands and an npm script to start the admin UI with the default URL set to the URL of the example frontend and a command to start the example frontend without having to know anything about it. E.g:
## Examples
.PHONY: example-astro-admin
example-astro-admin:
RAZZLE_DEFAULT_IFRAME_URL=http://localhost:4321 pnpm start
.PHONY: example-astro-frontend
example-astro-frontend: ## Starts Volto, allowing reloading of the add-on during development
pnpm example:astro
Then in package.json:
"example:astro": "pnpm --filter hydra-astro run dev"
@JeffersonBledsoe Updated as per requested and also updated the readme for the instructions!
@MAX-786 I notice the hydra.js is checked intot he example which is probably shouldn't be right?
Oh thanks!! I'll remove it from the example folder, Just a little thing, what might be the better way to do it, a separate PR or just restore this branch add that commit and merge again?
updated example frontend readme for instructions.