Skip to content

Latest commit

 

History

History
59 lines (45 loc) · 1.1 KB

text.md

File metadata and controls

59 lines (45 loc) · 1.1 KB

Reporting and linting with retext

The default reporter used is vfile-reporter.

eleventyConfig.addPlugin(EleventyUnifiedPlugin, {
  textTransforms: ["retext-repeated-words"],
});

Configuring the reporter

npm install eleventy-plugin-unified retext-repeated-words vfile-reporter
eleventyConfig.addPlugin(EleventyUnifiedPlugin, {
  reporter: "vfile-reporter-json",
  textTransforms: ["retext-repeated-words"],
});

or

eleventyConfig.addPlugin(EleventyUnifiedPlugin, {
  reporter: (file) => {
    console.log(file);
  },
  textTransforms: ["retext-repeated-words"],
});

Turning off default reporter

npm install eleventy-plugin-unified retext-latin
eleventyConfig.addPlugin(EleventyUnifiedPlugin, {
  reporter: false,
  textTransforms: ["retext-repeated-words"],
});

Configuring text parser language

npm install eleventy-plugin-unified retext-latin
eleventyConfig.addPlugin(EleventyUnifiedPlugin, {
  textParser: "retext-latin",
});