{"id":19692156,"url":"https://github.com/getgrav/grav-plugin-smartypants","last_synced_at":"2025-06-17T09:32:12.145Z","repository":{"id":22992597,"uuid":"26343064","full_name":"getgrav/grav-plugin-smartypants","owner":"getgrav","description":"Grav Smartypants Plugin","archived":false,"fork":false,"pushed_at":"2022-07-09T01:29:48.000Z","size":70,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2025-06-10T19:44:20.034Z","etag":null,"topics":["grav","grav-plugin","smartypants"],"latest_commit_sha":null,"homepage":"http://getgrav.org","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getgrav.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-07T23:36:50.000Z","updated_at":"2022-07-09T01:29:51.000Z","dependencies_parsed_at":"2022-07-14T19:30:37.710Z","dependency_job_id":null,"html_url":"https://github.com/getgrav/grav-plugin-smartypants","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/getgrav/grav-plugin-smartypants","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getgrav%2Fgrav-plugin-smartypants","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getgrav%2Fgrav-plugin-smartypants/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getgrav%2Fgrav-plugin-smartypants/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getgrav%2Fgrav-plugin-smartypants/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getgrav","download_url":"https://codeload.github.com/getgrav/grav-plugin-smartypants/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getgrav%2Fgrav-plugin-smartypants/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259931189,"owners_count":22933733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grav","grav-plugin","smartypants"],"created_at":"2024-11-11T19:12:28.348Z","updated_at":"2025-06-17T09:32:12.105Z","avatar_url":"https://github.com/getgrav.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grav Smartypants Plugin\n\n`Smartypants` is a [Grav](http://github.com/getgrav/grav) v0.9.5+ plugin that adds SmartyPants. SmartyPants is a typography prettifyier tool for web writers. It easily translates plain ASCII punctuation characters into \"smart\" typographic punctuation HTML entities. The Grav plugin for SmartyPants provides the ability to prettify **page titles**, **page content**, and also provides a `smartypants` twig filter.\n\n# Installation\n\nInstalling the Smartypants plugin can be done in one of two ways. Our GPM (Grav Package Manager) installation method enables you to quickly and easily install the plugin with a simple terminal command, while the manual method enables you to do so via a zip file. \n\n## GPM Installation (Preferred)\n\n![Smartypants](assets/readme_1.png)\n\nThe simplest way to install this plugin is via the [Grav Package Manager (GPM)](http://learn.getgrav.org/advanced/grav-gpm) through your system's Terminal (also called the command line).  From the root of your Grav install type:\n\n    bin/gpm install smartypants\n\nThis will install the Smartypants plugin into your `/user/plugins` directory within Grav. Its files can be found under `/your/site/grav/user/plugins/smartypants`.\n\n## Manual Installation\n\nTo install this plugin, just download the zip version of this repository and unzip it under `/your/site/grav/user/plugins`. Then, rename the folder to `smartypants`. You can find these files either on [GitHub](https://github.com/getgrav/grav-plugin-smartypants) or via [GetGrav.org](http://getgrav.org/downloads/plugins#extras).\n\nYou should now have all the plugin files under\n\n    /your/site/grav/user/plugins/smartypants\n\n\n# Usage\n\nThe `smartypants` plugin comes with some sensible default configuration, that are pretty self explanatory:\n\n# Options\n\n    enabled: true           // Enables or Disables the entire plugin for all pages.\n    twig_filter: true       // Enables or Disables the twig filter\n    process_title: false    // Enables or Disables processing on page titles\n    process_content: true   // Enables or Disables processing on page contents\n    options: qDew           // Smartypants-specific configuration options\n\nThe options are described in detail on the [PHP SmartyPants GitHub Site](https://github.com/michelf/php-smartypants): https://github.com/michelf/php-smartypants\n\nYou can override SmartyPants' default quotes (e.g. for other language styles like „German“):\n\n    dq_open:  \u0026#8220;      // Custom HTML string for double quote open\n    dq_close: \u0026#8221;      // Custom HTML string for double quote close\n    sq_open:  \u0026#8216;      // Custom HTML string for single quote open\n    sq_close: \u0026#8217;      // Custom HTML string for single quote close\n\nTo customize the plugin, you first need to create an override config. To do so, create the folder `user/config/plugins` (if it doesn't exist already) and copy the [smartypants.yaml](smartypants.yaml) config file in there and then make your edits.\n\nAlso you can override the default options per-page:\n\n    ---\n    title: 'My \"Page\"'\n    smartypants:\n        process_title: true\n        process_content: true\n        options: qd\n    ---\n\n    # \"Lorem ipsum dolor sit amet\"\n\nThere are two main scenarios:\n\n1. **Disabled** by default by setting `process_content: false` in your `user/config/plugins/smartypants.yaml` then enable per page with `smartypants: process_content: true` in your page headers.\n2. **Enabled** by default by setting `process_content: true` in your `user/config/plugins/smartypants.yaml` then disable per page with `smartypants: process_content: false` in your page headers.\n\n# Twig Filter\n\nThere is now a Twig filter that you can use to process SmartyPants dynamically on any string when working with Twig:\n\n```\n{{ page.header.custom|smartypants }}\n```\n\nYou can also pass custom SmartyPants options:\n\n```\n{{ page.header.custom|smartypants('qew') }}\n```\n\n# Compatibility Notice\n\n\u003e If Smartypants is **enabled** for a page that has `cache_enabled: false` and `twig: process: true`, the markdown will process and run events before Twig, causing single quotes to get converted and cause a conflict with the Twig processing. This will result in Twig erroring out.\n\n# Updating\n\nAs development for the Smartypants plugin continues, new versions may become available that add additional features and functionality, improve compatibility with newer Grav releases, and generally provide a better user experience. Updating Smartypants is easy, and can be done through Grav's GPM system, as well as manually.\n\n## GPM Update (Preferred)\n\nThe simplest way to update this plugin is via the [Grav Package Manager (GPM)](http://learn.getgrav.org/advanced/grav-gpm). You can do this with this by navigating to the root directory of your Grav install using your system's Terminal (also called command line) and typing the following:\n\n    bin/gpm update smartypants\n\nThis command will check your Grav install to see if your Smartypants plugin is due for an update. If a newer release is found, you will be asked whether or not you wish to update. To continue, type `y` and hit enter. The plugin will automatically update and clear Grav's cache.\n\n## Manual Update\n\nManually updating Smartypants is pretty simple. Here is what you will need to do to get this done:\n\n* Delete the `your/site/user/plugins/smartypants` directory.\n* Downalod the new version of the Smartypants plugin from either [GitHub](https://github.com/getgrav/grav-plugin-smartypants) or [GetGrav.org](http://getgrav.org/downloads/plugins#extras).\n* Unzip the zip file in `your/site/user/plugins` and rename the resulting folder to `smartypants`.\n* Clear the Grav cache. The simplest way to do this is by going to the root Grav directory in terminal and typing `bin/grav clear-cache`.\n\n\u003e Note: Any changes you have made to any of the files listed under this directory will also be removed and replaced by the new set. Any files located elsewhere (for example a YAML settings file placed in `user/config/plugins`) will remain intact.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetgrav%2Fgrav-plugin-smartypants","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetgrav%2Fgrav-plugin-smartypants","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetgrav%2Fgrav-plugin-smartypants/lists"}