14 articles

SDK & Export API

Render your RankHiker articles on any site with the @rankhiker/sdk package: React, Vue, Next.js, and vanilla JS.

01
Quick Start
What the SDK is, the three entry points, install, getting a key, and your first fetch.
02
API Keys and Authentication
Generate keys, account-scoping across workspaces, read-only access, CORS, and security.
03
Client Configuration
Every createClient option: baseUrl, custom fetch, and requestInit for Next.js caching.
04
Client API Reference
listArticles, listArticlesRaw, getArticleBySlug, getArticleById, and the low-level request.
05
Filtering, Workspaces and Sync
Filter by workspaceId and status, limit results, and run incremental sync with since.
06
Data Types and Article Shape
Field-by-field reference for article summaries, full articles, and response envelopes.
07
Error Handling
RankHikerError fields, the 404-to-null behavior, and handling 401, 5xx, and network errors.
08
Debugging and Logging
Opt-in debug logging, the structured logger callback and RankHikerLogEvent shape, lifecycle hooks, url on errors, and the API-key safety guarantee.
09
React Integration
Provider, useArticles and useArticle, BlogList and BlogPost, and a full client-side blog.
10
Vue 3 Integration
Plugin and provideRankHiker, reactive composables, components, slots, and a full SFC blog.
11
Next.js Integration
Server Components, ISR and no-store caching, generateStaticParams, and generateMetadata.
12
Vanilla JS and Other Frameworks
Use the core client with plain DOM, ESM and CommonJS, and Astro frontmatter.
13
Styling Guide
The data-rankhiker hooks, an example stylesheet, class props, and full markup overrides.
14
Guide: Build a Full Blog
An end-to-end recipe: shared client, list and detail pages, workspace scoping, and caching.