Skip to content

A handler for remark-rehype to show footnotes as sidenotes with rhetorica.css

Notifications You must be signed in to change notification settings

nolze/rehype-rhetorica-sidenotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@rhetorica-css/rehype-sidenotes

A handler for remark-rehype to show footnotes as sidenotes with rhetorica-css.

const report = require('vfile-reporter');

const remark = require('remark');
const remark2rehype = require('remark-rehype');
const html = require('rehype-stringify');

const rhetoricaSidenotes = require('@rhetorica-css/rehype-sidenotes');

remark()
  .data('settings', { footnotes: matter.footnotes === false ? false : true })
  .use(remark2rehype, {
    handlers: {
      footnoteReference: rhetoricaSidenotes,
    },
  })
  .use(html)
  .process(srcFile, function(err, file) {
    console.error(report(err || file));
  });

About

A handler for remark-rehype to show footnotes as sidenotes with rhetorica.css

Resources

Stars

Watchers

Forks

Packages

No packages published