PHP code example of opengeek / content-markdown
1. Go to this page and download the library: Download opengeek/content-markdown library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
opengeek / content-markdown example snippets
use Opengeek\Content\Markdown\MarkdownArticleRepository;
use Opengeek\Content\Markdown\MarkdownArticleRepositoryConfig;
use Opengeek\Content\Markdown\MarkdownArticleMapper;
$config = new MarkdownArticleRepositoryConfig(
contentPath: __DIR__ . '/content/articles',
recursive: true
);
$repository = new MarkdownArticleRepository(
$config,
new MarkdownArticleMapper()
);
$articles = $repository->findAll();