
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
astro-loader-hashnode
Advanced tools
Astro content loader for seamlessly integrating Hashnode blog posts into your Astro website using the Content Layer API
Astro content loader for seamlessly integrating Hashnode blog posts into your Astro website using the Content Layer API.
npm install astro-loader-hashnode
# or
pnpm add astro-loader-hashnode
# or
yarn add astro-loader-hashnode
// src/content.config.ts
import { defineCollection } from 'astro:content';
import { hashnodeLoader } from 'astro-loader-hashnode';
export const collections = {
blog: defineCollection({
loader: hashnodeLoader({
publicationHost: 'your-blog.hashnode.dev',
}),
}),
};
rendered.html
so you can use Astro's render(entry)
APIpinnedToBlog
and isDelisted
Visit our documentation for detailed usage instructions and examples.
Astro can render an entry via render(entry)
. Because the loader now supplies a rendered
field (HTML + metadata), you
can also directly set HTML:
---
import { getEntry } from 'astro:content';
const post = await getEntry('blog', 'my-post-slug');
const { data, render } = post;
// Option 1: use pre-rendered HTML
const html = data.content.html;
// Option 2: let Astro render (works if markdown available)
const rendered = await render();
---
<article set:html={html} />
Some extra post preference flags are included when present on Hashnode:
data.preferences?.pinnedToBlog; // boolean | undefined
data.preferences?.isDelisted; // boolean | undefined
Each stored entry includes a digest used internally to skip unchanged items on subsequent loads, improving build performance.
MIT © Mrugesh Mohapatra
FAQs
Astro content loader for seamlessly integrating Hashnode blog posts into your Astro website using the Content Layer API
We found that astro-loader-hashnode demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.