Takes ~30 minutes
api_key
If using Svelte, jump straight into Creating a headless blog or download the example blog.
API calls start with https://pullnote.com/pull/note
and require an api_key either as GET parameter, or as a Bearer token in the header, e.g. for Next / Svelte / React / Node.js:
var slug = ""; // Path of the note you want (blank for root)
// Fetch with API_KEY and the path
var res = await fetch("https://pullnote.com/pull/note/" + slug, {
headers: {
"Content-Type": "application/json; charset=utf-8",
"pn_authorization": "Bearer " + YOUR_API_KEY
}
});
// Everything your page needs (e.g. title, HTML, img)
var data = await res.json();
A bunch of data comes back in a JSON object. Your quickest implementation is dump title, content_html and head_html directly into your page. Alternatively, process individual fields to craft your own SEO header or build your HTML exactly as you like it.
{
_id: '65af856d2b551be564ccc4b0',
title: 'Read Articles Aloud using AI Text-to-Speech',
description: 'Use Echowalk to read webpages aloud.',
author: 'James Leeds',
pathname: '/blog/read-articles-aloud-using-ai-text-to-speech',
href: 'https://echowalk.com/blog/read-articles-aloud-using-ai-text-to-speech',
img: {
src: 'http://localhost:5173/img/64ccc4b0_text-to-speech.png',
alt: 'Read Articles Aloud using AI Text-to-Speech'
},
category: {
title: 'Home',
pathname: '/blog/',
href: 'https://echowalk.com/blog/'
},
json_ld: {...},
links: [],
head_html: '<title>...',
content_html: '<h2>...'
}
Once you've got the data, you can push it out onto a page.
Here's an example of how to do this using SvelteKit.