All Projects → manifestuk → smartdown.craft-plugin

manifestuk / smartdown.craft-plugin

Licence: MIT license
Bringing the unbridled joy of Markdown Extra and Smartypants to your Craft websites.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to smartdown.craft-plugin

craft-entry-instructions
A simple fieldtype to add instructions.
Stars: ✭ 16 (-38.46%)
Mutual labels:  craft, craftcms, craft-plugin, craftcms-plugin
overflow.craft-plugin
A plain text Craft field type, with a soft or hard character limit.
Stars: ✭ 13 (-50%)
Mutual labels:  craft, craftcms, craft-plugin, craftcms-plugin
craft-json-snippets
Helps make CraftCMS models in .json
Stars: ✭ 17 (-34.62%)
Mutual labels:  craft, craftcms, craft-plugin, craftcms-plugin
craft-audit
Audit log for Craft 3
Stars: ✭ 18 (-30.77%)
Mutual labels:  craft, craftcms, craft-plugin, craftcms-plugin
craft-entriessubset
Craft field type plugin that extends the core Entries field type to give extra settings
Stars: ✭ 27 (+3.85%)
Mutual labels:  craft, craftcms, craft-plugin, craftcms-plugin
tablemaker
A user-definable table field type for Craft CMS
Stars: ✭ 39 (+50%)
Mutual labels:  craft, craftcms, craft-plugin, craftcms-plugin
Craft Preparse Field
Field type that parses twig when an element is saved.
Stars: ✭ 103 (+296.15%)
Mutual labels:  craft, craftcms, craft-plugin
visor
🕶 A simple admin overlay to get to the relevant areas of the Craft CMS control panel.
Stars: ✭ 25 (-3.85%)
Mutual labels:  craft, craftcms, craftcms-plugin
Craft.patrol
Patrol simplifies SSL and maintenance routing for sites built with Craft
Stars: ✭ 91 (+250%)
Mutual labels:  craft, craftcms, craft-plugin
Buttonbox
A collection of utility field types for Craft
Stars: ✭ 94 (+261.54%)
Mutual labels:  craft, craftcms, craft-plugin
molecule
⚛️ Grab Twig components, CSS and JS files outside the primary template folder
Stars: ✭ 20 (-23.08%)
Mutual labels:  craft, craftcms, craftcms-plugin
craft-instagram-feed
Craft CMS plugin to receive Instragram feed data as variable in templates
Stars: ✭ 25 (-3.85%)
Mutual labels:  craft, craftcms, craft-plugin
craft.patrol
Patrol simplifies SSL and maintenance routing for sites built with Craft
Stars: ✭ 90 (+246.15%)
Mutual labels:  craft, craftcms, craft-plugin
Craft Brief
Quick, easy, and customizable user-group notifications for Craft CMS.
Stars: ✭ 47 (+80.77%)
Mutual labels:  craft, craftcms, craft-plugin
Seo
SEO utilities including a unique field type, sitemap & redirect manager
Stars: ✭ 210 (+707.69%)
Mutual labels:  craft, craftcms, craft-plugin
Simplemap
A beautifully simple map field type for Craft CMS.
Stars: ✭ 136 (+423.08%)
Mutual labels:  craft, craftcms, craft-plugin
picpuller-for-craft3
Pic Puller for Craft 3 lets authorized users pull in their Instagram media into Craft.
Stars: ✭ 12 (-53.85%)
Mutual labels:  craft, craftcms, craft-plugin
craft3-collections
Clean up those complex templates with Laravel Collections
Stars: ✭ 24 (-7.69%)
Mutual labels:  craft, craftcms, craftcms-plugin
oembed
A simple plugin to extract media information from websites, like youtube videos, twitter statuses or blog articles.
Stars: ✭ 34 (+30.77%)
Mutual labels:  craft, craftcms, craft-plugin
craft-plugin-mix
Helper plugin for Laravel Mix in Craft CMS templates
Stars: ✭ 50 (+92.31%)
Mutual labels:  craft, craftcms, craft-plugin

Smartdown for Craft

Build Status

Smartdown for Craft is a Twig Filter which brings the unbridled joy of Markdown Extra and SmartyPants to Craft.

Craft already supports standard Markdown, but sadly standard Markdown doesn't support lots of useful things such as footnotes, fenced code blocks, and tables. It also does nothing to spruce up your typography, leaving your site with an embarrassment of straight quotes, and faux ellipses.

Smartdown plugs both of these gaps, turning your website into a typographic dreamboat.

Requirements

Each release of Smartdown is automatically tested against PHP 7.1 and above. It's also manually tested on the most recent version of Craft.

PHP 7.0 support

In theory, Smartdown should be compatible with PHP 7.0. In practise, it's impossible to test this, because the Codeception dependency tree includes components which only work with PHP 7.1+.

Unfortunately there's nothing we can do about that.

Installation

To install Smartdown, either search for "Smartdown" in the Craft Plugin Store, or add it as a Composer dependency.

Here's how to install Smartdown using Composer.

  1. Open your terminal, and navigate to your Craft project:

     cd /path/to/project
    
  2. Add Smartdown as a project dependency:

     composer require experience/smartdown
    
  3. In the Control Panel, go to "Settings → Plugins", and click the "Install" button for Smartdown

Basic usage

Use the Smartdown filter in exactly the same way as any other Twig filter.

{{ myVariable|smartdown }}

This will parse your content with both Markdown Extra, and SmartyPants, turning this:

"Outside of a dog, a book is a man's best friend. Inside a dog it's too dark to read..."

Into this:

"Outside of a dog, a book is a man's best friend. Inside a dog it's too dark to read..."

Filter parameters

markup

The markup filter parameter controls whether the text will be parsed using Markdown Extra. The default value is true.

Example usage:

{{ content|smartdown(markup=false) }}

typography

The typography filter parameter controls whether the text will be parsed using SmartyPants. The default value is true.

Example usage:

{{ content|smartdown(typography=false) }}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].