|
- import type { AnnotationSourceDescriptor } from '../storage/AnnotationSource';
- import { discoverAnnotationFeeds, discoverEmbeddedAnnotations } from '../discovery';
- import { WebAnnotation } from 'web-annotation-utils';
-
- export function discoverAnnotationsEmbeddedAsJSONLD(): WebAnnotation[] {
- // TODO data validation
- return discoverEmbeddedAnnotations() as WebAnnotation[];
- };
-
- // Find any link like this: <link rel="alternate" type='application/ld+json;profile="http://www.w3.org/ns/anno.jsonld"'>
- export function discoverAnnotationSources(
- ): AnnotationSourceDescriptor[] {
- return discoverAnnotationFeeds().map(({ url, title }) => ({
- url,
- title,
- type: 'container',
- }));
- }
|