{"size": 1458, "ext": "scrbl", "max_stars_repo_path": "private/web-link.scrbl", "max_stars_repo_name": "dys-bigwig/rebellion", "max_stars_repo_stars_event_min_datetime": "2019-05-28T21:50:27.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-17T21:21:52.000Z", "max_issues_repo_path": "private/web-link.scrbl", "max_issues_repo_name": "dys-bigwig/rebellion", "max_issues_repo_issues_event_min_datetime": "2019-03-02T23:19:07.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-24T08:43:16.000Z", "max_forks_repo_path": "private/web-link.scrbl", "max_forks_repo_name": "dys-bigwig/rebellion", "max_forks_repo_forks_event_min_datetime": "2019-02-01T22:21:26.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-24T04:35:35.000Z"}
{"max_stars_count": 73, "max_issues_count": 216, "max_forks_count": 20, "avg_line_length": 33.9069767442, "max_line_length": 79, "alphanum_fraction": 0.6522633745}
#lang scribble/manual

@(require (for-label net/url
                     racket/base
                     racket/contract/base
                     rebellion/web-link)
          (submod rebellion/private/scribble-evaluator-factory doc)
          scribble/example)

@(define make-evaluator
   (make-module-sharing-evaluator-factory
    #:public (list 'rebellion/web-link 'net/url)
    #:private (list 'racket/base)))

@title{Web Links}
@defmodule[rebellion/web-link]

@(define rfc8288 "https://tools.ietf.org/html/rfc8288")

A @deftech{web link} is a relationship between two resources, represented as a
source-relationship-target triple. See @hyperlink[rfc8288]{RFC 8288 - Web
 Linking} for more information on the purpose and uses of links.

@defproc[(web-link? [v any/c]) boolean?]{
 A predicate for @tech{web links}.}

@defproc[(web-link [source (or/c url? string?)]
                   [relation (or/c symbol? url? string?)]
                   [target (or/c url? string?)])
         web-link?]{
 Constructs a @tech{web link} from @racket[source] to @racket[target] with type
 @racket[relation].

 @(examples
   #:eval (make-evaluator) #:once
   (web-link "http://example.org" 'stylesheet "/styles.css"))}

@deftogether[[
 @defproc[(web-link-source [link web-link?]) url?]
 @defproc[(web-link-relation [link web-link?]) (or/c symbol? url?)]
 @defproc[(web-link-target [link web-link?]) url?]]]{
 Accessors for the various components of a @tech{web link}.}
