Fichier de tests du plugin add_icons

%SEE_SOURCE%

Ce plugin de type page va scanner les liens qui se trouvent dans la note et selon des règles type expression régulière va permettre l’ajout d’une icône devient les liens.

Exemple


Paramétrage

La position de l’icône peut être placée devant (before) ou derrière (after).

    "plugins": {
        "options": {
            "page": {
                "add_icons": {
                    "position": "after",
                    "regex": [
                        {
                            "pattern": "(facebook\\.com)",
                            "icon": "fa fa-facebook-official"
                        },
                        {
                            "pattern": "(github\\.com)",
                            "icon": "fa fa-github"
                        },
                        {
                            "pattern": "(joomla)",
                            "icon": "fa fa-joomla"
                        },
                        {
                            "pattern": "(slideshare\\.)",
                            "icon": "fa fa-slideshare"
                        },
                        {
                            "pattern": "(twitter\\.)",
                            "icon": "fa fa-twitter"
                        },
                        {
                            "pattern": "(youtube\\.)",
                            "icon": "fa fa-youtube"
                        },
                        {
                            "pattern": "\\.(7z|gzip|tar|zip)",
                            "icon": "fa fa-file-archive-o"
                        },
                        {
                            "pattern": "(\\.docx?)",
                            "icon": "fa fa-file-word-o"
                        },
                        {
                            "pattern": "(\\.pdf)",
                            "icon": "fa fa-file-pdf-o"
                        },
                        {
                            "pattern": "(\\.pptx?)",
                            "icon": "fa fa-file-powerpoint-o"
                        },
                        {
                            "pattern": "(\\.(xlsx?|xlam))",
                            "icon": "fa fa-file-excel-o"
                        }
                    ]
                }
            }
        }      
    }