PHP code example of basteyy / static-markdown-pages

1. Go to this page and download the library: Download basteyy/static-markdown-pages 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/ */

    

basteyy / static-markdown-pages example snippets


/** @var \basteyy\StaticMarkdownPage\Archive $staticPages */
$staticPages = new \basteyy\StaticMarkdownPage\Archive('/var/www/storage/my_pages/');

/** @var \basteyy\StaticMarkdownPage\Archive $staticPages */
/** @var \basteyy\StaticMarkdownPage\Page $page */
$page = $staticPages->getByUrl('/fancy-third/');

/** @var \basteyy\StaticMarkdownPage\Archive $staticPages */
/** @var \basteyy\StaticMarkdownPage\Page $page */
echo $page->getHtml();