Skip to content

fsegurai/marked-extensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Marked Extensions Logo

Build Main Status Latest Release
GitHub contributors Dependency status for repo GitHub License
Stars Forks

A library of custom extensions for Marked.js

@fsegurai/marked-extensions is a collection of custom extensions for Marked.js, making it more powerful and versatile.


Table of contents

Installation

Import the desired extension from the available list and apply it to your Marked instance as shown below.

Usage

Basic Usage

import {marked} from "marked";
import markedExtendedTables from "@fsegurai/marked-extended-tables";

// or UMD script
// <script src="https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js"></script>
// <script src="https://cdn.jsdelivr.net/npm/@fsegurai/marked-extended-tables/lib/index.umd.js"></script>

marked.use(markedExtendedTables());

const exampleMarkdown = `
| H1      | H2      | H3      |
|---------|---------|---------|
| This cell spans 3 columns |||
`;

marked.parse(exampleMarkdown);

Available Extensions

Extension Package Version Description
All - Bundle @fsegurai/marked-extended-bundle npm Includes all extensions in a single package for easy integration
Accordion @fsegurai/marked-extended-accordion npm Add collapsible accordion sections to your markdown
Alert @fsegurai/marked-extended-alert npm Create styled alert boxes for important information
Comments @fsegurai/marked-extended-comments npm Add comment sections with author and timestamp metadata
Embeds @fsegurai/marked-extended-embeds npm Easily embed content from various platforms (YouTube, Twitter, etc.)
Footnote @fsegurai/marked-extended-footnote npm Add footnotes with automatic numbering
Kanban @fsegurai/marked-extended-kanban npm Create kanban boards with customizable columns and cards
Lists @fsegurai/marked-extended-lists npm Enhanced list formatting options
Slide @fsegurai/marked-extended-slide npm Create slide decks directly from markdown content
Spoiler @fsegurai/marked-extended-spoiler npm Hide content behind spoiler tags
Tables @fsegurai/marked-extended-tables npm Advanced table formatting with cell spanning
Tabs @fsegurai/marked-extended-tabs npm Create tabbed content sections
Timeline @fsegurai/marked-extended-timeline npm Display content in an interactive timeline format
Typographic @fsegurai/marked-extended-typographic npm Improve typography with smart quotes, dashes, and more

Demo Application

To see all extensions in action, check out the [DEMO].

Local Development

I highly recommend using "bun" to manage the project dependencies.

To set up the demo locally, follow the next steps:

git clone https://github.com/fsegurai/marked-extensions.git
bun install
bun start

This will serve the application locally at http://[::1]:8000.

Semantic Versioning

The expected commits format follows the Conventional Commits specification. Example:

  • feat: add new markdown extension for spoilers
  • fix: resolve issue with user profile update
  • docs: update API documentation
  • style: format code according to new style guide
  • refactor: simplify user authentication logic
  • test: add or fix unit tests for user registration
  • chore: update build process or dependencies
  • perf: improve database query performance

License

Licensed under MIT.