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

Switch domain to host in ucdlib-author-profile #73

Open
jrmerz opened this issue Aug 18, 2022 · 0 comments
Open

Switch domain to host in ucdlib-author-profile #73

jrmerz opened this issue Aug 18, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@jrmerz
Copy link
Contributor

jrmerz commented Aug 18, 2022

Instead of a domain property referencing the subdomain name of the hosting wordpress server, have a host property which includes the protocol (ex https://) plus the domain. Default the host property to window.location.origin if none is set.

So under this setup, a third party site wanting to use the author component would write something like:

<ucdlib-author-profile host="https://library.ucdavis.edu" email="[email protected]"></ucdlib-author-profile>

Additionally have a new apiPath property which defaults to /wp-json/ucdlib-directory/person/

So this code would now look like:

let url = (this.host || window.location.origin) + this.apiPath + email;
@jrmerz jrmerz added the enhancement New feature or request label Aug 18, 2022
@sbagg sbagg mentioned this issue Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants