1. Go to this page and download the library: Download rockstarcode/markdb 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/ */
rockstarcode / markdb example snippets
$MarkDb = new MarkDB\MarkDB('/path/to/files/','base/path/to/form/relative/slugs');
$slug = 'path/to/some/article';
$article = $MarkDb->get($slug); # (object) Article
$article->slug # url friendly path that identifies article in MarkDB
$article->{$property} # properties extracted from YAML processing of the article
$article->content() # processed MarkDown of content of article
$article->read_time() # helper to calculate words in article and average read time
$article->summary() # Extract certain percentage of content for preview
$find = $MarkDb->where(['author'=>'Author Name','category'=>'Books Ive Read']); (Array)[Articles]
foreach($MarkDb->libraries as $library){
$library->articles # list of articles within library
$library->libraries # list of child libraries
$library->index # list of all libraries/articles by slug
$library->slug # slug which identifies library
}