Classes
LinkType
6
βΌ
Semantic relationship types between pages.
Links carry meaning beyond simple connectivity. The typβ¦
LinkType
6
βΌ
Semantic relationship types between pages.
Links carry meaning beyond simple connectivity. The type indicates the editorial intent and discoverability value of the relationship.
Attributes
| Name | Type | Description |
|---|---|---|
EXPLICIT |
β |
Human-authored markdown links text in content |
MENU |
β |
Navigation menu item (deliberate prominence) |
TAXONOMY |
β |
Shared tags/categories (topic clustering) |
RELATED |
β |
Algorithm-computed related posts (automated) |
TOPICAL |
β |
Section hierarchy parent β child (topical context) |
SEQUENTIAL |
β |
Next/prev navigation within section (reading order) |
LinkMetrics
12
βΌ
Detailed link breakdown for a page.
Tracks the count of each link type pointing to a page,
enablinβ¦
LinkMetrics
12
βΌ
Detailed link breakdown for a page.
Tracks the count of each link type pointing to a page, enabling weighted connectivity scoring.
Attributes
| Name | Type | Description |
|---|---|---|
explicit |
int
|
Count of explicit markdown links |
menu |
int
|
Count of menu item references |
taxonomy |
int
|
Count of shared taxonomy links |
related |
int
|
Count of related post links |
topical |
int
|
Count of section hierarchy links (parent β child) |
sequential |
int
|
Count of next/prev navigation links |
Methods
connectivity_score
1
float
βΌ
Calculate weighted connectivity score.
connectivity_score
1
float
βΌ
def connectivity_score(self, weights: dict[LinkType, float] | None = None) -> float
Parameters
| Name | Type | Description |
|---|---|---|
weights |
β |
Optional custom weights. Defaults to DEFAULT_WEIGHTS. Default:None
|
Returns
float
Weighted sum of all link counts. Higher = better connected.
total_links
0
int
βΌ
Total number of incoming links (unweighted).
total_links
0
int
βΌ
def total_links(self) -> int
Returns
int
has_human_links
0
bool
βΌ
True if page has any human-authored links (explicit or menu).
has_human_links
0
bool
βΌ
def has_human_links(self) -> bool
Returns
bool
has_structural_links
0
bool
βΌ
True if page has structural links (section/nav).
has_structural_links
0
bool
βΌ
def has_structural_links(self) -> bool
Returns
bool
has_any_links
0
bool
βΌ
True if page has any incoming links.
has_any_links
0
bool
βΌ
def has_any_links(self) -> bool
Returns
bool
to_dict
0
dict[str, int]
βΌ
Convert to dictionary for serialization.
to_dict
0
dict[str, int]
βΌ
def to_dict(self) -> dict[str, int]
Returns
dict[str, int]
ConnectivityLevel
4
βΌ
Connectivity classification based on weighted score thresholds.
Replaces binary orphan/not-orphan β¦
ConnectivityLevel
4
βΌ
Connectivity classification based on weighted score thresholds.
Replaces binary orphan/not-orphan with nuanced levels that reveal opportunities for improvement.
Levels (from best to worst):
- WELL_CONNECTED: Score >= 2.0 (no action needed)
- ADEQUATELY_LINKED: Score 1.0-2.0 (could improve)
- LIGHTLY_LINKED: Score 0.25-1.0 (should improve)
- ISOLATED: Score < 0.25 (needs attention)
Methods
emoji
0
str
βΌ
Get emoji indicator for this level.
property
emoji
0
str
βΌ
def emoji(self) -> str
Returns
str
label
0
str
βΌ
Get human-readable label for this level.
property
label
0
str
βΌ
def label(self) -> str
Returns
str
description
0
str
βΌ
Get description of what action is needed for this level.
property
description
0
str
βΌ
def description(self) -> str
Returns
str
from_score
2
ConnectivityLevel
βΌ
Classify a page based on its connectivity score.
classmethod
from_score
2
ConnectivityLevel
βΌ
def from_score(cls, score: float, thresholds: dict[str, float] | None = None) -> ConnectivityLevel
Parameters
| Name | Type | Description |
|---|---|---|
score |
β |
Weighted connectivity score from LinkMetrics |
thresholds |
β |
Optional custom thresholds. Defaults to DEFAULT_THRESHOLDS. Default:None
|
Returns
ConnectivityLevel
ConnectivityLevel classification
ConnectivityReport
9
βΌ
Complete connectivity report for a site.
Groups pages by connectivity level and provides distributβ¦
ConnectivityReport
9
βΌ
Complete connectivity report for a site.
Groups pages by connectivity level and provides distribution statistics.
Attributes
| Name | Type | Description |
|---|---|---|
isolated |
list
|
Pages with score < 0.25 |
lightly_linked |
list
|
Pages with score 0.25-1.0 |
adequately_linked |
list
|
Pages with score 1.0-2.0 |
well_connected |
list
|
Pages with score >= 2.0 |
total_pages |
int
|
Total number of pages analyzed |
avg_score |
float
|
Average connectivity score across all pages |
Methods
get_distribution
0
dict[str, int]
βΌ
Get count distribution by level.
get_distribution
0
dict[str, int]
βΌ
def get_distribution(self) -> dict[str, int]
Returns
dict[str, int]
get_percentages
0
dict[str, float]
βΌ
Get percentage distribution by level.
get_percentages
0
dict[str, float]
βΌ
def get_percentages(self) -> dict[str, float]
Returns
dict[str, float]
to_dict
0
dict
βΌ
Convert to dictionary for serialization.
to_dict
0
dict
βΌ
def to_dict(self) -> dict
Returns
dict