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
document annotator plugin #208
Conversation
… dublincore if possible
…nce they are shared across so many resources
|
||
# hack to get a absolute url from a possibly relative one | ||
|
||
_absoluteUrl: (url) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make this honor the tag, if one is found?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. Github is stripping what it thinks is HTML from my comment. I mean this: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It gets a little bit tricky when needing to account for '../../' etc no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never mind. I didn't read carefully to see the trick you're using. At least in Chrome this trick is affected by the base tag anyway, so it's all handled.
How about we do another pull request for this deduping behavior, since it's not really part of the Document plugin? |
+1 |
Ok, I took a stab at deduping/updating and sent a separate pull request: #209 |
@nickstenning, @aron thoughts? |
…nts repository (and others) use uppercase form e.g. http://eprints.soton.ac.uk/273248/
This looks great. Is it worth adding canonical URL data to this plugin (see #86) or do you reckon that would be a separate plugin? I guess I'd lean slightly towards the latter... (and certainly shouldn't be a blocker on a merge). |
The plugin does extract rel="canonical" links but until the last commit it didn't look for rel="bookmark". Thanks! |
Great work, @edsu! Merged! |
Hey @AnnaGerber, look! We merge stuff. (Hint hint.) |
The document plugin extracts metadata from HTML pages (Dublin Core, Facebook OpenGraph Protocol, Google Scholar, link relations) to be sent along as part of the JSON payload for the annotation.
It is part of some work being done at Hypothesis to enable the annotation of documents independent of their format (e.g. html, pdf) and location (URL, DOI, etc). But, as a plugin, with unit tests, it is a discrete bit of functionality that I think can be considered for inclusion in Annotator.
Feedback welcome!