nonz250/php-simple-ogp

This is a simple library for reading OGP.

1.1.0 2022-01-25 08:23 UTC

This package is auto-updated.

Last update: 2024-04-25 13:14:20 UTC


README

simple ogp maker

Contributing

Feel free to submit a Pull Request. However, please run the make prod command and check the test content before submitting your Pull Request.

Development

We recommend using Docker for this project.

Make Commands

Initial Setup

make setup

Development Test

Testing under development.

make test

Code Fixer

make fix

Production Test

Test before you Pull Request.

make prod

How to use

For Example.

$ogp = new \SimpleOgp\SimpleOgp('https://labo.nozomi.bike');
// Get web site content and set ogp values.
$ogp->getHtml();
// Get ogp title.
$title = $ogp->title();
// Get ogp description.
$description = $ogp->description();
// Get ogp image path.
$imagePath = $ogp->imagePath();