2017 © Pedro Peláez
 

library sculpin-parsedown

Sculpin Parsedown

image

mavimo/sculpin-parsedown

Sculpin Parsedown

  • Saturday, January 11, 2014
  • by mavimo
  • Repository
  • 0 Watchers
  • 2 Stars
  • 23 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Sculpin parsedown

Sculpin is a PHP static site generator, that use markdown file to store content. By default it's parse that files using php-markdown, that is a nice PHP markdown parser, but do not support flavored markdown from github and have some performance issues., (*1)

This use the awesome parsedown library that is faster that php-markdown and support flavored markdown syntax., (*2)

Performance

I used my blog as test platform with: * approx 100 posts * archive (paginated posts) * tags * categories * some static pages, (*3)

Site is generated on a i7 CPU, an SSD disk and 16GB RAM., (*4)

Using markdown:

real  0m8.954s
user  0m7.884s
sys   0m0.235s

Using parsedown:

real  0m6.115s
user  0m5.834s
sys   0m0.267s

the improvement is approx:, (*5)

real  32%
user  26%
sys   12%

average 29% of improvement., (*6)

Installation

To install add in your sculpin.json file the following package declaration:, (*7)

{
    "require": {
        "mavimo/sculpin-parsedown": "@dev"
    }
}

Now you can update using sculpin update command., (*8)

After that add the following definition in the sculpin_kernel.yml:, (*9)

sculpin_markdown:
   parser_class: Mavimo\Sculpin\Bundle\ParsedownBundle\ParsedownConverter

Sculpin have a declared dependencie in bundle, so we need to manually patch it, in file:, (*10)

src/Sculpin/Bundle/MarkdownBundle/MarkdownConverter.php

remove from line 14:, (*11)

use Michelf\Markdown;

and transform line 48 from:, (*12)

    public function __construct(Markdown $markdown, array $extensions = array())

to, (*13)

    public function __construct(Markdown $markdown, array $extensions = array())

removing Markdown variable definition., (*14)

The Versions

11/01 2014

dev-master

9999999-dev https://sculpin.io

Sculpin Parsedown

  Sources   Download

MIT

The Requires

 

parser markdown static parsedown blog blogging site