Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[import] Document links update and provide helper function #416

Open
kptdobe opened this issue Aug 20, 2024 · 2 comments
Open

[import] Document links update and provide helper function #416

kptdobe opened this issue Aug 20, 2024 · 2 comments

Comments

@kptdobe
Copy link
Contributor

kptdobe commented Aug 20, 2024

Links need to be updated (make absolute on the .page instance) - pb, during import we do not know the target .page host name thus the default import cannot do it and it is responsibility of the dev to do it. We should update the document to describe the todos and provide a makeLinksAbsolute helper method.

@kptdobe kptdobe changed the title [import] Document links update and provide helper function [import] Automatically update links Aug 20, 2024
@kptdobe
Copy link
Contributor Author

kptdobe commented Aug 20, 2024

The AEM cli sets a hlx:proxyUrl meta property. We might be able to use it and automatically update the links... needs investigations.

@kptdobe kptdobe changed the title [import] Automatically update links [import] Document links update and provide helper function Aug 20, 2024
@kptdobe
Copy link
Contributor Author

kptdobe commented Aug 20, 2024

Quickly looked into it, the meta property approach is not a good option: the property would have to be injected into the static html files of the Importer UI (which is ugly) and would also imply that the import.js knows that in its "execution context" there is this meta property. Then if you want to use the import.js in a different context, like a Node.JS importer, you need to make sure it provides this meta. Not nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant