### Example HTTP Link Header Source: https://github.com/coar-notify/coar-notify.net/blob/main/webroot/content/guide/signposting/_index.md An example of an HTTP Link header specifying a 'describedby' relationship for an XML metadata resource. ```http Link: ; rel="describedby" ; type="text/xml" ; profile="http://www.loc.gov/mods/v3" ``` -------------------------------- ### Local Development: Running Hugo Server Source: https://context7.com/coar-notify/coar-notify.net/llms.txt Start a local Hugo development server for the documentation site. Navigate to the webroot directory and run 'hugo server -e development --disableFastRender=true --renderToMemory=true'. The site will be available at http://localhost:1313. ```bash # Navigate to the webroot directory cd webroot # Option 1: Development server (in-memory compilation) hugo server -e development --disableFastRender=true --renderToMemory=true # Site available at http://localhost:1313 ``` -------------------------------- ### Generate Search Index with Pagefind Source: https://github.com/coar-notify/coar-notify.net/blob/main/README.md After compiling the website to static files, run this command to generate the search index using pagefind. Ensure pagefind is installed and replace `` with the correct path. ```bash pagefind --site ``` -------------------------------- ### Example HTML Element Source: https://github.com/coar-notify/coar-notify.net/blob/main/webroot/content/guide/signposting/_index.md An example of an HTML element specifying a 'describedby' relationship for an XML metadata resource. ```html ``` -------------------------------- ### Undo Offer Pattern Example Source: https://context7.com/coar-notify/coar-notify.net/llms.txt Used to retract a previously made Offer, such as a request for review or endorsement. This is a JSON-LD formatted ActivityStreams object. ```json { "@context": [ "https://www.w3.org/ns/activitystreams", "https://coar-notify.net" ], "id": "urn:uuid:5fb56e45-a2cb-4321-8c3f-bd76e2538c96", "type": "Undo", "origin": { "id": "https://research-organisation.org/repository", "type": "Service", "inbox": "https://research-organisation.org/inbox/" }, "target": { "id": "https://overlay-journal.com/system", "type": "Service", "inbox": "https://overlay-journal.com/inbox/" }, "inReplyTo": "urn:uuid:0370c0fb-bb78-4a9b-87f5-bed307a509dd", "object": { "id": "urn:uuid:0370c0fb-bb78-4a9b-87f5-bed307a509dd", "type": ["Offer", "coar-notify:EndorsementAction"] }, "actor": { "id": "https://orcid.org/0000-0002-1825-0097", "name": "Josiah Carberry", "type": "Person" } } ``` -------------------------------- ### Announce Relationship Pattern Example Source: https://context7.com/coar-notify/coar-notify.net/llms.txt Announces a relationship between two resources, such as linking a preprint to its published version. This is a JSON-LD formatted ActivityStreams object. ```json { "@context": [ "https://www.w3.org/ns/activitystreams", "https://coar-notify.net" ], "id": "urn:uuid:94ecae35-dcfd-4182-8550-22c7164fe23f", "type": ["Announce", "coar-notify:RelationshipAction"], "origin": { "id": "https://aggregator-service.org/system", "type": "Service", "inbox": "https://aggregator-service.org/requests/inbox/" }, "target": { "id": "https://research-organisation.org/repository", "type": "Service", "inbox": "https://research-organisation.org/inbox/" }, "object": { "id": "urn:uuid:relationship-object-id", "type": "Relationship", "subject": "https://research-organisation.org/repository/preprint/201203/421/", "relationship": "http://purl.org/vocab/frbr/core#revisionOf", "object": "https://publisher.org/published-article/12345/" }, "actor": { "id": "https://aggregator-service.org/system", "type": "Service" } } ``` -------------------------------- ### TentativeReject Pattern Example Source: https://context7.com/coar-notify/coar-notify.net/llms.txt Indicates a tentative rejection of a request, often used when revisions are needed before resubmission. This is a JSON-LD formatted ActivityStreams object. ```json { "@context": [ "https://www.w3.org/ns/activitystreams", "https://coar-notify.net" ], "id": "urn:uuid:668f26e0-2c8d-4117-a0d2-ee713f3bcdb2", "type": "TentativeReject", "origin": { "id": "https://overlay-journal.com/system", "type": "Service", "inbox": "https://overlay-journal.com/inbox/" }, "target": { "id": "https://research-organisation.org/repository", "type": "Service", "inbox": "https://research-organisation.org/inbox/" }, "inReplyTo": "urn:uuid:0370c0fb-bb78-4a9b-87f5-bed307a509dd", "object": { "id": "urn:uuid:0370c0fb-bb78-4a9b-87f5-bed307a509dd", "type": ["Offer", "coar-notify:EndorsementAction"] }, "actor": { "id": "https://overlay-journal.com/system", "type": "Service" } } ``` -------------------------------- ### Local Development: Building Hugo for Production Source: https://context7.com/coar-notify/coar-notify.net/llms.txt Build static files for a production Hugo deployment. Navigate to the webroot directory and execute 'hugo -e production -d ./public --cleanDestinationDir'. ```bash # Navigate to the webroot directory cd webroot # Option 2: Build static files for production hugo -e production -d ./public --cleanDestinationDir ``` -------------------------------- ### Initialize Pagefind UI Source: https://github.com/coar-notify/coar-notify.net/blob/main/webroot/content/search/index.md Include these HTML and JavaScript snippets to add a search bar to your page. The UI is initialized when the DOM is fully loaded. ```html ``` ```javascript window.addEventListener('DOMContentLoaded', (event) => { new PagefindUI({ element: "#search", showSubResults: true }); }); ``` -------------------------------- ### Initialize Mermaid Diagram Rendering Source: https://github.com/coar-notify/coar-notify.net/blob/main/webroot/themes/coar_notify/layouts/_partials/mermaid_initialisation.html Import and initialize Mermaid for diagram rendering. This code should be included in your project to enable Mermaid functionality. It configures theme and font size. ```javascript import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs'; mermaid.initialize({ startOnLoad: true, theme: 'base', themeVariables: { fontSize: '48px', primaryColor: '#efefef', // mainBkg: '#ffffff', primaryBorderColor: '#000000', // mainBkg: 'rgb(145,198,239)' }, }); ``` -------------------------------- ### Serve COAR Notify Website Locally with Hugo Source: https://github.com/coar-notify/coar-notify.net/blob/main/README.md Use this command to compile and serve the website from memory for development and testing. Reload the browser page manually after making changes. ```bash hugo server -e development --disableFastRender=true --renderToMemory=true ``` -------------------------------- ### Compile COAR Notify Website to Static Files with Hugo Source: https://github.com/coar-notify/coar-notify.net/blob/main/README.md Use this command to compile the website into static HTML files. Replace `` with your desired output directory. ```bash -e production -d --cleanDestinationDir ``` -------------------------------- ### Request Endorsement Pattern JSON Source: https://context7.com/coar-notify/coar-notify.net/llms.txt Use this pattern to request an endorsement of a repository resource from an endorsement service. It follows the same structure as review requests but uses `EndorsementAction` type. ```json { "@context": [ "https://www.w3.org/ns/activitystreams", "https://coar-notify.net" ], "id": "urn:uuid:0370c0fb-bb78-4a9b-87f5-bed307a509dd", "type": ["Offer", "coar-notify:EndorsementAction"], "origin": { "id": "https://research-organisation.org/repository", "type": "Service", "inbox": "https://research-organisation.org/inbox/" }, "target": { "id": "https://overlay-journal.com/system", "type": "Service", "inbox": "https://overlay-journal.com/inbox/" }, "object": { "id": "https://research-organisation.org/repository/preprint/201203/421/", "type": ["Page", "sorg:AboutPage"], "ietf:cite-as": "https://doi.org/10.5555/12345680", "ietf:item": { "id": "https://research-organisation.org/repository/preprint/201203/421/content.pdf", "type": ["Article", "sorg:ScholarlyArticle"], "mediaType": "application/pdf" } }, "actor": { "id": "mailto:josiah.carberry@example.com", "name": "Josiah Carberry", "type": "Person" } } ``` -------------------------------- ### Multiple HTTP Link Headers Source: https://github.com/coar-notify/coar-notify.net/blob/main/webroot/content/guide/signposting/_index.md When multiple Signpost links are needed, repeat the HTTP Link header for each link. ```http Link: ; rel="relation-text-1" ; type="link-relation-type-1" ; profile="profile-url-1" Link: ; rel="relation-text-2" ; type="link-relation-type-2" ; profile="profile-url-2" ... Link: ; rel="relation-text-n" ; type="link-relation-type-n" ; profile="profile-url-n" ``` -------------------------------- ### Announce Review Pattern JSON Source: https://context7.com/coar-notify/coar-notify.net/llms.txt Use this pattern to announce the existence of a published review. The `object` contains the review resource, and `context` references the resource that was reviewed. ```json { "@context": [ "https://www.w3.org/ns/activitystreams", "https://coar-notify.net" ], "id": "urn:uuid:94ecae35-dcfd-4182-8550-22c7164fe23f", "type": ["Announce", "coar-notify:ReviewAction"], "origin": { "id": "https://review-service.com/system", "type": "Service", "inbox": "https://review-service.com/inbox/" }, "target": { "id": "https://research-organisation.org/repository", "type": "Service", "inbox": "https://research-organisation.org/inbox/" }, "object": { "id": "https://review-service.com/reviews/review-12345", "type": ["Page", "sorg:WebPage"], "ietf:cite-as": "https://doi.org/10.xxxxx/review-12345" }, "context": { "id": "https://research-organisation.org/repository/preprint/201203/421/", "type": ["Page", "sorg:AboutPage"], "ietf:cite-as": "https://doi.org/10.5555/12345680" }, "actor": { "id": "https://review-service.com/system", "type": "Service" } } ``` -------------------------------- ### Accept Pattern Source: https://context7.com/coar-notify/coar-notify.net/llms.txt This pattern acknowledges and accepts a previous request (Offer). It indicates the target intends to act on the request but does not imply any specific outcome. Requires 'inReplyTo' to link to the original Offer. ```json { "@context": [ "https://www.w3.org/ns/activitystreams", "https://coar-notify.net" ], "id": "urn:uuid:668f26e0-2c8d-4117-a0d2-ee713f3bcdb2", "type": "Accept", "origin": { "id": "https://overlay-journal.com/system", "type": "Service", "inbox": "https://overlay-journal.com/inbox/" }, "target": { "id": "https://research-organisation.org/repository", "type": "Service", "inbox": "https://research-organisation.org/inbox/" }, "inReplyTo": "urn:uuid:0370c0fb-bb78-4a9b-87f5-bed307a509dd", "object": { "actor": { "id": "https://orcid.org/0000-0002-1825-0097", "name": "Josiah Carberry", "type": "Person" }, "id": "urn:uuid:0370c0fb-bb78-4a9b-87f5-bed307a509dd", "object": { "id": "https://research-organisation.org/repository/preprint/201203/421/", "ietf:cite-as": "https://doi.org/10.5555/12345680", "type": "sorg:AboutPage" }, "origin": { "id": "https://research-organisation.org/repository", "inbox": "https://research-organisation.org/inbox/", "type": "Service" }, "target": { "id": "https://overlay-journal.com/system", "inbox": "https://overlay-journal.com/inbox/", "type": "Service" }, "type": ["Offer", "coar-notify:EndorsementAction"] }, "actor": { "id": "https://overlay-journal.com/system", "type": "Service" } } ``` -------------------------------- ### Python Library: Create and Send RequestReview Notification Source: https://context7.com/coar-notify/coar-notify.net/llms.txt Use the coarnotifypy library to create and send a RequestReview notification. Instantiate COARNotifyClient with the inbox URL and then create a RequestReview object with the necessary details. ```python from coarnotify import COARNotifyClient, RequestReview # Create a client client = COARNotifyClient(inbox_url="https://review-service.com/inbox/") # Create a review request notification notification = RequestReview( id="urn:uuid:0370c0fb-bb78-4a9b-87f5-bed307a509dd", origin={ "id": "https://research-organisation.org/repository", "type": "Service", "inbox": "https://research-organisation.org/inbox/" }, target={ "id": "https://review-service.com/system", "type": "Service", "inbox": "https://review-service.com/inbox/" }, object={ "id": "https://research-organisation.org/repository/preprint/201203/421/", "type": ["Page", "sorg:AboutPage"], "ietf:cite-as": "https://doi.org/10.5555/12345680" }, actor={ "id": "https://orcid.org/0000-0002-1825-0097", "name": "Josiah Carberry", "type": "Person" } ) # Send the notification response = client.send(notification) ``` -------------------------------- ### Announce Endorsement Pattern Source: https://context7.com/coar-notify/coar-notify.net/llms.txt Use this pattern to announce an endorsement of a scholarly resource by an overlay journal or PCI. The endorsement object references the endorsed resource via 'context'. ```json { "@context": [ "https://www.w3.org/ns/activitystreams", "https://coar-notify.net" ], "id": "urn:uuid:94ecae35-dcfd-4182-8550-22c7164fe23f", "type": ["Announce", "coar-notify:EndorsementAction"], "origin": { "id": "https://evolbiol.peercommunityin.org/coar_notify/", "type": "Service", "inbox": "https://evolbiol.peercommunityin.org/coar_notify/inbox/" }, "target": { "id": "https://research-organisation.org/repository", "type": "Service", "inbox": "https://research-organisation.org/inbox/" }, "object": { "id": "https://evolbiol.peercommunityin.org/articles/rec?articleId=794", "type": ["Page", "sorg:WebPage"], "ietf:cite-as": "https://doi.org/10.24072/pci.evolbiol.100794" }, "context": { "id": "https://research-organisation.org/repository/preprint/201203/421/", "type": ["Page", "sorg:AboutPage"], "ietf:cite-as": "https://doi.org/10.5555/12345680" }, "actor": { "id": "https://evolbiol.peercommunityin.org/coar_notify/", "type": "Service" } } ``` -------------------------------- ### HTTP Link Header Format Source: https://github.com/coar-notify/coar-notify.net/blob/main/webroot/content/guide/signposting/_index.md Use this format for HTTP Link headers to describe relationships between resources. Ensure correct syntax for target URL, relation type, media type, and profile. ```http Link: ; rel="relation-text" ; type="link-relation-type" ; profile="profile-url" ``` -------------------------------- ### Request Review Pattern JSON Source: https://context7.com/coar-notify/coar-notify.net/llms.txt Use this pattern to request a review of a scholarly resource from a peer review service. It identifies the resource to be reviewed and optionally includes actor information. ```json { "@context": [ "https://www.w3.org/ns/activitystreams", "https://coar-notify.net" ], "id": "urn:uuid:0370c0fb-bb78-4a9b-87f5-bed307a509dd", "type": ["Offer", "coar-notify:ReviewAction"], "origin": { "id": "https://research-organisation.org/repository", "type": "Service", "inbox": "https://research-organisation.org/inbox/" }, "target": { "id": "https://review-service.com/system", "type": "Service", "inbox": "https://review-service.com/inbox/" }, "object": { "id": "https://research-organisation.org/repository/preprint/201203/421/", "type": ["Page", "sorg:AboutPage"], "ietf:cite-as": "https://doi.org/10.5555/12345680", "ietf:item": { "id": "https://research-organisation.org/repository/preprint/201203/421/content.pdf", "type": ["Article", "sorg:ScholarlyArticle"], "mediaType": "application/pdf" } }, "actor": { "id": "https://orcid.org/0000-0002-1825-0097", "name": "Josiah Carberry", "type": "Person" } } ``` -------------------------------- ### Discover Inbox via HTTP HEAD Source: https://context7.com/coar-notify/coar-notify.net/llms.txt Use an HTTP HEAD request to discover the LDN inbox URL. Expected response headers include a Link header with rel="http://www.w3.org/ns/ldp#inbox". ```bash curl -I https://research-organisation.org/repository/preprint/201203/421/ ``` -------------------------------- ### Multiple HTML Elements Source: https://github.com/coar-notify/coar-notify.net/blob/main/webroot/content/guide/signposting/_index.md When multiple Signpost links are needed, repeat the HTML element for each link. ```html ... ``` -------------------------------- ### Reject Pattern Source: https://context7.com/coar-notify/coar-notify.net/llms.txt This pattern acknowledges and rejects a previous request (Offer). The target will take no further action on the request. Requires 'inReplyTo' to link to the original Offer. ```json { "@context": [ "https://www.w3.org/ns/activitystreams", "https://coar-notify.net" ], "id": "urn:uuid:668f26e0-2c8d-4117-a0d2-ee713f3bcdb2", "type": "Reject", "origin": { "id": "https://overlay-journal.com/system", "type": "Service", "inbox": "https://overlay-journal.com/inbox/" }, "target": { "id": "https://research-organisation.org/repository", "type": "Service", "inbox": "https://research-organisation.org/inbox/" }, "inReplyTo": "urn:uuid:0370c0fb-bb78-4a9b-87f5-bed307a509dd", "object": { "id": "urn:uuid:0370c0fb-bb78-4a9b-87f5-bed307a509dd", "type": ["Offer", "coar-notify:EndorsementAction"] }, "actor": { "id": "https://overlay-journal.com/system", "type": "Service" } } ``` -------------------------------- ### JavaScript Library: Create and Send RequestEndorsement Notification Source: https://context7.com/coar-notify/coar-notify.net/llms.txt Utilize the coarnotifyjs library to construct and dispatch a RequestEndorsement notification. Initialize COARNotifyClient with the inbox URL and then instantiate a RequestEndorsement object with the required parameters. ```javascript import { COARNotifyClient, RequestEndorsement } from 'coarnotifyjs'; // Create a client const client = new COARNotifyClient({ inboxUrl: 'https://overlay-journal.com/inbox/' }); // Create an endorsement request const notification = new RequestEndorsement({ id: 'urn:uuid:0370c0fb-bb78-4a9b-87f5-bed307a509dd', origin: { id: 'https://research-organisation.org/repository', type: 'Service', inbox: 'https://research-organisation.org/inbox/' }, target: { id: 'https://overlay-journal.com/system', type: 'Service', inbox: 'https://overlay-journal.com/inbox/' }, object: { id: 'https://research-organisation.org/repository/preprint/201203/421/', type: ['Page', 'sorg:AboutPage'], 'ietf:cite-as': 'https://doi.org/10.5555/12345680' }, actor: { id: 'https://orcid.org/0000-0002-1825-0097', name: 'Josiah Carberry', type: 'Person' } }); // Send the notification const response = await client.send(notification); ``` -------------------------------- ### Process and Validate Payload in COAR Notify Source: https://github.com/coar-notify/coar-notify.net/blob/main/webroot/themes/coar_notify/layouts/_partials/payload/build_pattern_payload.html This snippet demonstrates the main workflow for building, processing, and validating a payload. It retrieves resources, merges base payloads with processed properties, and applies versioning. Ensure all partial functions are correctly defined and accessible. ```Go Template {{ $inputPayload := .Resources.Get "payload.yaml" | transform.Unmarshal }} {{ $mergedPayload := partial "payload/build_base_payload" . }} {{ $version := partial "versioning/function_get_version" . }} {{ range $k, $v := $inputPayload }} {{ $mergedPayload = merge $mergedPayload (partial "payload/process_property" (dict "version" $version "label" $k "value" $v)) }} {{ end }} {{ partial "payload/validate_payload" (dict "payload" $mergedPayload "specificationVersion" $version) }} {{ return $mergedPayload }} ``` -------------------------------- ### HTML Element Format Source: https://github.com/coar-notify/coar-notify.net/blob/main/webroot/content/guide/signposting/_index.md Use this format for HTML elements within the of an HTML response to describe relationships. ```html ``` -------------------------------- ### TentativeAccept Pattern Source: https://context7.com/coar-notify/coar-notify.net/llms.txt This pattern indicates tentative acceptance of a request. The target currently intends to act on it, but this may change. Requires 'inReplyTo' to link to the original Offer. ```json { "@context": [ "https://www.w3.org/ns/activitystreams", "https://coar-notify.net" ], "id": "urn:uuid:668f26e0-2c8d-4117-a0d2-ee713f3bcdb2", "type": "TentativeAccept", "origin": { "id": "https://overlay-journal.com/system", "type": "Service", "inbox": "https://overlay-journal.com/inbox/" }, "target": { "id": "https://research-organisation.org/repository", "type": "Service", "inbox": "https://research-organisation.org/inbox/" }, "inReplyTo": "urn:uuid:0370c0fb-bb78-4a9b-87f5-bed307a509dd", "object": { "id": "urn:uuid:0370c0fb-bb78-4a9b-87f5-bed307a509dd", "type": ["Offer", "coar-notify:EndorsementAction"] }, "actor": { "id": "https://overlay-journal.com/system", "type": "Service" } } ``` -------------------------------- ### Grouped HTTP Link Headers Source: https://github.com/coar-notify/coar-notify.net/blob/main/webroot/content/guide/signposting/_index.md Alternatively, multiple Signpost links can be grouped into a single HTTP Link header using a comma-separated list. ```http Link: ; rel="relation-text-1" ; type="link-relation-type-1" ; profile="profile-url-1", ; rel="relation-text-2" ; type="link-relation-type-2" ; profile="profile-url-2", ; rel="relation-text-n" ; type="link-relation-type-n" ; profile="profile-url-n" ```