New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

astro-mastodon

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

astro-mastodon

🐘🚀 Mastodon embeds and mentions for Astro websites

  • 0.3.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-84.62%
Maintainers
1
Weekly downloads
 
Created
Source

Astro Mastodon

Easily embed Mastodon posts into your Astro blog posts.

Example in Dark Mode

Features

  • Works with .md, .mdx and .astro files
  • Embed posts from Mastodon (other ActivityPub embeds are coming!)
  • Embed posts with plain text, images, link cards, videos, embedded YouTube players, gifs, and more!
  • No client-side JavaScript, cards are generated at build time

How to use

Install the package:

pnpm add astro-mastodon

Update your astro.config.mjs file:

// Other imports
import { remarkMastodonEmbed } from "astro-mastodon";

export default defineConfig({
  // ...
  markdown: {
    remarkPlugins: [
      remarkMastodonEmbed,
      // other plugins
    ],
  },
  // ...
});

Add import "astro-mastodon/dist/output.css" at the top of your post template file (e.g. src/pages/blog/[slug]/index.astro)

In your markdown file, add post "mention":

---
title: Embeds FTW!
---

This is an example of an embedded Mastodon post:

`@rosnovsky@lounge.town:109860863149734322`

The anatomy of the embed is as follows:

@username@instance.domain:postId

Development

Clone the repo and run

pnpm i
pnpm dev

Open http://localhost:4321 and have fun!

Screenshots

Example in Light Mode

Example with photos

Example in Light Mode

Keywords

FAQs

Package last updated on 08 Mar 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc