<?php
defined('ABSPATH') || exit;
?>
<article class="kb-doc-content">
    <nav class="kb-breadcrumbs">
        <a href="<?php echo esc_url($url_builder::docsIndex()); ?>"><?php esc_html_e('Docs', 'kb-markdown-importer'); ?></a><span>/</span>
        <a href="<?php echo esc_url($url_builder::product($product_slug)); ?>"><?php echo esc_html($product ? $product->name : $product_slug); ?></a><span>/</span>
        <a href="<?php echo esc_url($url_builder::version($product_slug, $version_slug)); ?>"><?php echo esc_html($version ? $version->name : $version_slug); ?></a>
    </nav>
    <h1><?php echo esc_html(get_the_title($post)); ?></h1>
    <div class="kb-rendered-content">
        <?php
        $rendered_content = $url_builder::rewriteHtml(apply_filters('the_content', $post->post_content));
        echo wp_kses_post($rendered_content);
        ?>
    </div>
</article>
