Skip to content

Commit

Permalink
update readme with new html5 parser info
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronpk committed Mar 29, 2018
1 parent 64aab44 commit 5c056e8
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ Instead of having a hard-coded list of all the different microformats, it follow

There are two ways of installing php-mf2. I **highly recommend** installing php-mf2 using [Composer](http://getcomposer.org). The rest of the documentation assumes that you have done so.

To install using Composer, run `./composer.phar require mf2/mf2:~0.3`
To install using Composer, run

```
composer require mf2/mf2
```

If you can’t or don’t want to use Composer, then php-mf2 can be installed the old way by downloading [`/Mf2/Parser.php`](https://raw.githubusercontent.com/indieweb/php-mf2/master/Mf2/Parser.php), adding it to your project and requiring it from files you want to call its functions from, like this:

Expand All @@ -23,6 +27,15 @@ require_once 'Mf2/Parser.php';
$mf = Mf2\fetch('https://waterpigs.co.uk');
```

It is recommended to install the HTML5 parser for proper handling of HTML5 elements. Using composer, run

```
composer require masterminds/html5
```

If this library is added to your project, the php-mf2 parser will use it automatically instead of the built-in HTML parser.


### Signed Code Verification

From v0.2.9, php-mf2’s version tags are signed using GPG, allowing you to cryptographically verify that you’re using code which hasn’t been tampered with. To verify the code you will need the GPG keys for one of the people in the list of code signers:
Expand Down Expand Up @@ -342,6 +355,18 @@ Currently php-mf2 passes the majority of it’s own test case, and a good percen

### Changelog

#### v0.4.3

2018-03-29

If the [masterminds/html5](https://github.com/Masterminds/html5-php) HTML5 parser is available, the Mf2 parser will use that instead of the built-in HTML parser. This enables proper handling of HTML5 elements such as `<article>`.

To include the HTML5 parser in your project, run:

```
composer require masterminds/html5
```

#### v0.4.2

2018-03-29
Expand Down

0 comments on commit 5c056e8

Please sign in to comment.