public function markdownLink($file_path, $type = '')
    {

        $array = explode('/', $file_path);
        $dir = $array[0];

        $replace = array('-', '_');

        $url = trim($dir, '.md');
        $display_name = str_replace($replace, ' ', trim($dir, '.md'));

        if (count($array) > 1) {
            $name = trim($array[1], '.md');
            $url = $dir . '?page=' . $name;
            $display_name = str_replace($replace, ' ', $name);
        }

        $link = ($type == 'url') ? '/md/' . $url :
            '<a href="/md/' . $url . '" class="markdown-link">' . $display_name .
            '</a>';
        return $link;

    }