Skip to content

Repository files navigation

remarkable-seo

NPM versionDownloadsBuild StatusAppVeyor Build Status

Remarkable plugin adds title attribute on URL and image tags and download attribute on URL if title set to download.

Install

Via npm

npm install remarkable-seo --save-dev

Via Yarn

yarn add remarkable-seo --dev

Usage

import{Remarkable}from'remarkable';importremarkableSeofrom'remarkable-seo';constmd=newRemarkable();consttestString=`Add 'title' attribute on link and image where missing.Links to test Title:* [Example](http://example.com)* [Google](https://google.com)* [Facebook](https://facebook.com "Facebook page")Attached images:1. ![Minion](https://octodex.github.com/images/minion.png)1. ![Manufacturetocat](https://octodex.github.com/images/manufacturetocat.png)1. ![Stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat")`;md.use(remarkableSeo);console.log(md.render(testString));

With CommonJS

const{ Remarkable }=require('remarkable');constremarkableSeo=require('remarkable-seo');constmd=newRemarkable();consttestString=`Add 'title' attribute on link and image where missing.Links to test Title:* [Example](http://example.com)* [Google](https://google.com)* [Facebook](https://facebook.com "Facebook page")* [Download Minion](https://octodex.github.com/images/minion.png "download")Attached images:1. ![Minion](https://octodex.github.com/images/minion.png)1. ![Manufacturetocat](https://octodex.github.com/images/manufacturetocat.png)1. ![Stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat")`;md.use(remarkableSeo);console.log(md.render(testString));

With Docusaurus v1

constremarkableSeo=require('remarkable-seo');constsiteConfig={
...
markdownPlugins: [function(md){remarkableSeo(md);}]...}

About

Add title attribute on URL and image tags for better SEO. Also, add download attribute on URL when title set to download and replaced with the URL text.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages