frictionlessdata / livemark

Data presentation framework for Python that generates static sites from extended Markdown with interactive charts, tables, scripts, and other features
https://livemark.frictionlessdata.io
MIT License
95 stars 8 forks source link

Blog index doesn't convert markdown #209

Closed roll closed 2 years ago

roll commented 2 years ago

Overview

See - https://github.com/frictionlessdata/livemark/issues/144#issuecomment-1176150205

roll commented 2 years ago

Hi @gabrielbdornas I'm releasing livemark@0.92 with a fix.

It strips the markdown from the blog description and also provides a blog.description config that you can use in the blog article frontmatter.

The generated blog/index.md needs to be updated:

# Blog

```html markup
{% for item in document.get_plugin('blog').items %}
<div class="livemark-blog-item">
  <h2><a href="{{ item.relpath }}.html">{{ item.document.name }}</a></h2>
  <div class="row">
    <div class="col-8">
      <p>
        <strong>
          By {{ item.document.get_plugin('blog').author }}
          on {{ item.document.get_plugin('blog').date }}
        </strong>
      </p>
      {{ item.document.get_plugin('blog').description }}
      <a href="{{ item.relpath }}.html">Read more &raquo;</a>
    </div>
    <div class="col-4">
      <img src="{{ item.document.get_plugin('blog').image }}" />
    </div>
  </div>
</div>
{% endfor %}
roll commented 2 years ago

If you're interested in supporting markdown rendering in blog description let's create a feature request -- in my opinion it's not really needed as a plain text seems to be a standard for article excerpts

gabrielbdornas commented 2 years ago

@roll! I think it's pretty good. No need to create a feature request. Thanks!