Ejemplo n.º 1
0
        private LinkCheckerPlugin(ILinksService linksService, ISafeBrowsingService safeBrowsingService)
        {
            _linksService        = linksService;
            _safeBrowsingService = safeBrowsingService;

            Settings = PluginSettingsList.Populate(Name,
                                                   false,
                                                   true,
                                                   new GenericSettingModel("Ensure safe links")
            {
                Description = "Set to true and Preflight will check links for potential malware and bad actors.",
                View        = SettingType.Boolean,
                Value       = "0",
                Order       = 1,
                Core        = true
            },
                                                   new GenericSettingModel("Google SafeBrowsing API key")
            {
                Description = "If set, links will be scanned by the SafeBrowsing API to check for malware and unsafe sites.",
                View        = SettingType.String,
                Value       = "Get your key from the Google API Console",
                Order       = 2,
                Core        = true
            }
                                                   );

            Description = Summary;
        }
Ejemplo n.º 2
0
        private AutoreplacePlugin()
        {
            Settings = PluginSettingsList.Populate(Name,
                                                   false,
                                                   true,
                                                   new GenericSettingModel("Autoreplace terms")
            {
                Description = "Pipe-separated list of terms to auto-replace in preflight checks - eg 'replace me|new text'.",
                View        = SettingType.MultipleTextbox,
                Value       = "replacethis|new term",
                Order       = 1,
                Core        = true
            }
                                                   );

            Description = Summary;
        }
Ejemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 public AutocorrectPlugin()
 {
     Settings = PluginSettingsList.Populate(Name,
                                            false,
                                            true,
                                            settings: new SettingsModel[] {
         new GenericSettingModel("Autocorrect terms")
         {
             Description = "Pipe-separated list of terms to autocorrect in Preflight checks - eg 'replace me|new text'.",
             View        = SettingType.MultipleTextbox,
             Value       = "replacethis|new term",
             Order       = 1,
             Core        = true
         }
     }
                                            );
 }
Ejemplo n.º 4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="readabilityService"></param>
        private ReadabilityPlugin(IReadabilityService readabilityService)
        {
            _readabilityService = readabilityService;

            Settings = PluginSettingsList.Populate(Name,
                                                   false,
                                                   false,
                                                   settings: new SettingsModel[] {
                new GenericSettingModel("Readability target - minimum")
                {
                    Value       = "60",
                    Description = "Readability result must be great than this value",
                    View        = SettingType.Slider,
                    Order       = 1,
                    Core        = true,
                },
                new GenericSettingModel("Readability target - maximum")
                {
                    Value       = "100",
                    Description = "Readability result must be less than this value",
                    View        = SettingType.Slider,
                    Order       = 2,
                    Core        = true,
                },
                new GenericSettingModel("Long word syllable count")
                {
                    Value       = "5",
                    Description =
                        "Words in text will be flagged as long, if their syllable count is equal to or greater than this value",
                    View  = SettingType.Slider,
                    Order = 3,
                    Core  = true,
                }
            }
                                                   );

            Description = @"<p>If your content is too difficult for your visitors to read, you're all going to have a bad time.</p>
                <p>The readability test runs your content through the Flesch reading ease algorithm to determine text complexity.</p>
                <h5>The algorithm</h5>
                <p><code>RE = 206.835 - (1.015 x ASL) - (84.6 x ASW)</code></p>
                <p>Where <code>RE</code> is Readability Ease, <code>ASL</code> is Average Sentence Length, and <code>ASW</code> is Average Syllables per Word</p>
                <p>The result is a number between 0 and 100, where a higher score means better readability, with a score between 60 and 69 largely considered acceptable.</p>
                <h5>Readability test results</h5>
                <p>As well as the Flesch score, the readability test returns sentence length; average syllables per word; and long or complex words.</p>";
        }