A markdown link extracted from a concept or reserved document body.
Internal links resolve to concept IDs (paths without .md) and become
directed edges in ExOKF.Graph. External links keep their original URL and
are treated as citations or outbound references rather than graph edges.
Fields
| Field | Type | Description |
|---|---|---|
text | String.t() | Visible link text, e.g. "customers". |
target | String.t() | Raw href as written in markdown, e.g. "/tables/customers.md". |
kind | kind/0 | Classification of the target (see below). |
concept_id | String.t() | nil | Resolved concept id when kind is :internal; otherwise nil. |
source_path | String.t() | nil | Bundle-relative path of the file containing the link, e.g. "tables/orders.md". |
Examples
%ExOKF.Link{
text: "customers",
target: "/tables/customers.md",
kind: :internal,
concept_id: "tables/customers",
source_path: "tables/orders.md"
}
%ExOKF.Link{
text: "BigQuery console",
target: "https://console.cloud.google.com/bigquery",
kind: :external,
concept_id: nil,
source_path: "tables/orders.md"
}
Summary
Functions
Returns true when the link points at another concept in the bundle.
Types
@type kind() :: :internal | :external | :anchor | :other
How a link target is classified.
:internal— points at another concept in the bundle (absolute/…or relative path):external— absolute URI with a scheme (https:,mailto:, …):anchor— in-document fragment only (#section):other— directory links, non-markdown assets, or unresolved paths
@type t() :: %ExOKF.Link{ concept_id: String.t() | nil, kind: kind(), source_path: String.t() | nil, target: String.t(), text: String.t() }
An extracted markdown link.
See the module documentation for field meanings and realistic examples.
Functions
Returns true when the link points at another concept in the bundle.
Parameters
link(t/0) — link to inspect
Examples
iex> ExOKF.Link.internal?(%ExOKF.Link{text: "c", target: "/c.md", kind: :internal, concept_id: "c"})
true
iex> ExOKF.Link.internal?(%ExOKF.Link{text: "docs", target: "https://example.com", kind: :external})
false